/* Global Theme */
:root {
    --brand-accent: #edd624;
    --brand-text: #010240;
    --brand-bg: #e1e2f5;
    --white: #ffffff;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--brand-text);
    background: var(--brand-bg);
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Top Navigation */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 1000;
    background: transparent;
}

.nav-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: var(--brand-text);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.15s ease;
}

.nav-btn:hover {
    background: var(--white);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: scale(1.05);
}

.nav-btn:active {
    transform: scale(0.95);
}

/* Main Content */
.main-content {
    min-height: 100vh;
    padding-top: 0;
}

/* Screen Container */
.screen-container {
    position: relative;
    min-height: 100vh;
    width: 100%;
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

.screen-container.fade-out {
    opacity: 0;
}

.screen-container.fade-in {
    opacity: 1;
}

/* Simple Screen Styles */
.screen-simple {
    display: flex;
    align-items: center;
    justify-content: center;
}

.screen-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.screen-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100px;
    height: 100%;
    background: linear-gradient(to right, var(--brand-bg), transparent);
}

.screen-background::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100%;
    background: linear-gradient(to left, var(--brand-bg), transparent);
}

.screen-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(250, 245, 255, 0.7); /* White with 70% opacity */
    z-index: 1;
    pointer-events: none; /* Allow interaction with content below */
}

.screen-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 20px;
    max-width: 600px;
    min-height: 420px;
    width: 100%;
}

.logo-container {
    margin-bottom: 40px;
}

.logo {
    max-width: 200px;
    height: auto;
}

.text-content {
    margin-bottom: 30px;
}

.screen-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--brand-text);
    margin-bottom: 16px;
    line-height: 1.2;
}

.screen-subtitle {
    font-size: 18px;
    color: var(--brand-text);
    opacity: 0.8;
    line-height: 1.5;
}

.button-container {
    position: absolute;
    bottom: 5%;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 400px;
}

.btn-action {
    width: 100%;
    max-width: 630px;
    padding: 16px 40px;
    background: var(--brand-accent);
    color: var(--brand-text);
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 4px 12px rgba(237, 214, 36, 0.3);
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(237, 214, 36, 0.4);
}

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

/* Choice Screen Styles */
.choice-screen {
    padding: 80px 20px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.choice-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--brand-text);
    text-align: center;
    margin-bottom: 40px;
}

.choices-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 40px;
}

.layout-2x2 {
    grid-template-columns: repeat(2, 1fr);
}

.layout-2x3 {
    grid-template-columns: repeat(2, 1fr);
}

.choice-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.choice-card:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.choice-card:active {
    transform: scale(0.98);
}

.choice-image-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 133.3333%; /* 3:4 portrait aspect ratio (height = width * 4/3) */
    overflow: hidden;
}

.choice-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0; /* behind overlay and text */
    display: block;
}

/* subtle white overlay on top of the image to improve text readability */
.choice-image-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.1); /* 0.1 white transparency as requested */
    z-index: 1;
    pointer-events: none;
}

/* place choice text on top of the image at the bottom */
.choice-text {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2; /* above image and its overlay */
    padding: 14px 16px;
    /* Slight translucent backdrop to ensure legibility on very busy images while keeping visual lightness */
    background: linear-gradient(to top, rgba(255,255,255,0.9) 10%, rgba(255,255,255,0.0) 100%);
    color: var(--brand-text);
}

.choice-title-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--brand-text);
    margin-bottom: 6px;
    text-shadow: 0 1px 0 rgba(255,255,255,0.6); /* subtle lift for contrast */
}

