/* Hairstyle Edit Page Styles */
/* Black background with white accent - Premium & Minimal Design */

.hairstyle-edit-container {
    min-height: 100vh;
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Title Section */
.hairstyle-edit-container .generation-type-title {
    text-align: center;
    margin-bottom: 60px;
}

.hairstyle-edit-container .generation-type-title h2 {
    font-size: 2.5rem;
    font-weight: 300;
    color: #ffffff;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
    text-transform: uppercase;
}

.hairstyle-edit-container .subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 300;
    letter-spacing: 0.05em;
}

/* Upload Section */
.upload-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin-bottom: 60px;
}

@media (max-width: 768px) {
    .upload-section {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .hairstyle-edit-container .generation-type-title h2 {
        font-size: 1.75rem;
    }

    .hairstyle-edit-container {
        padding: 24px 16px;
    }
}

/* Upload Cards */
.upload-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 48px 32px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.upload-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.05), transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.upload-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.upload-card:hover::before {
    opacity: 1;
}

.upload-card.has-image {
    /* padding: 24px; */
}

.upload-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
}

.upload-card:hover .upload-icon {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transform: scale(1.05);
}

.upload-card h3 {
    font-size: 1.25rem;
    font-weight: 400;
    color: #ffffff;
    margin-bottom: 8px;
    letter-spacing: 0.05em;
}

.upload-card p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 24px;
}

.upload-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.upload-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.upload-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.upload-btn:hover::before {
    left: 100%;
}

/* Preview Container */
.preview-container {
    display: none;
    position: relative;
    margin-top: 20px;
}

.preview-container img {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.preview-container.active {
    display: block;
    animation: fadeInScale 0.4s ease;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.remove-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #ffffff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.remove-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.upload-card.has-image .upload-icon,
.upload-card.has-image h3,
.upload-card.has-image p,
.upload-card.has-image .upload-btn {
    display: none;
}

/* Transform Button */
.transform-section {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.transform-btn {
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
    color: #000000;
    border: none;
    padding: 20px 60px;
    border-radius: 60px;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(255, 255, 255, 0.15);
}

.transform-btn:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
    box-shadow: none;
}

.transform-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 60px rgba(255, 255, 255, 0.25);
}

.transform-btn:not(:disabled):active {
    transform: translateY(0);
}

.btn-icon {
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.transform-btn:not(:disabled):hover .btn-icon {
    transform: translateX(4px);
}

.btn-loader {
    display: none;
    align-items: center;
    gap: 12px;
}

.transform-btn.loading .btn-text,
.transform-btn.loading .btn-icon {
    display: none;
}

.transform-btn.loading .btn-loader {
    display: flex;
}

.loader-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-top-color: #000000;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Result Modal */
.result-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.result-modal.active {
    display: flex;
    animation: modalFadeIn 0.4s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
}

.modal-content {
    position: relative;
    background: linear-gradient(145deg, rgba(30, 30, 30, 0.95), rgba(20, 20, 20, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 32px;
    padding: 40px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    animation: modalSlideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    text-align: center;
    margin-bottom: 32px;
}

.modal-header h2 {
    font-size: 1.75rem;
    font-weight: 300;
    color: #ffffff;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
}

.modal-header p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Comparison Slider */
.comparison-container {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.comparison-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    overflow: hidden;
    cursor: ew-resize;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.comparison-wrapper img {
    pointer-events: none;
    -webkit-user-drag: none;
    user-drag: none;
}

.comparison-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.comparison-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.before-image {
    clip-path: inset(0 50% 0 0);
    z-index: 2;
}

.image-label {
    position: absolute;
    bottom: 20px;
    padding: 8px 20px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    color: #ffffff;
    text-transform: uppercase;
}

.before-label {
    left: 20px;
}

.after-label {
    right: 20px;
}

.comparison-slider {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    z-index: 10;
    cursor: ew-resize;
    transform: translateX(-50%);
}

.slider-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: #ffffff;
    transform: translateX(-50%);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.slider-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
}

.slider-handle:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

/* Sparkle Effects */
.sparkle-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

.sparkle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #ffffff;
    border-radius: 50%;
    animation: sparkle 1.5s ease-out forwards;
    box-shadow: 0 0 20px #ffffff, 0 0 40px rgba(255, 255, 255, 0.5);
}

@keyframes sparkle {
    0% {
        opacity: 1;
        transform: scale(0) rotate(0deg);
    }

    50% {
        opacity: 1;
        transform: scale(1) rotate(180deg);
    }

    100% {
        opacity: 0;
        transform: scale(0.5) rotate(360deg) translateY(-50px);
    }
}

.sparkle-star {
    position: absolute;
    animation: sparkleStar 2s ease-out forwards;
}

.sparkle-star::before,
.sparkle-star::after {
    content: '';
    position: absolute;
    background: #ffffff;
}

.sparkle-star::before {
    width: 2px;
    height: 20px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.sparkle-star::after {
    width: 20px;
    height: 2px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

@keyframes sparkleStar {
    0% {
        opacity: 0;
        transform: scale(0) rotate(0deg);
    }

    30% {
        opacity: 1;
        transform: scale(1) rotate(45deg);
    }

    100% {
        opacity: 0;
        transform: scale(0.5) rotate(90deg);
    }
}

/* Modal Actions */
.modal-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
}

.download-btn {
    background: #ffffff;
    color: #000000;
    border: none;
}

.download-btn:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
}

.close-btn {
    background: transparent;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Responsive Adjustments */
@media (max-width: 600px) {
    .modal-content {
        padding: 24px;
        border-radius: 24px;
    }

    .modal-header h2 {
        font-size: 1.25rem;
    }

    .modal-actions {
        flex-direction: column;
    }

    .action-btn {
        justify-content: center;
        width: 100%;
    }

    .transform-btn {
        padding: 16px 40px;
        font-size: 0.875rem;
    }

    .slider-handle {
        width: 40px;
        height: 40px;
    }

    .slider-handle svg {
        width: 18px;
        height: 18px;
    }
}

/* Glow Animation for Modal */
.modal-content::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg,
            transparent,
            rgba(255, 255, 255, 0.1),
            transparent,
            rgba(255, 255, 255, 0.1));
    border-radius: 34px;
    z-index: -1;
    animation: borderGlow 3s linear infinite;
}

@keyframes borderGlow {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.5;
    }
}

/* Success Animation */
.result-modal.active .comparison-container {
    animation: resultReveal 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.3s backwards;
}

@keyframes resultReveal {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Drag Active State */
.comparison-wrapper.dragging {
    cursor: grabbing;
}

.comparison-wrapper.dragging .slider-handle {
    transform: translate(-50%, -50%) scale(1.15);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}