/* ========================================
   MATCH OU METE - UFU ENGENHARIA
   Mobile-First Optimized Styles
   ======================================== */

:root {
    /* UFU Colors */
    --ufu-black: #000000;
    --ufu-yellow: #FFD700;
    --ufu-yellow-dark: #FFC700;
    --ufu-yellow-light: #FFED4E;

    /* Grays */
    --gray-900: #1a1a1a;
    --gray-800: #2d2d2d;
    --gray-700: #404040;
    --gray-600: #525252;
    --gray-500: #737373;
    --gray-400: #a3a3a3;

    /* States */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;

    /* Spacing - Mobile First */
    --space-xs: 0.5rem;
    /* 8px */
    --space-sm: 0.75rem;
    /* 12px */
    --space-md: 1rem;
    /* 16px */
    --space-lg: 1.5rem;
    /* 24px */
    --space-xl: 2rem;
    /* 32px */

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Touch Targets - Minimum 44px */
    --touch-min: 44px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(255, 215, 0, 0.1);
    --shadow-md: 0 4px 15px rgba(255, 215, 0, 0.2);
    --shadow-lg: 0 8px 25px rgba(255, 215, 0, 0.3);
}

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

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 50%, #2d2d2d 100%);
    color: white;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    font-size: 16px;
    /* Base font size for mobile */
    line-height: 1.6;
}

/* ========================================
   BUTTONS - Mobile Optimized
   ======================================== */

.btn-primary {
    background: linear-gradient(135deg, var(--ufu-yellow) 0%, var(--ufu-yellow-dark) 100%);
    color: var(--ufu-black);
    padding: 16px 32px;
    /* Larger for mobile */
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1.0625rem;
    /* 17px - optimal for mobile */
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: var(--shadow-md);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-height: var(--touch-min);
    width: 100%;
    /* Full width on mobile */
    touch-action: manipulation;
    /* Prevent double-tap zoom */
}

.btn-primary:active {
    transform: scale(0.98);
    box-shadow: var(--shadow-sm);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--ufu-yellow);
    color: var(--ufu-yellow);
    padding: 14px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9375rem;
    /* 15px */
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-height: var(--touch-min);
    touch-action: manipulation;
}

.btn-secondary:active {
    background: var(--ufu-yellow);
    color: var(--ufu-black);
    transform: scale(0.98);
}

.btn-icon {
    min-width: var(--touch-min);
    min-height: var(--touch-min);
    border-radius: var(--radius-full);
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    color: var(--ufu-yellow);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    touch-action: manipulation;
}

.btn-icon:active {
    background: var(--ufu-yellow);
    color: var(--ufu-black);
    transform: scale(0.95);
}

/* Logout Button */
.btn-logout {
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid var(--error);
    color: var(--error);
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: var(--touch-min);
    touch-action: manipulation;
}

.btn-logout:active {
    background: var(--error);
    color: white;
    transform: scale(0.98);
}

/* ========================================
   CARDS - Mobile Optimized
   ======================================== */

.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 215, 0, 0.2);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    padding: var(--space-lg);
    /* More padding on mobile */
}

/* ========================================
   GENDER & INTEREST SELECTION
   ======================================== */

.gender-btn,
.interest-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    color: white;
    font-weight: 500;
    min-height: 100px;
    /* Larger touch target */
    font-size: 1.0625rem;
    touch-action: manipulation;
}

.gender-btn:active,
.interest-btn:active {
    transform: scale(0.98);
}

.gender-btn.selected,
.interest-btn.selected {
    background: linear-gradient(135deg, var(--ufu-yellow) 0%, var(--ufu-yellow-dark) 100%);
    border-color: var(--ufu-yellow);
    color: var(--ufu-black);
    box-shadow: var(--shadow-lg);
}

/* ========================================
   QUIZ COMPONENTS - Mobile Optimized
   ======================================== */

.question-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
    border: 1px solid rgba(255, 215, 0, 0.2);
    transition: all 0.3s ease;
}

.question-number {
    display: inline-flex;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--ufu-yellow);
    color: var(--ufu-black);
    font-weight: 700;
    font-size: 1.125rem;
    /* Larger for mobile */
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-sm);
}

.question-text {
    font-size: 1.0625rem;
    /* 17px - easier to read */
    line-height: 1.6;
    margin-bottom: var(--space-md);
}

/* ========================================
   SLIDER - Mobile Optimized
   ======================================== */

.slider-container {
    margin-top: var(--space-md);
    padding: var(--space-md) 0;
}

.slider {
    -webkit-appearance: none;
    width: 100%;
    height: 12px;
    /* Thicker for mobile */
    border-radius: var(--radius-full);
    background: linear-gradient(to right,
            var(--gray-700) 0%,
            var(--ufu-yellow) 50%,
            var(--ufu-yellow-light) 100%);
    outline: none;
    transition: all 0.3s ease;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 36px;
    /* Larger for easier touch */
    height: 36px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--ufu-yellow) 0%, var(--ufu-yellow-dark) 100%);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 3px solid var(--ufu-black);
}

