/* ==========================================================================
   VIRTUAL HAIR TRY-ON STYLESHEET
   Luxury Dark Mode & Glassmorphism Theme for IstgaheMod
   ========================================================================== */

.tryon-container {
    max-width: 1100px;
    margin: 3rem auto;
    padding: 0 1.5rem 5rem 1.5rem;
    font-family: inherit;
    direction: rtl;
}

.tryon-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.tryon-badge {
    display: inline-block;
    padding: 0.4rem 1.2rem;
    background: rgba(187, 143, 74, 0.15);
    border: 1px solid rgba(187, 143, 74, 0.4);
    color: var(--gold, #bb8f4a);
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.tryon-header h1 {
    font-size: 2.2rem;
    font-weight: 900;
    color: #ffffff;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #ffffff 30%, var(--gold, #bb8f4a) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tryon-header p {
    color: #a0a0b0;
    font-size: 1.05rem;
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.6;
}

/* WIZARD STEPS NAV */
.wizard-steps {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(20, 20, 28, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 1rem 1.5rem;
    margin-bottom: 2.5rem;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: #707085;
    font-weight: 600;
    font-size: 0.92rem;
    transition: all 0.3s ease;
}

.step-item.active {
    color: #ffffff;
}

.step-item.active .step-icon {
    background: linear-gradient(135deg, #bb8f4a, #d9b06e);
    color: #000;
    box-shadow: 0 0 15px rgba(187, 143, 74, 0.4);
}

.step-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.step-divider {
    flex: 1;
    height: 2px;
    background: rgba(255, 255, 255, 0.06);
    margin: 0 1rem;
}

/* WIZARD CARDS & PANELS */
.wizard-card {
    background: rgba(18, 18, 26, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.panel-header {
    margin-bottom: 2rem;
}

.panel-header h2 {
    font-size: 1.45rem;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.5rem;
}

.panel-num {
    display: inline-flex;
    width: 30px;
    height: 30px;
    background: var(--gold, #bb8f4a);
    color: #000;
    font-size: 0.95rem;
    font-weight: 800;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
}

.panel-header p {
    color: #9090a5;
    font-size: 0.95rem;
}

/* UPLOAD DROPZONE */
.upload-dropzone {
    border: 2px dashed rgba(187, 143, 74, 0.4);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.02);
    padding: 3.5rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.upload-dropzone:hover, .upload-dropzone.dragover {
    border-color: var(--gold, #bb8f4a);
    background: rgba(187, 143, 74, 0.05);
    transform: scale(1.005);
}

.file-input-hidden {
    display: none;
}

.dropzone-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.dropzone-content h3 {
    color: #ffffff;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.dropzone-content p {
    color: #757588;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.btn-select-file {
    background: linear-gradient(135deg, rgba(187, 143, 74, 0.2), rgba(187, 143, 74, 0.35));
    border: 1px solid var(--gold, #bb8f4a);
    color: #ffffff;
    padding: 0.75rem 2rem;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-select-file:hover {
    background: var(--gold, #bb8f4a);
    color: #000;
}

/* PREVIEW BOX */
.preview-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.preview-box img {
    max-width: 280px;
    max-height: 280px;
    border-radius: 16px;
    border: 3px solid var(--gold, #bb8f4a);
    object-fit: cover;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.preview-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #ffffff;
    font-weight: 600;
}

.btn-remove-photo {
    background: rgba(255, 60, 60, 0.15);
    border: 1px solid rgba(255, 60, 60, 0.4);
    color: #ff6b6b;
    padding: 0.4rem 1rem;
    border-radius: 8px;
    cursor: pointer;
}

/* STYLE CARDS & GRID */
.style-filter-tabs {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-tab {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #a0a0b5;
    padding: 0.5rem 1.2rem;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.88rem;
    transition: all 0.3s ease;
}

.filter-tab.active, .filter-tab:hover {
    background: var(--gold, #bb8f4a);
    color: #000;
    border-color: var(--gold, #bb8f4a);
    font-weight: 700;
}

.styles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.style-card {
    background: rgba(25, 25, 36, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
}

.style-card:hover {
    transform: translateY(-6px);
    border-color: rgba(187, 143, 74, 0.6);
    box-shadow: 0 12px 25px rgba(0,0,0,0.4);
}

.style-card.active {
    border-color: var(--gold, #bb8f4a);
    background: rgba(187, 143, 74, 0.08);
    box-shadow: 0 0 20px rgba(187, 143, 74, 0.3);
}

.style-img-wrapper {
    height: 200px;
    position: relative;
    overflow: hidden;
}

.style-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.style-card:hover .style-img-wrapper img {
    transform: scale(1.06);
}

.badge-trend {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    color: var(--gold, #bb8f4a);
    border: 1px solid var(--gold, #bb8f4a);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 8px;
}

.style-card-body {
    padding: 1.2rem;
}

.style-card-body h3 {
    font-size: 1rem;
    color: #ffffff;
    margin-bottom: 0.4rem;
}

.style-card-body p {
    font-size: 0.83rem;
    color: #88889c;
    line-height: 1.4;
}

.card-radio-check {
    position: absolute;
    bottom: 12px;
    left: 12px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.style-card.active .card-radio-check {
    background: var(--gold, #bb8f4a);
    color: #000;
}

/* STEP 3 FORM ELEMENTS */
.form-section {
    margin-bottom: 2rem;
}

.form-label {
    display: block;
    color: #ffffff;
    font-weight: 700;
    margin-bottom: 0.8rem;
    font-size: 1rem;
}

.color-swatches {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.swatch-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #d0d0e0;
    padding: 0.6rem 1.1rem;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.88rem;
    transition: all 0.3s ease;
}

.swatch-color {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.swatch-btn.active, .swatch-btn:hover {
    border-color: var(--gold, #bb8f4a);
    background: rgba(187, 143, 74, 0.12);
    color: #ffffff;
}

.tryon-textarea {
    width: 100%;
    background: rgba(10, 10, 15, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 1rem;
    color: #ffffff;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.tryon-textarea:focus {
    border-color: var(--gold, #bb8f4a);
    box-shadow: 0 0 10px rgba(187, 143, 74, 0.2);
}

/* ACTIONS BUTTONS */
.panel-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-next, .btn-prev, .btn-generate-ai {
    padding: 0.85rem 2rem;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.98rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-next {
    background: linear-gradient(135deg, #bb8f4a, #d9b06e);
    color: #000;
    border: none;
    box-shadow: 0 5px 15px rgba(187, 143, 74, 0.3);
    margin-right: auto;
}

.btn-next:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(187, 143, 74, 0.5);
}

.btn-next:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-prev {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.btn-prev:hover {
    background: rgba(255, 255, 255, 0.12);
}

.btn-generate-ai {
    background: linear-gradient(135deg, #bb8f4a 0%, #d9b06e 50%, #8a6321 100%);
    color: #000;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.05rem;
    font-weight: 900;
    box-shadow: 0 8px 25px rgba(187, 143, 74, 0.4);
    display: flex;
    align-items: center;
    gap: 0.6rem;

    margin-right: auto;
}

.btn-generate-ai:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 35px rgba(187, 143, 74, 0.6);
}

/* LOADING OVERLAY */
.ai-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 15, 0.92);
    backdrop-filter: blur(15px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

.loading-content {
    max-width: 500px;
    width: 100%;
}

.ai-spinner {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 2rem auto;
}

.spinner-ring {
    width: 100%;
    height: 100%;
    border: 4px solid rgba(187, 143, 74, 0.15);
    border-top: 4px solid var(--gold, #bb8f4a);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.8rem;
}

.loading-content h2 {
    color: #ffffff;
    font-size: 1.35rem;
    margin-bottom: 0.8rem;
}

.loading-content p {
    color: var(--gold, #bb8f4a);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.progress-bar-wrapper {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #bb8f4a, #d9b06e);
    transition: width 0.3s ease;
}

.loading-tips {
    font-size: 0.82rem;
    color: #707085;
    line-height: 1.5;
}

/* RESULT PANEL & COMPARISON */
.comparison-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.comparison-card {
    flex: 1;
    min-width: 280px;
    max-width: 420px;
    background: rgba(25, 25, 36, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
}

.comparison-card.ai-result-card {
    border-color: var(--gold, #bb8f4a);
    box-shadow: 0 0 30px rgba(187, 143, 74, 0.25);
}

.card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
    z-index: 2;
}

.card-badge.gold {
    background: var(--gold, #bb8f4a);
    color: #000;
}

.comparison-card img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    display: block;
}

.comparison-vs {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--gold, #bb8f4a);
    color: #000;
    font-weight: 900;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(187, 143, 74, 0.5);
}

.result-details {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 1.5rem 0 2.5rem 0;
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.detail-item {
    font-size: 0.95rem;
}

.detail-label {
    color: #88889c;
    margin-left: 0.4rem;
}

.detail-value {
    color: var(--gold, #bb8f4a);
    font-weight: 700;
}

.result-actions {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    flex-wrap: wrap;
}

.btn-download, .btn-book-now, .btn-retry {
    padding: 0.9rem 1.8rem;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-download {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.btn-download:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

.btn-book-now {
    background: linear-gradient(135deg, #bb8f4a, #d9b06e);
    color: #000;
    border: none;
    box-shadow: 0 5px 20px rgba(187, 143, 74, 0.3);
}

.btn-book-now:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(187, 143, 74, 0.5);
    color: #000;
}

.btn-retry {
    background: transparent;
    border: 1px solid rgba(187, 143, 74, 0.4);
    color: var(--gold, #bb8f4a);
}

.btn-retry:hover {
    background: rgba(187, 143, 74, 0.1);
}

@media (max-width: 768px) {
    .wizard-steps {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }
    .step-divider {
        display: none;
    }
    .styles-grid {
        grid-template-columns: 1fr;
    }
    .comparison-container {
        flex-direction: column;
    }
    .btn-generate-ai {
        width: 100%;
        justify-content: center;
    }
}
