/* ========================================
   IShipThem - Modern Design System 2025
   ======================================== */

/* CSS Variables - Global Design System */
:root {
    /* Primary Colors */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --secondary-dark: #db2777;
    --tertiary: #06b6d4;
    --tertiary-dark: #0891b2;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    /* Background Systems */
    --background-welcome: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --background-result: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #1e3a8a 100%);

    /* Glass Morphism */
    --glass: rgba(255, 255, 255, 0.1);
    --glass-dark: rgba(0, 0, 0, 0.3);
    --glass-light: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-border-strong: rgba(255, 255, 255, 0.3);

    /* Card Backgrounds */
    --card-bg: rgba(255, 255, 255, 0.95);
    --card-dark: rgba(0, 0, 0, 0.8);

    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.9);
    --text-muted: rgba(255, 255, 255, 0.7);
    --text-light: rgba(255, 255, 255, 0.8);
    --text-extra-light: rgba(255, 255, 255, 0.6);
    --text-dark: #1f2937;
    --text-dark-secondary: #4b5563;

    /* Shadows System */
    --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 24px 96px rgba(0, 0, 0, 0.5);
    --shadow-result-sm: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-result-md: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-result-lg: 0 16px 64px rgba(0, 0, 0, 0.4);
    --shadow-result-xl: 0 24px 96px rgba(0, 0, 0, 0.5);

    /* Scan Animation Colors */
    --scan-primary: #00ff88;
    --scan-secondary: #0099ff;
}

/* ========================================
   GLOBAL STYLES
   ======================================== */

* {
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
    min-height: 100vh;
}

/* ========================================
   WELCOME PAGE STYLES
   ======================================== */

.welcome-page {
    min-height: 100vh;
    background: var(--background-welcome);
    position: relative;
    overflow-x: hidden;
}

.welcome-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 25% 25%, rgba(139, 92, 246, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(236, 72, 153, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.2) 0%, transparent 50%);
    pointer-events: none;
}

.welcome-container {
    position: relative;
    z-index: 1;
    max-width: 500px;
    margin: 0 auto;
}

/* Welcome Hero Section */
.hero-section {
    backdrop-filter: blur(20px);
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem 1.5rem;
    box-shadow: var(--shadow-md);
}

.hero-icon {
    display: inline-flex;
    padding: 1rem;
    background: var(--glass);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
}

.hero-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    margin: 0;
}

.accent-text {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-weight: 900;
}
.accent-text-2 {
    background: linear-gradient(135deg, #f8fafc 0%, #9c1919 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-weight: 900;
}

.hero-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
}

/* Upload Components */
.upload-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 2rem 0;
}

.upload-card-wrapper {
    width: 100%;
}

.upload-card {
    backdrop-filter: blur(20px);
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.upload-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.person-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.person-number {
    width: 28px;
    height: 28px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.person-label {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
}

/* Gender Selector */
.gender-selector {
    display: flex;
    align-items: center;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.25rem;
    gap: 0.25rem;
}

.gender-option {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.gender-option i {
    font-size: 1rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.gender-selector.gender-female .gender-option:first-child {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
    color: white;
}

.gender-selector.gender-female .gender-option:first-child i {
    color: white;
}

.gender-selector.gender-male .gender-option:last-child {
    background: linear-gradient(135deg, var(--tertiary), var(--tertiary-dark));
    color: white;
}

.gender-selector.gender-male .gender-option:last-child i {
    color: white;
}

.gender-switch {
    appearance: none;
    width: 36px;
    height: 20px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gender-switch::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    width: 16px;
    height: 16px;
    background: var(--text-primary);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.gender-switch:checked::before {
    transform: translateX(16px);
}

/* Upload Zone */
.upload-zone {
    position: relative;
    border-radius: 16px;
    height: 200px;
    cursor: pointer;
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px dashed rgba(255, 255, 255, 0.3);
}

.upload-zone.gender-female {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.3) 0%, rgba(219, 39, 119, 0.5) 100%);
}

.upload-zone.gender-male {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.3) 0%, rgba(8, 145, 178, 0.5) 100%);
}

.upload-zone.upload-active {
    animation: pulse 2s infinite;
    border-color: rgba(255, 255, 255, 0.6);
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }

    50% {
        transform: scale(1.02);
        box-shadow: 0 0 0 8px rgba(255, 255, 255, 0);
    }
}