.slider::-webkit-slider-thumb:active {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.7);
}

.slider::-moz-range-thumb {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--ufu-yellow) 0%, var(--ufu-yellow-dark) 100%);
    cursor: pointer;
    border: 3px solid var(--ufu-black);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.5);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: var(--space-sm);
    font-size: 0.9375rem;
    /* 15px */
    color: var(--gray-400);
    font-weight: 500;
}

.slider-value {
    color: var(--ufu-yellow);
    font-weight: 700;
    font-size: 1.25rem;
    /* Larger value display */
}

/* ========================================
   MATCH CARDS - Mobile Optimized
   ======================================== */

.match-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    border: 1px solid rgba(255, 215, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: slideIn 0.5s ease;
    margin-bottom: var(--space-md);
}

.match-card:active {
    transform: scale(0.98);
    border-color: var(--ufu-yellow);
}

.match-name {
    font-size: 1.25rem;
    /* Larger name */
    font-weight: 700;
    color: var(--ufu-yellow);
    margin-bottom: var(--space-sm);
}

.match-info {
    font-size: 1rem;
    color: var(--gray-400);
    margin-bottom: var(--space-sm);
}

/* ========================================
   COMPATIBILITY BADGES
   ======================================== */

.compatibility-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 1rem;
    /* Larger for mobile */
    letter-spacing: 0.5px;
}

.compatibility-high {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.compatibility-medium {
    background: linear-gradient(135deg, var(--ufu-yellow) 0%, var(--ufu-yellow-dark) 100%);
    color: var(--ufu-black);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

.compatibility-low {
    background: linear-gradient(135deg, var(--gray-600) 0%, var(--gray-500) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(115, 115, 115, 0.4);
}

/* ========================================
   PROGRESS BAR
   ======================================== */

.progress-container {
    width: 100%;
    height: 10px;
    /* Thicker for visibility */
    background: var(--gray-800);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--ufu-yellow) 0%, var(--ufu-yellow-light) 100%);
    border-radius: var(--radius-full);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   TIMER
   ======================================== */

.timer-display {
    font-size: 2.5rem;
    /* Optimized for mobile */
    font-weight: 800;
    color: var(--ufu-yellow);
    text-align: center;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.05em;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

/* ========================================
   PHOTO UPLOAD - NEW
   ======================================== */

.photo-upload-container {
    margin: var(--space-lg) 0;
}

.photo-preview {
    width: 150px;
    height: 150px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.05);
    border: 3px dashed rgba(255, 215, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-md);
    overflow: hidden;
    position: relative;
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-placeholder {
    font-size: 3rem;
    color: var(--gray-500);
}

.photo-buttons {
    display: flex;
    gap: var(--space-sm);
    flex-direction: column;
}

.btn-photo {
    background: rgba(255, 215, 0, 0.1);
    border: 2px solid var(--ufu-yellow);
    color: var(--ufu-yellow);
    padding: 14px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: var(--touch-min);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    touch-action: manipulation;
}

.btn-photo:active {
    background: var(--ufu-yellow);
    color: var(--ufu-black);
    transform: scale(0.98);
}

/* ========================================
   LOADING SPINNER
   ======================================== */

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 215, 0, 0.2);
    border-top: 4px solid var(--ufu-yellow);
    border-radius: var(--radius-full);
    animation: spin 1s linear infinite;
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   SCREEN MANAGEMENT
   ======================================== */

.screen {
    display: none;
    min-height: 100vh;
    padding: var(--space-md);
}

.screen.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

/* ========================================
   SCROLLBAR
   ======================================== */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-900);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--ufu-yellow) 0%, var(--ufu-yellow-dark) 100%);
    border-radius: var(--radius-sm);
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.text-yellow {
    color: var(--ufu-yellow);
}

.text-black {
    color: var(--ufu-black);
}

.bg-yellow {
    background: var(--ufu-yellow);
}

.bg-black {
    background: var(--ufu-black);
}

.hidden {
    display: none !important;
}

/* ========================================
   RESPONSIVE - Desktop Enhancements
   ======================================== */

@media (min-width: 768px) {
    .btn-primary {
        width: auto;
        /* Not full width on desktop */
        padding: 14px 32px;
    }

    .photo-buttons {
        flex-direction: row;
    }

    .timer-display {
        font-size: 3rem;
    }

    .screen {
        padding: var(--space-xl);
    }

    /* Hover effects only on desktop */
    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-lg);
    }

    .btn-secondary:hover {
        background: var(--ufu-yellow);
        color: var(--ufu-black);
    }

    .glass-card:hover {
        border-color: rgba(255, 215, 0, 0.4);
        transform: translateY(-2px);
    }

    .match-card:hover {
        transform: translateX(8px);
        border-color: var(--ufu-yellow);
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
button:focus-visible,
input:focus-visible {
    outline: 3px solid var(--ufu-yellow);
    outline-offset: 2px;
}