:root {
    --bg-dark: #0A0A0C;
    --bg-card: #15151A;
    --bg-card-hover: #1E1E26;
    --primary: #FF416C;
    --primary-gradient: linear-gradient(135deg, #FF4B2B 0%, #FF416C 100%);
    --text-main: #FFFFFF;
    --text-muted: #8E8E9F;
    --border-color: rgba(255, 255, 255, 0.08);
    --pass-color: #FD5D5D;
    --super-color: #00E4FF;
    --like-color: #1CEE89;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #000;
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

/* App Container (Mobile Constraints on Desktop) */
.app-container {
    width: 100%;
    max-width: 480px;
    height: 100vh;
    height: 100dvh;
    background-color: var(--bg-dark);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 0 50px rgba(255, 65, 108, 0.1);
}

@media (min-width: 481px) {
    .app-container {
        height: 90vh;
        border-radius: 40px;
        border: 8px solid #1A1A1A;
    }
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    z-index: 10;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 24px;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-icon {
    font-size: 28px;
    color: var(--primary);
    -webkit-text-fill-color: initial;
}

.header-actions {
    position: relative;
    color: var(--text-muted);
}

.pulse-ring {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    background-color: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(255, 65, 108, 0.7);
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 65, 108, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(255, 65, 108, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 65, 108, 0); }
}

/* Main Area */
.app-main {
    flex: 1;
    position: relative;
    overflow: hidden;
    padding: 0 20px 20px;
}

/* Screens */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 0 20px 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: translateX(20px);
}

.screen.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

/* Buttons */
.action-btn {
    width: 100%;
    padding: 18px;
    border-radius: 100px;
    border: none;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.action-btn:active {
    transform: scale(0.97);
}

.action-btn.primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 10px 20px rgba(255, 65, 108, 0.3);
}

.action-btn.secondary {
    background: transparent;
    color: var(--text-muted);
    margin-top: 10px;
}

.action-btn.hidden {
    display: none;
}

.pulse {
    animation: pulse-btn 2s infinite;
}

@keyframes pulse-btn {
    0% { box-shadow: 0 0 0 0 rgba(255, 65, 108, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(255, 65, 108, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 65, 108, 0); }
}

/* --- STEP 1: Radar --- */
#screen-radar {
    justify-content: center;
    align-items: center;
    text-align: center;
}

.radar-container {
    position: relative;
    width: 250px;
    height: 250px;
    margin-bottom: 40px;
}

.radar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(255, 65, 108, 0.2);
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 50px rgba(255, 65, 108, 0.1);
}

.radar::before, .radar::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(255, 65, 108, 0.1);
    border-radius: 50%;
}
.radar::before { width: 66%; height: 66%; }
.radar::after { width: 33%; height: 33%; }

.sweep {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50%;
    height: 50%;
    background: conic-gradient(from 0deg, transparent 70%, rgba(255, 65, 108, 0.8) 100%);
    transform-origin: 0% 0%;
    animation: sweep 2s linear infinite;
}

@keyframes sweep {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.profile-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: var(--bg-card);
    border: 2px solid var(--primary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

.profile-center span {
    color: var(--primary);
}

.dot {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #1CEE89;
    border-radius: 50%;
    box-shadow: 0 0 10px #1CEE89;
    opacity: 0;
}

.dot-1 { top: 20%; left: 30%; animation: blink 2s infinite 0.5s; }
.dot-2 { top: 70%; left: 60%; animation: blink 2s infinite 1.2s; }
.dot-3 { top: 40%; left: 80%; animation: blink 2s infinite 1.8s; }

@keyframes blink {
    0%, 100% { opacity: 0; transform: scale(0.5); }
    50% { opacity: 1; transform: scale(1); }
}

.radar-text h2 {
    font-size: 24px;
    margin-bottom: 8px;
}
.radar-text p {
    color: var(--text-muted);
    font-size: 16px;
    margin-bottom: 30px;
}

/* --- STEP 2: Cards --- */
#screen-cards {
    justify-content: flex-end;
}

.card-stack {
    flex: 1;
    position: relative;
    width: 100%;
    margin-bottom: 20px;
}

.profile-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.profile-image {
    flex: 1;
    position: relative;
    background: url('https://images.unsplash.com/photo-1529626455594-4ff0802cfb7e?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80') center/cover;
}

.blur-overlay {
    position: absolute;
    inset: 0;
    backdrop-filter: blur(20px) brightness(0.7);
    -webkit-backdrop-filter: blur(20px) brightness(0.7);
}

.distance-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    border: 1px solid rgba(255,255,255,0.1);
}

.distance-badge span.material-symbols-rounded {
    font-size: 14px;
}

.online-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(255,255,255,0.1);
}

.online-badge .dot {
    position: static;
    width: 8px;
    height: 8px;
    opacity: 1;
    animation: none;
}

.profile-info {
    padding: 20px;
    background: linear-gradient(to top, var(--bg-card) 60%, transparent);
    position: absolute;
    bottom: 0;
    width: 100%;
}

.profile-info h3 {
    font-size: 28px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-info h3 .age {
    font-weight: 400;
}

.profile-info .bio {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.4;
}

.action-row {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    padding: 10px 0 20px;
}

.circle-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

.circle-btn:active {
    transform: scale(0.9);
}

.circle-btn span {
    font-size: 30px;
}

.pass-btn span { color: var(--pass-color); }
.super-btn { width: 50px; height: 50px; }
.super-btn span { color: var(--super-color); font-size: 24px; }
.like-btn span { color: var(--like-color); }

/* --- STEP 3: Match & Intent --- */
#screen-match {
    justify-content: center;
}

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

.match-sparkles {
    width: 80px;
    height: 80px;
    background: rgba(255, 65, 108, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 20px;
    color: var(--primary);
}

.match-sparkles span {
    font-size: 40px;
}

.match-header h2 {
    font-size: 36px;
    color: var(--primary);
    margin-bottom: 10px;
    font-style: italic;
}

.match-header p {
    font-size: 18px;
    color: var(--text-muted);
}

.intent-question h3 {
    font-size: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.intent-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.intent-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: 16px;
    color: white;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
}

.intent-btn:hover, .intent-btn:active {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.intent-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--primary);
}

.intent-content h4 {
    font-size: 16px;
    margin-bottom: 4px;
}

.intent-content span {
    font-size: 13px;
    color: var(--text-muted);
}

/* --- STEP 4: Final Age Gate --- */
#screen-final {
    justify-content: center;
}

.final-container {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 30px 20px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.warning-icon {
    width: 64px;
    height: 64px;
    background: rgba(255, 184, 0, 0.1);
    color: #FFB800;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 20px;
}

.warning-icon span {
    font-size: 32px;
}

.final-container h2 {
    font-size: 24px;
    margin-bottom: 20px;
}

.warning-box {
    background: rgba(255, 65, 108, 0.1);
    border-left: 4px solid var(--primary);
    padding: 15px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 25px;
    text-align: left;
    font-size: 14px;
    line-height: 1.5;
}

.final-question {
    font-size: 16px;
    margin-bottom: 30px;
    color: var(--text-muted);
}

.trust-indicators {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.trust-item span {
    font-size: 18px;
    color: #fff;
}

/* --- Toasts --- */
.toast {
    position: absolute;
    top: 80px;
    right: 20px;
    transform: translateX(120%);
    background: rgba(25, 25, 30, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    padding: 12px 18px 12px 12px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 100;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
    opacity: 0;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

.toast-text {
    font-size: 13px;
}