.upload-content {
    text-align: center;
    color: var(--text-primary);
    z-index: 2;
    position: relative;
}

.upload-icon-wrapper {
    width: 60px;
    height: 60px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    backdrop-filter: blur(10px);
}

.upload-icon {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.upload-text {
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.upload-hint {
    opacity: 0.8;
    font-size: 0.875rem;
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 3;
}

/* Preview Components */
.preview-image {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid transparent;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    margin: 0 auto;
    display: block;
}

.preview-image:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.gender-female-border {
    border-color: var(--secondary) !important;
}

.gender-male-border {
    border-color: var(--tertiary) !important;
}

/* Progress Components */
.upload-progress {
    text-align: center;
    padding: 1rem;
}

.progress-track {
    width: 100%;
    height: 6px;
    background: var(--glass);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary), var(--tertiary));
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Success State */
.upload-success {
    text-align: center;
    padding: 1rem;
}

.success-animation {
    margin: 0 auto 0.5rem;
}

.success-message {
    color: var(--success);
    font-weight: 600;
    font-size: 0.875rem;
    margin: 0;
}

/* Language Selection */
.language-section {
    text-align: center;
    margin: 2rem 0 1.5rem;
    backdrop-filter: blur(20px);
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.language-section:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.language-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.language-icon {
    font-size: 1.25rem;
    color: var(--text-primary);
    background: var(--glass);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.language-title {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
    margin: 0;
}

.language-selector-container {
    position: relative;
    max-width: 280px;
    margin: 0 auto 1rem;
}

.language-selector {
    width: 100%;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1rem 3rem 1rem 1.25rem;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    appearance: none;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
}

.language-selector:hover {
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: var(--shadow-md);
}

.language-selector:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}

.language-selector option {
    background: #1f2937;
    color: #ffffff;
    padding: 0.75rem;
    font-weight: 500;
}

.selector-arrow {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1rem;
    pointer-events: none;
    transition: all 0.3s ease;
}

.language-selector:focus+.selector-arrow {
    color: var(--primary);
    transform: translateY(-50%) rotate(180deg);
}

.language-note {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0;
    opacity: 0.9;
}

/* Action Components */
.action-section {
    text-align: center;
    margin-top: 1rem;
}

.match-button {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    border-radius: 16px;
    padding: 1rem 2rem;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 280px;
    box-shadow: var(--shadow-sm);
}

.match-button:hover:not(.disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.match-button.disabled {
    background: var(--glass);
    color: var(--text-muted);
    cursor: not-allowed;
}

.button-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    position: relative;
    z-index: 2;
}

.button-icon {
    font-size: 1.125rem;
    transition: transform 0.3s ease;
}

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

.button-shimmer {
    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.6s;
}

.match-button:hover:not(.disabled) .button-shimmer {
    left: 100%;
}

.match-button.pulse {
    animation: buttonPulse 1.5s infinite;
}

@keyframes buttonPulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: var(--shadow-sm);
    }

    50% {
        transform: scale(1.05);
        box-shadow: var(--shadow-md);
    }
}

.action-note {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 1rem;
    margin-bottom: 0;
}

/* ========================================
   RESULT PAGE STYLES
   ======================================== */

.result-page {
    background: var(--background-result);
    overflow: hidden;
    min-height: 100vh;
    height: 100vh;
}

/* Only apply custom scroll when results are shown */
.result-page:has(#result-container) {
    overflow: hidden;
    height: 100vh;
}

/* Allow normal scroll when scanning */
.result-page:has(#scan-container) {
    overflow: visible;
    height: auto;
}

.result-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(139, 92, 246, 0.4) 0%, transparent 60%),
        radial-gradient(circle at 80% 80%, rgba(236, 72, 153, 0.4) 0%, transparent 60%),
        radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.3) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

/* Scanning Components */
#scan-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
    position: relative;
    gap: 2rem;
}

/* Normal scroll for scan phase */
.result-page-body #scan-container {
    justify-content: flex-start;
    padding-top: 2rem;
    padding-bottom: 3rem;
}

/* Disable custom scroll system during scan */
.result-page-body:has(#scan-container) {
    overflow-y: auto !important;
}

.result-page-body:has(#scan-container) .result-page {
    overflow-y: visible !important;
    height: auto !important;
}