.choice-subtitle {
    font-size: 14px;
    color: var(--brand-text);
    opacity: 0.85;
    margin: 0;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay.d-none {
    display: none;
}

/* Modal Customization */
.modal-content {
    border-radius: 20px;
    border: none;
}

.modal-header {
    padding: 24px 24px 0;
}

.modal-body {
    padding: 24px;
}

.nav-tabs .nav-link {
    color: var(--brand-text);
    border: none;
    border-bottom: 2px solid transparent;
}

.nav-tabs .nav-link.active {
    color: var(--brand-text);
    font-weight: 600;
    border-bottom: 2px solid var(--brand-accent);
    background: transparent;
}

.form-control {
    border-radius: 8px;
    border: 1px solid #ddd;
    padding: 12px;
}

.form-control:focus {
    border-color: var(--brand-accent);
    box-shadow: 0 0 0 0.2rem rgba(237, 214, 36, 0.25);
}

.btn-primary {
    background: var(--brand-accent);
    border: none;
    color: var(--brand-text);
    font-weight: 600;
    padding: 12px;
    border-radius: 8px;
}

.btn-primary:hover {
    background: #d4a621;
}

/* Dropdown Menu */
.dropdown-menu {
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: none;
    padding: 8px;
    margin-top: 8px;
}

.dropdown-item {
    border-radius: 8px;
    padding: 10px 16px;
    transition: background 0.15s ease;
}

.dropdown-item:hover {
    background: var(--brand-bg);
}

/* Responsive Design */
@media (max-width: 768px) {
    .screen-title {
        font-size: 28px;
    }

    .screen-subtitle {
        font-size: 16px;
    }

    .choice-title {
        font-size: 24px;
        margin-bottom: 30px;
    }

    .choice-card {
        border-radius: 12px;
    }

    .choice-text {
        padding: 15px;
    }

    .choice-title-text {
        font-size: 16px;
    }

    .choice-subtitle {
        font-size: 13px;
    }

    .choices-grid {
        gap: 15px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .choices-grid.layout-2x3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .choices-grid.layout-2x2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1025px) {
    .choices-grid.layout-2x3 {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1000px;
        margin: 0 auto 40px;
    }

    .choices-grid.layout-2x2 {
        grid-template-columns: repeat(2, 1fr);
        max-width: 700px;
        margin: 0 auto 40px;
    }

    .choice-screen {
        padding: 100px 40px 60px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.d-none {
    display: none;
}

/* ===== MULTI-SELECT STYLES ===== */
.choice-card.selected {
    border: 3px solid var(--brand-accent);
    transform: scale(1.02);
}

.choice-checkmark {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--brand-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s ease;
    z-index: 10;
}

.choice-checkmark i {
    color: var(--brand-text);
    font-size: 14px;
}

.choice-card.selected .choice-checkmark {
    opacity: 1;
    transform: scale(1);
}

.selection-counter {
    text-align: center;
    font-size: 16px;
    color: var(--brand-text);
    opacity: 0.8;
    margin-bottom: 20px;
}

#selected-count {
    font-weight: 800;
    color: var(--brand-text);
}

/* Choice subtitle header */
.choice-subtitle-header {
    text-align: center;
    font-size: 16px;
    color: var(--brand-text);
    opacity: 0.7;
    margin-bottom: 15px;
}

/* Button container fixed at bottom */
.button-container-fixed {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, var(--brand-bg) 80%, transparent);
    z-index: 100;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.btn-disabled {
    background: #ccc !important;
    color: #888 !important;
    cursor: not-allowed;
    box-shadow: none !important;
}

/* ===== LAYOUT 1x2 (2 columns, icon cards for objectives) ===== */
.layout-1x2 {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 400px;
    margin: 0 auto 100px;
}

.layout-1x2 .choice-card {
    aspect-ratio: auto;
    border-radius: 20px;
}

.layout-1x2 .choice-image-wrapper {
    padding-bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 20px;
    text-align: center;
}

.layout-1x2 .choice-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin-bottom: 20px;
    position: relative;
}

.layout-1x2 .choice-text {
    position: relative;
    padding: 0;
    background: none;
    text-align: center;
}

.layout-1x2 .choice-title-text {
    font-size: 20px;
    margin-bottom: 8px;
}

.layout-1x2 .choice-subtitle {
    font-size: 14px;
}

/* ===== LAYOUT 1x3 (3 budget cards) ===== */
.layout-1x3 {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 400px;
    margin: 0 auto 100px;
}

.layout-1x3 .choice-card {
    border-radius: 16px;
}

.layout-1x3 .choice-image-wrapper {
    padding-bottom: 0;
    display: flex;
    align-items: center;
    padding: 24px;
}

.layout-1x3 .choice-icon-wrapper {
    width: 60px;
    height: 60px;
    min-width: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-right: 16px;
}

.layout-1x3 .choice-text {
    position: relative;
    padding: 0;
    background: none;
    text-align: left;
    flex: 1;
}

.layout-1x3 .choice-checkmark {
    position: relative;
    top: auto;
    right: auto;
    margin-left: auto;
}

/* ===== ICON WRAPPER FOR NON-IMAGE CARDS ===== */
.choice-icon-wrapper {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: var(--brand-text);
    background: linear-gradient(135deg, #f5f5f5, #e8e8e8);
}

/* ===== FORM SCREEN ===== */
.form-screen {
    min-height: 100vh;
    padding: 80px 24px 120px;
    display: flex;
    flex-direction: column;
    max-width: 500px;
    margin: 0 auto;
}

.form-header {
    text-align: center;
    margin-bottom: 40px;
}

.form-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--brand-text);
    margin-bottom: 12px;
}

.form-subtitle {
    font-size: 16px;
    color: var(--brand-text);
    opacity: 0.7;
}

.form-content {
    flex: 1;
}

.form-field {
    margin-bottom: 32px;
}

.form-label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: var(--brand-text);
    margin-bottom: 12px;
}

