:root {
    --bg-gradient: linear-gradient(135deg, #FF416C 0%, #FF4B2B 100%);
    --bg-dark: #0f172a;
    --card-bg: rgba(255, 255, 255, 0.05);
    --border-color: rgba(255, 255, 255, 0.1);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --primary-color: #f43f5e;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --glass-blur: blur(16px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

#app-container {
    width: 100%;
    max-width: 480px; /* Mobile App simulation */
    height: 100vh;
    background: radial-gradient(circle at top right, rgba(244, 63, 94, 0.15), transparent 400px), 
                var(--bg-dark);
    position: relative;
    box-shadow: 0 0 40px rgba(0,0,0,0.5);
    overflow-y: auto;
    overflow-x: hidden;
}

/* Glassmorphism Classes */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Views setup (SPA logic hidden active) */
.view {
    display: none;
    min-height: 100vh;
    padding: 2rem 1.5rem;
    flex-direction: column;
    justify-content: center;
}
.view.active {
    display: flex;
    animation: fadeIn 0.4s ease forwards;
}
.view.auth-view {
    padding-bottom: 80px; /* space for bottom nav */
    justify-content: flex-start;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Typography elements */
h1 { font-size: 2.2rem; margin-bottom: 0.5rem; font-weight: 700; background: linear-gradient(to right, #ff7eb3, #ff758c); -webkit-background-clip: text; color: transparent;}
h2 { font-size: 1.8rem; margin-bottom: 1.5rem; font-weight: 600; }
.subtitle { color: var(--text-secondary); margin-bottom: 2rem; }

/* Forms */
.input-group { margin-bottom: 1.2rem; }
input[type="text"], input[type="password"], input[type="number"], select, textarea {
    width: 100%;
    padding: 1rem 1.2rem;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary-color); background: rgba(0,0,0,0.4); }

/* Radio Group */
.radio-group { display: flex; gap: 1rem; margin-bottom: 1.5rem; }
.radio-group label { display: flex; align-items: center; gap: 0.5rem; color: var(--text-secondary); cursor: pointer;}
.radio-group input { accent-color: var(--primary-color); }

/* Buttons */
.btn { width: 100%; padding: 1rem; border-radius: 12px; border: none; font-size: 1rem; font-weight: 600; cursor: pointer; transition: transform 0.2s, opacity 0.2s; }
.btn:hover { opacity: 0.9; transform: scale(0.98); }
.btn-primary { background: var(--bg-gradient); color: white; box-shadow: 0 4px 15px rgba(244, 63, 94, 0.4); }
.btn-secondary { background: rgba(255,255,255,0.1); color: white; border: 1px solid var(--border-color); }
.btn-danger { background: rgba(220, 38, 38, 0.8); color: white; }
.btn-text { background: transparent; color: var(--text-secondary); }

.switch-view { margin-top: 1.5rem; text-align: center; color: var(--text-secondary); font-size: 0.9rem;}
.switch-view a { color: var(--primary-color); text-decoration: none; font-weight: 600; }

/* Bottom Nav */
.bottom-nav {
    position: fixed;
    bottom: 0;
    width: 100%;
    max-width: 480px;
    height: 70px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
}
.nav-item {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: color 0.3s;
}
.nav-item.active { color: var(--primary-color); font-weight: 600; }

/* Swipe Logic Base */
.swipe-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem;}
.limits { font-size: 0.85rem; color: var(--text-secondary); background: rgba(0,0,0,0.3); padding: 0.4rem 0.8rem; border-radius: 20px;}
.card-stack { width: 100%; height: 400px; position: relative; perspective: 1000px; }
.card { 
    position: absolute; width: 100%; height: 100%; background: var(--card-bg); border-radius: 20px;
    display: flex; justify-content: center; align-items: center; font-size: 1.5rem; color: var(--text-secondary);
    border: 1px solid var(--border-color); box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    background-size: cover; background-position: center;
}
.swipe-actions { display: flex; justify-content: center; gap: 1.5rem; margin-top: 2rem; }
.btn-action { 
    width: 60px; height: 60px; border-radius: 50%; border: none; font-size: 1.5rem; cursor: pointer;
    background: rgba(255,255,255,0.05); color: white; display: flex; justify-content: center; align-items: center;
    transition: all 0.3s; box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.btn-dislike { color: #f43f5e; }
.btn-superlike { color: #3b82f6; width: 50px; height: 50px; }
.btn-like { color: #10b981; }
.btn-action:hover { transform: scale(1.1); }

/* Profile View */
.wallet-section { margin-top: 2rem; background: rgba(0,0,0,0.2); padding: 1.5rem; border-radius: 16px; border: 1px solid var(--primary-color); text-align: center; }

/* Matches */
.matches-list { display: flex; flex-direction: column; gap: 1rem; }
.match-item { 
    display: flex; align-items: center; gap: 1rem; background: var(--card-bg); padding: 1rem; border-radius: 16px; 
    cursor: pointer; transition: background 0.2s;
}
.match-item:hover { background: rgba(255,255,255,0.1); }
.match-avatar { width: 50px; height: 50px; border-radius: 50%; background: #333; overflow: hidden; }
.match-avatar img { width: 100%; height: 100%; object-fit: cover; }
.match-info { flex: 1; display: flex; flex-direction: column; }
.match-name { font-weight: 600; font-size: 1.1rem; }
.match-preview { color: var(--text-secondary); font-size: 0.9rem; }
.match-item.blurred .match-avatar img { filter: blur(5px); }
.match-item.blurred .match-name { color: var(--text-secondary); }

/* Chat View */
.chat-header { display: flex; align-items: center; gap: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border-color); margin-bottom: 1rem;}
.btn-back { background: transparent; border: none; color: white; font-size: 1.5rem; cursor: pointer; }
.btn-game { margin-left: auto; background: var(--secondary-color); color: white; border: none; padding: 0.5rem 1rem; border-radius: 12px; cursor: pointer; font-weight: 600; }
.chat-messages { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1rem; }
.message { max-width: 80%; padding: 0.8rem 1rem; border-radius: 16px; font-size: 0.95rem; }
.msg-incoming { align-self: flex-start; background: var(--card-bg); border-bottom-left-radius: 4px; }
.msg-outgoing { align-self: flex-end; background: var(--bg-gradient); border-bottom-right-radius: 4px; }
.chat-input-area { display: flex; gap: 0.5rem; }
.chat-input-area input { flex: 1; border-radius: 20px; }
.chat-input-area button { background: var(--primary-color); border: none; color: white; width: 50px; border-radius: 50%; cursor: pointer; display: flex; justify-content: center; align-items: center; }

/* Utility */
.hide { display: none !important; }