.scan-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    backdrop-filter: blur(20px);
    background: var(--glass-dark);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-result-md);
    transition: all 0.4s ease;
    min-width: 350px;
}

.scan-step.completed {
    background: var(--glass-light);
    border-color: var(--success);
    box-shadow: var(--shadow-result-lg);
}

.scan-img-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin-bottom: 2rem;
}

.scan-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--glass-border);
    position: relative;
    z-index: 2;
    box-shadow: var(--shadow-result-sm);
}

/* Lottie Animation Container */
.scan-lottie {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 260px;
    height: 260px;
    z-index: 3;
    pointer-events: none;
}

.scan-step h2 {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.scan-step p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 1.5rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.scan-badge {
    background: var(--glass-dark);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 0.5rem 1.25rem;
    border-radius: 20px;
    font-weight: 600;
    backdrop-filter: blur(15px);
    transition: all 0.4s ease;
    font-size: 1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.scan-badge.completed {
    background: linear-gradient(135deg, var(--success), #059669);
    border-color: var(--success);
    color: white;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

/* ========================================
   ANALYSIS SECTIONS STYLES
   ======================================== */

#result-container {
    min-height: 100vh;
    position: relative;
}

/* Navigation */
.analysis-navigation {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    backdrop-filter: blur(20px);
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 25px;
    padding: 1rem 0.5rem;
    box-shadow: var(--shadow-result-md);
}

.nav-dots {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
}

.nav-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-dot:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.nav-dot.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.5);
    transform: scale(1.3);
}

.dot-tooltip {
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 10;
}

.nav-dot:hover .dot-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(-5px);
}

/* Analysis Sections */
.analysis-sections {
    width: 100%;
    height: 100vh;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

.analysis-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    opacity: 1;
    transition: all 0.3s ease;
    scroll-snap-align: start;
}

.section-wrapper {
    backdrop-filter: blur(25px);
    background: var(--glass-dark);
    border: 2px solid var(--glass-border-strong);
    border-radius: 28px;
    padding: 2.5rem;
    box-shadow: var(--shadow-result-xl);
    max-width: 1200px;
    width: 100%;
    position: relative;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.analysis-section.active .section-wrapper {
    transform: translateY(0);
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-title {
    color: var(--text-primary);
    font-weight: 900;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, #fbbf24 50%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.2rem;
    line-height: 1.6;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    margin: 0;
}

/* Person Analysis Cards */
.analysis-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.person-analysis-card {
    backdrop-filter: blur(20px);
    background: var(--card-bg);
    border: 2px solid var(--glass-border-strong);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-result-md);
}

.person-analysis-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-result-xl);
    border-color: rgba(255, 255, 255, 0.6);
}

.person-analysis-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.1) 100%);
    pointer-events: none;
}

.person-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.person-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.person-analysis-card:hover .person-avatar {
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 1);
    box-shadow: var(--shadow-md);
}

.person-info h3 {
    color: var(--text-dark);
    font-weight: 700;
    font-size: 1.2rem;
    margin: 0 0 0.25rem 0;
}

.gender-icon {
    font-size: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.gender-icon.male {
    color: var(--tertiary);
}

.gender-icon.female {
    color: var(--secondary);
}

.analysis-text {
    color: var(--text-dark);
}

.analysis-text ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.analysis-text li {
    background: rgba(59, 130, 246, 0.1);
    margin-bottom: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    border-left: 4px solid var(--primary);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    color: var(--text-dark);
    font-weight: 500;
}

.analysis-text li:hover {
    background: rgba(59, 130, 246, 0.15);
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.analysis-text p {
    background: rgba(16, 185, 129, 0.1);
    padding: 1.25rem;
    border-radius: 12px;
    border-left: 4px solid var(--success);
    backdrop-filter: blur(5px);
    margin: 0;
    color: var(--text-dark);
    font-weight: 500;
    line-height: 1.6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Relationship Analysis */
.relationship-analysis {
    text-align: center;
}

.couple-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.person-mini {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.mini-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow-result-md);
    transition: all 0.3s ease;
}

.mini-avatar:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-result-lg);
}

.center-symbol {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-light);
    border: 2px solid var(--glass-border-strong);
    border-radius: 50%;
    padding: 1.5rem;
    backdrop-filter: blur(20px);
    animation: float 3s ease-in-out infinite;
    box-shadow: var(--shadow-result-md);
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-8px);
    }
}