.form-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 18px;
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    background: var(--white);
    color: var(--brand-text);
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--brand-accent);
    box-shadow: 0 0 0 4px rgba(237, 214, 36, 0.2);
}

.form-input::placeholder {
    color: #aaa;
}

/* Currency Selector */
.currency-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.currency-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 12px;
    background: var(--white);
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.currency-option:hover {
    border-color: #ccc;
    background: #f9f9f9;
}

.currency-option.selected {
    border-color: var(--brand-accent);
    background: rgba(237, 214, 36, 0.1);
}

.currency-symbol {
    font-size: 24px;
    font-weight: 700;
    color: var(--brand-text);
    margin-bottom: 4px;
}

.currency-code {
    font-size: 12px;
    font-weight: 600;
    color: var(--brand-text);
    opacity: 0.7;
}

/* ===== PROFILE SCREEN ===== */
.profile-screen {
    min-height: 100vh;
    padding: 80px 20px 160px;
    max-width: 500px;
    margin: 0 auto;
}

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

.profile-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--brand-text);
    margin-bottom: 8px;
}

.profile-subtitle {
    font-size: 16px;
    color: var(--brand-text);
    opacity: 0.7;
}

.profile-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.profile-card {
    background: var(--white);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.user-info-card {
    text-align: center;
    background: linear-gradient(135deg, var(--brand-accent), #f5e85c);
}

.profile-greeting {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.greeting-emoji {
    font-size: 32px;
}

.greeting-name {
    font-size: 24px;
    font-weight: 700;
    color: var(--brand-text);
    margin: 0;
}

.profile-section {
    background: var(--white);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--brand-text);
    opacity: 0.6;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title i {
    font-size: 16px;
}

/* Selected Styles Grid */
.selected-styles {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Simple style preview (fallback) */
.style-preview {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 3/4;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.style-preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.style-preview-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 8px;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: white;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

/* Detailed style cards with descriptions */
.style-card-detailed {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.style-card-detailed:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.style-card-header {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.style-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.style-card-title-section {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: linear-gradient(to top, rgba(1, 2, 64, 0.9), rgba(1, 2, 64, 0.7), transparent);
}

.style-card-title {
    font-size: 20px;
    font-weight: 700;
    color: white;
    margin: 0 0 4px 0;
}

.style-card-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-style: italic;
}

.style-card-body {
    padding: 20px;
}

.style-description {
    font-size: 15px;
    line-height: 1.6;
    color: var(--brand-text);
    margin: 0 0 16px 0;
}

/* Advanced sections */
.advanced-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(1, 2, 64, 0.1);
}

.advanced-section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--brand-text);
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.color-tag {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--brand-text);
    background: var(--brand-bg);
}

.color-tag.primary-color {
    background: var(--brand-accent);
}

.color-tag.accent-color {
    background: rgba(237, 214, 36, 0.3);
    border: 1px solid var(--brand-accent);
}

.color-label {
    display: inline-block;
    margin: 4px 12px 0 0;
    font-size: 12px;
    color: #333;
    vertical-align: middle;
}

.color-label.primary-label {
    font-weight: 600;
}

.color-label.accent-label {
    font-style: italic;
}

.color-hex {
    display: inline-block;
    margin-left: 4px;
    font-size: 11px;
    color: #888;
}

.design-principles-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.design-principles-list li {
    position: relative;
    padding: 8px 0 8px 24px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--brand-text);
}

.design-principles-list li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--brand-accent);
    font-weight: 700;
}

/* Profile Values */
.profile-value {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    color: var(--brand-text);
}

.profile-value i {
    font-size: 22px;
}

.profile-item {
    min-height: 40px;
}

.empty-message {
    color: var(--brand-text);
    opacity: 0.5;
    font-size: 14px;
    font-style: italic;
    margin: 0;
}

.currency-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--brand-accent);
    font-size: 18px;
    font-weight: 700;
    color: var(--brand-text);
}