.compatibility-score {
    font-size: 4rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--success) 0%, var(--warning) 30%, var(--secondary) 70%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 1.5rem 0;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.analysis-content-box {
    backdrop-filter: blur(20px);
    background: var(--card-bg);
    border: 2px solid var(--glass-border-strong);
    border-radius: 20px;
    padding: 2rem;
    color: var(--text-dark);
    max-width: 800px;
    margin: 0 auto;
    box-shadow: var(--shadow-result-md);
}

.analysis-content-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.analysis-content-box li {
    background: rgba(99, 102, 241, 0.1);
    margin-bottom: 1rem;
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--primary);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    color: var(--text-dark);
    font-weight: 500;
    line-height: 1.6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.analysis-content-box li:hover {
    background: rgba(99, 102, 241, 0.15);
    transform: translateX(5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.analysis-content-box p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-dark);
    font-weight: 500;
    margin: 0;
}

/* Share Button */
.share-button {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
    color: white;
    border: none;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.4s ease;
    z-index: 10;
    backdrop-filter: blur(15px);
    box-shadow: var(--shadow-result-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-button:hover:not(.processing) {
    transform: scale(1.1) rotate(15deg);
    box-shadow: var(--shadow-result-lg);
}

.share-button.processing {
    cursor: not-allowed;
    background: linear-gradient(135deg, var(--glass), var(--glass-dark));
    color: var(--text-muted);
    transform: scale(0.95);
    box-shadow: var(--shadow-sm);
}

.share-button:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

/* Spin animation for loading */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Loading and Success Animations */
.scan-loading {
    width: 20px;
    height: 20px;
    border: 2px solid var(--glass-border);
    border-radius: 50%;
    border-top-color: var(--scan-primary);
    animation: spin 1s linear infinite;
    flex-shrink: 0;
}

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

.checkmark {
    width: 20px;
    height: 20px;
    transform: rotate(45deg);
    position: relative;
    flex-shrink: 0;
    transform-origin: center;
    display: inline-block;
}

.checkmark::before {
    content: '';
    position: absolute;
    width: 3px;
    height: 10px;
    background: var(--text-primary);
    border-radius: 1px;
    left: 8px;
    top: 3px;
    animation: checkmark-stem 0.4s ease-in-out 0.1s both;
}

.checkmark::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 1px;
    left: 5px;
    top: 10px;
    animation: checkmark-kick 0.4s ease-in-out both;
}

@keyframes checkmark-stem {
    0% {
        height: 0;
    }

    100% {
        height: 10px;
    }
}

@keyframes checkmark-kick {
    0% {
        width: 0;
    }

    100% {
        width: 6px;
    }
}

/* ========================================
   MOBILE RESPONSIVENESS
   ======================================== */

/* Welcome Page Mobile */
@media (max-width: 576px) {
    .welcome-container {
        padding: 1rem;
    }

    .hero-section {
        padding: 1.5rem 1rem;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .upload-card {
        padding: 1rem;
    }

    .upload-zone {
        height: 160px;
    }

    .preview-image {
        width: 160px;
        height: 160px;
    }

    .upload-container {
        gap: 0.75rem;
        margin: 1.5rem 0;
    }

    .language-section {
        padding: 1.25rem 1rem;
        margin: 1.5rem 0 1rem;
    }

    .language-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    .language-selector-container {
        max-width: 100%;
    }
}

/* Welcome Page Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .welcome-container {
        max-width: 600px;
    }

    .upload-container {
        flex-direction: row;
        gap: 1rem;
    }

    .upload-card-wrapper {
        flex: 1;
    }

    .upload-zone {
        height: 140px;
    }

    .preview-image {
        width: 140px;
        height: 140px;
    }
}

/* Result Page Mobile */
@media (max-width: 768px) {

    /* Hide navigation dots on mobile */
    .analysis-navigation {
        display: none;
    }

    .analysis-sections {
        padding: 0;
    }

    .analysis-section {
        padding: 0;
        height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
    }

    .section-wrapper {
        padding: 1rem;
        margin: 0.5rem;
        border-radius: 16px;
        width: calc(100% - 1rem);
        max-width: none;
        transform: translateY(-2vh);
    }

    .section-header {
        margin-bottom: 1rem;
        text-align: left;
        position: relative;
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 1rem;
    }

    .section-header-content {
        flex: 1;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .section-subtitle {
        font-size: 0.9rem;
        line-height: 1.4;
    }

    /* Compact person analysis for mobile */
    .analysis-content {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        margin-top: 1rem;
    }

    .person-analysis-card {
        padding: 1rem;
        border-radius: 12px;
        border-width: 1px;
    }

    .person-header {
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
    }

    .person-avatar {
        width: 45px;
        height: 45px;
        border-width: 2px;
    }

    .person-info h3 {
        font-size: 1rem;
        margin-bottom: 0;
    }

    .gender-icon {
        font-size: 1.2rem;
    }

    .analysis-text {
        font-size: 0.9rem;
    }

    .analysis-text li {
        padding: 0.75rem 1rem;
        margin-bottom: 0.5rem;
        border-radius: 8px;
        font-size: 0.85rem;
        line-height: 1.4;
    }

    .analysis-text p {
        padding: 0.75rem 1rem;
        border-radius: 8px;
        font-size: 0.85rem;
        line-height: 1.4;
    }

    /* Relationship analysis mobile */
    .relationship-analysis {
        margin-top: 1rem;
    }

    .couple-header {
        flex-direction: row;
        gap: 1rem;
        margin-bottom: 1.5rem;
        justify-content: space-around;
    }

    .person-mini {
        gap: 0.25rem;
    }

    .mini-avatar {
        width: 50px;
        height: 50px;
        border-width: 2px;
    }

    .center-symbol {
        padding: 1rem;
    }

    .center-symbol svg {
        width: 35px !important;
        height: 35px !important;
    }

    .compatibility-score {
        font-size: 2.5rem;
        margin: 1rem 0;
    }

    .analysis-content-box {
        padding: 1rem;
        border-radius: 12px;
        border-width: 1px;
    }

    .analysis-content-box li {
        padding: 0.75rem 1rem;
        margin-bottom: 0.75rem;
        border-radius: 8px;
        font-size: 0.85rem;
        line-height: 1.4;
    }

    .analysis-content-box p {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    /* Scan steps mobile */
    #scan-container {
        padding: 1.5rem 1rem;
        gap: 1.5rem;
    }

    .scan-step {
        padding: 1.25rem;
        min-width: auto;
        width: 100%;
        max-width: 300px;
    }

    .scan-img-container {
        width: 120px;
        height: 120px;
        margin-bottom: 1rem;
    }

    .scan-step h2 {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }

    .scan-step p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    .scan-lottie {
        width: 160px;
        height: 160px;
    }

    .share-button {
        position: static;
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
        flex-shrink: 0;
        margin: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    .analysis-section {
        padding: 0;
        height: 100vh;
    }

    .section-wrapper {
        padding: 0.75rem;
        margin: 0.25rem;
        border-radius: 12px;
        width: calc(100% - 0.5rem);
        transform: translateY(-3vh);
    }

    .section-header {
        margin-bottom: 0.75rem;
    }

    .share-button {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .section-title {
        font-size: 1.3rem;
    }

    .section-subtitle {
        font-size: 0.8rem;
    }

    .person-analysis-card {
        padding: 0.75rem;
    }

    .person-avatar {
        width: 40px;
        height: 40px;
    }

    .person-info h3 {
        font-size: 0.9rem;
    }

    .analysis-text li,
    .analysis-text p {
        font-size: 0.8rem;
        padding: 0.6rem 0.8rem;
    }

    .compatibility-score {
        font-size: 2rem;
    }

    .mini-avatar {
        width: 45px;
        height: 45px;
    }

    .center-symbol {
        padding: 0.75rem;
    }

    .center-symbol svg {
        width: 30px !important;
        height: 30px !important;
    }

    .analysis-content-box {
        padding: 0.75rem;
    }

    .analysis-content-box li,
    .analysis-content-box p {
        font-size: 0.8rem;
        padding: 0.6rem 0.8rem;
    }

    #scan-container {
        padding: 1rem 0.75rem;
        gap: 1rem;
    }

    .scan-step {
        padding: 1rem;
        max-width: 280px;
    }

    .scan-img-container {
        width: 100px;
        height: 100px;
    }

    .scan-step h2 {
        font-size: 1.1rem;
    }

    .scan-step p {
        font-size: 0.85rem;
    }

    .scan-lottie {
        width: 140px;
        height: 140px;
    }
}