/* Signup Button */
.btn-signup {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: linear-gradient(135deg, var(--brand-accent), #f5e85c);
    font-size: 18px;
}

.btn-signup i {
    font-size: 20px;
}

.signup-hint {
    margin-top: 12px;
    font-size: 14px;
    color: var(--brand-text);
    opacity: 0.6;
    text-align: center;
}

/* ===== MOBILE OPTIMIZATIONS ===== */
@media (max-width: 400px) {
    .currency-selector {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-title {
        font-size: 26px;
    }

    .profile-title {
        font-size: 24px;
    }

    .greeting-name {
        font-size: 20px;
    }
}

@media (min-width: 768px) {
    .form-screen,
    .profile-screen {
        padding-top: 100px;
    }

    .layout-1x3 {
        max-width: 500px;
    }
}

/* ===== INTERFACE PAGE STYLES ===== */
.interface-container {
    min-height: 100vh;
    padding: 20px 20px 40px;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Mode Selector - Ultra Modern Contextual Tabs */
.mode-selector {
    display: flex;
    justify-content: center;
    padding: 0 10px;
    margin-bottom: -2px; /* Connect tabs to content */
    position: relative;
    z-index: 1; /* Lower layer */
}

.mode-tabs {
    display: flex;
    gap: 8px;
    width: 100%;
    max-width: 420px;
    z-index: 1; /* Lower layer */
}

.mode-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 20px;
    border: none;
    border-radius: 16px 16px 0 0; /* Rounded top only */
    background: rgba(230, 230, 230, 0.80);
    color: rgba(55, 55, 55, 0.65);
    font-weight: 600;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    backdrop-filter: blur(8px);
    border-bottom: 2px solid transparent;
}

/* Tab hover state */
.mode-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    transform: translateY(-2px);
}

/* Active tab - connected to content */
.mode-tab.active {
    background: rgba(255, 255, 255, 0.95);
    color: var(--brand-primary);
    box-shadow:
        0 -4px 12px rgba(0, 0, 0, 0.08),
        0 2px 0 0 rgba(255, 255, 255, 0.95); /* Extended bottom to connect */
    transform: translateY(2px); /* Move down to connect */
    border-bottom: none;
}

/* Accent line on active tab */
.mode-tab.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-accent));
    border-radius: 16px 16px 0 0;
}

.mode-tab i {
    font-size: 24px;
    transition: all 0.3s ease;
    color: var(--brand-primary) !important;
    transparency: 0.65;
}

.mode-tab.active i {
    color: var(--brand-primary);
    transform: scale(1.1);
}

.mode-tab:focus-visible {
    outline: 2px solid var(--brand-accent);
    outline-offset: -2px;
}

/* Tab Content Wrapper - Light background connected to tabs */
.tab-content-wrapper {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 5px 5px 20px 20px;
    padding: 16px;
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.1),
        0 -2px 0 rgba(255, 255, 255, 0.95); /* Connect to active tab */
    display: flex;
    flex-direction: column;
    gap: 14px;
    z-index: 2; /* Above tabs */
}

/* Remove legacy mode button styles */
.mode-btn,
.mode-btn:hover,
.mode-btn:active,
.mode-btn.active {
    all: unset;
}

/* Main Image Frame - Inside content wrapper */
.main-frame {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: #f5f5f5;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    position: relative;
    padding: 0;
}

.image-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 75%; /* 4:3 aspect ratio */
    overflow: hidden;
    border-radius: 12px;
    background: #f5f5f5;
}

.main-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s ease;
}

.image-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(1, 2, 64, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

/* Thumbnail Gallery - Light refined style */
.thumbnail-gallery {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.03);
    border-radius: 12px;
}

.thumbnail-gallery::-webkit-scrollbar {
    height: 6px;
}

.thumbnail-gallery::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.thumbnail-gallery::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.thumbnail-gallery::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

.thumbnail-item {
    flex: 0 0 auto;
    width: 80px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid rgba(0, 0, 0, 0.1);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thumbnail-item:hover {
    transform: scale(1.08);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
    border-color: rgba(0, 0, 0, 0.2);
}

.thumbnail-item:active {
    transform: scale(1.02);
}

.thumbnail-item.active {
    border-color: var(--brand-accent);
    border-width: 3px;
    box-shadow:
        0 4px 12px rgba(237, 214, 36, 0.3),
        0 0 0 1px var(--brand-accent);
    transform: scale(1.05);
}

/* Room Type Buttons - Light refined style */
.room-type-buttons {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.03);
    border-radius: 12px;
}

.room-btn {
    flex: 0 0 auto;
    width: 100px;
    height: 100px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.8);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    padding: 0;
}

.room-btn .room-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
        transform: scale(1.4);           /* 30% zoom */
    transform-origin: center center; /* zoom from center */
}

.room-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
    border-color: rgba(0, 0, 0, 0.2);
}

.room-btn:active {
    transform: scale(1.6);
}

.room-btn.selected {
    border-color: var(--brand-accent);
    border-width: 3px;
    box-shadow:
        0 4px 12px rgba(30, 58, 138, 0.3),
        0 0 0 1px var(--brand-accent);
    transform: scale(1.05);
}

/* Magic Action Button */
.action-container {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 10px 0;
}

.btn-magic {
    width: 100%;
    max-width: 400px;
    padding: 18px 40px;
    background: var(--brand-accent);
    color: var(--brand-text);
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 8px 24px rgba(30, 58, 138, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

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

.btn-magic:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(30, 58, 138, 0.5);
}

.btn-magic:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(30, 58, 138, 0.4);
}

.btn-magic i {
    font-size: 22px;
    filter: drop-shadow(0 0 8px rgba(237, 214, 36, 0.6));
}

.btn-magic-text {
    position: relative;
    z-index: 1;
}

/* RTL Support for Interface */
[dir="rtl"] .mode-tabs {
    flex-direction: row;
}

/* Responsive Design - Mobile First (Smartphones) */
@media (max-width: 480px) {
    .interface-container {
        padding: 16px 12px 20px;
        gap: 0; /* No gap, tabs connect to content */
    }

    .mode-selector {
        padding: 0 8px;
        margin-bottom: 0; /* Direct connection */
    }

    .mode-tabs {
        gap: 6px;
        max-width: 100%;
    }

    .mode-tab {
        padding: 14px 16px;
        font-size: 16px;
        border-radius: 14px 14px 0 0;
    }

    .mode-tab i {
        font-size: 22px;
    }

    /* Active tab connection on mobile */
    .mode-tab.active {
        transform: translateY(2px);
    }

    .tab-content-wrapper {
        border-radius: 5px 5px 16px 16px;
        padding: 12px;
        gap: 12px;
    }

    .main-frame {
        border-radius: 10px;
    }

    .image-wrapper {
        border-radius: 10px;
    }

    .thumbnail-gallery {
        padding: 8px;
        gap: 8px;
    }

    .thumbnail-item {
        width: 70px;
        height: 70px;
        border-width: 2px;
    }

    .room-type-buttons {
        padding: 8px;
        gap: 8px;
    }

    .room-btn {
        width: 70px;
        height: 70px;
        border-width: 2px;
    }

    .btn-magic {
        padding: 16px 32px;
        font-size: 16px;
    }

    .btn-magic i {
        font-size: 20px;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .interface-container {
        padding: 20px 18px 30px;
        gap: 0;
    }

    .mode-selector {
        margin-bottom: 0;
    }

    .tab-content-wrapper {
        border-radius: 0 0 18px 18px;
        padding: 14px;
        gap: 14px;
    }

    .thumbnail-gallery {
        padding: 10px;
    }

    .thumbnail-item {
        width: 85px;
        height: 85px;
    }

    .room-type-buttons {
        padding: 10px;
    }

    .room-btn {
        width: 70px;
        height: 70px;
    }
}

@media (min-width: 769px) {
    .interface-container {
        padding: 30px 30px 40px;
        gap: 0;
    }

    .mode-selector {
        margin-bottom: 0;
    }

    .mode-tabs {
        gap: 18px;
        max-width: 600px;

    }

    .mode-tab {
        padding: 22px 36px;
        font-size: 22px;
        border-radius: 22px 22px 0 0;
        box-shadow: 0 6px 24px rgba(0,0,0,0.10);
    }

    .mode-tab.active {
        box-shadow: 0 8px 32px rgba(0,0,0,0.16);
    }

    .tab-content-wrapper {
        border-radius: 5px 5px 24px 24px;
        padding: 18px;
        gap: 5px;
    }

    .main-frame {
        border-radius: 14px;
    }

    .image-wrapper {
        border-radius: 14px;
    }

    .thumbnail-gallery {
        padding: 12px;
        gap: 14px;
    }

    .thumbnail-item {
        width: 100px;
        height: 100px;
        border-radius: 12px;
    }

    .thumbnail-gallery {
        gap: 16px;
        justify-content: center;
    }

    .room-type-buttons {
        padding: 12px;
        gap: 12px;
    }

    .room-btn {
        width: 80px;
        height: 80px;
    }

    .btn-magic {
        padding: 20px 50px;
        font-size: 19px;
    }

    .btn-magic i {
        font-size: 24px;
    }
}

@media (min-width: 1001px) {
    .interface-container {
        padding: 30px 40px 40px;
        gap: 32px;
    }
}

/* Animation for mode button transition */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

.mode-tab.active i {
    animation: pulse 2s ease-in-out infinite;
}

