:root {
    /* Color Palette */
    --bg-dark: #090a0f;
    --card-bg: #161824;
    --card-bg-light: #202336;
    --accent-neon: #ccff00;
    --accent-neon-glow: rgba(204, 255, 0, 0.4);
    --text-main: #ffffff;
    --text-muted: #8e92a4;
    --danger: #ff4757;
    --success: #2ed573;
    
    /* Typography */
    --font-main: 'Outfit', sans-serif;
    
    /* Spacing & Borders */
    --border-radius-lg: 24px;
    --border-radius-md: 16px;
    --border-radius-sm: 8px;
    --nav-height: 70px;
    --header-height: 60px;
}

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

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

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

/* Header */
.app-header {
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    background: rgba(9, 10, 15, 0.8);
    backdrop-filter: blur(10px);
    z-index: 100;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
}

.logo i {
    color: var(--accent-neon);
    font-size: 1.2rem;
}

.header-actions {
    display: flex;
    gap: 15px;
}

.action-btn {
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.2rem;
    cursor: pointer;
    position: relative;
    transition: color 0.3s ease;
}

.action-btn:hover {
    color: var(--accent-neon);
}

.notification::after {
    content: attr(data-count);
    position: absolute;
    top: -5px;
    right: -8px;
    background-color: var(--danger);
    color: white;
    font-size: 0.6rem;
    font-weight: bold;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Main Content */
.app-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    padding-bottom: var(--nav-height);
    scrollbar-width: none;
}
.app-content::-webkit-scrollbar { display: none; }

/* Bottom Navigation */
.bottom-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background: rgba(22, 24, 36, 0.9);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding-bottom: 10px; /* Safe area for iOS */
    z-index: 100;
}

.nav-item {
    background: none;
    border: none;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-family: var(--font-main);
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.nav-item i {
    font-size: 1.4rem;
    transition: transform 0.3s ease;
}

.nav-item.active {
    color: var(--accent-neon);
}

.nav-item.active i {
    transform: translateY(-5px);
    text-shadow: 0 0 10px var(--accent-neon-glow);
}

.nav-item .badge {
    position: absolute;
    top: -2px;
    right: 5px;
    background: var(--accent-neon);
    color: #000;
    font-size: 0.6rem;
    font-weight: 800;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* View Containers */
.view {
    display: none;
    height: 100%;
    width: 100%;
    animation: fadeIn 0.4s ease forwards;
}

.view.active {
    display: flex;
    flex-direction: column;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

/* --- Discover View (Swipe) --- */
.discover-container {
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.card-stack {
    position: relative;
    width: 100%;
    max-width: 350px;
    height: 60vh;
    perspective: 1000px;
}

.player-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--card-bg);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.4s ease;
    transform-origin: 50% 100%;
    display: flex;
    flex-direction: column;
}

.player-card.swiped-right {
    transform: translateX(120%) rotate(15deg);
    opacity: 0;
}

.player-card.swiped-left {
    transform: translateX(-120%) rotate(-15deg);
    opacity: 0;
}

.player-photo {
    width: 100%;
    height: 65%;
    object-fit: cover;
    background: #333; /* Placeholder */
}

.player-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(to top, var(--card-bg) 70%, transparent);
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 50%;
}

.player-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.player-name {
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.player-age {
    font-weight: 400;
    color: var(--text-muted);
}

.verified-badge {
    color: #1da1f2;
    font-size: 1rem;
}

.player-level {
    background: rgba(204, 255, 0, 0.15);
    color: var(--accent-neon);
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    border: 1px solid rgba(204, 255, 0, 0.3);
}

.player-tags {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.tag {
    background: var(--card-bg-light);
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

.swipe-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.swipe-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.btn-reject {
    background: #1e1e1e;
    color: var(--danger);
    border: 2px solid rgba(255, 71, 87, 0.2);
}

.btn-accept {
    background: var(--accent-neon);
    color: #000;
    box-shadow: 0 0 20px var(--accent-neon-glow);
}

/* --- Map View --- */
.map-view {
    padding: 0;
    position: relative;
}
.map-placeholder {
    width: 100%;
    height: 100%;
    background: url('https://images.unsplash.com/photo-1524661135-423995f22d0b?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80') center/cover;
    position: relative;
}
.map-overlay {
    position: absolute;
    inset: 0;
    background: rgba(9, 10, 15, 0.6);
}
.map-pins {
    position: absolute;
    inset: 0;
}
.pin {
    position: absolute;
    width: 40px;
    height: 40px;
    background: var(--card-bg);
    border: 2px solid var(--accent-neon);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 15px var(--accent-neon-glow);
    cursor: pointer;
    transform: translate(-50%, -50%);
    transition: transform 0.3s;
}
.pin:hover { transform: translate(-50%, -50%) scale(1.1); }
.pin img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.pin.court { border-color: white; background: var(--success); color: #000; font-weight: bold; }

.bottom-panel {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: rgba(22, 24, 36, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius-md);
    padding: 15px;
    border: 1px solid rgba(255,255,255,0.1);
}

/* --- Modals & Utilities --- */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: none;
    align-items: flex-end;
}
.overlay.active { display: flex; }

.bottom-sheet {
    width: 100%;
    background: var(--card-bg);
    border-radius: 24px 24px 0 0;
    padding: 30px 20px;
    animation: slideUp 0.3s ease forwards;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.modal-handle {
    width: 40px;
    height: 4px;
    background: var(--text-muted);
    border-radius: 2px;
    margin: -10px auto 20px;
}

.filter-group {
    margin: 20px 0;
}
.filter-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
}

input[type=range] {
    width: 100%;
    accent-color: var(--accent-neon);
}

.btn-primary {
    width: 100%;
    padding: 15px;
    background: var(--accent-neon);
    color: #000;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 10px;
}

/* --- Messages View --- */
.messages-list {
    padding: 10px;
}
.chat-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--card-bg);
    border-radius: var(--border-radius-md);
    margin-bottom: 10px;
    cursor: pointer;
    transition: background 0.2s;
}
.chat-item:active { background: var(--card-bg-light); }
.chat-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}
.chat-info { flex: 1; }
.chat-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}
.chat-name { font-weight: 600; }
.chat-time { font-size: 0.8rem; color: var(--text-muted); }
.chat-preview {
    font-size: 0.9rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.unread { color: var(--text-main); font-weight: 600; }
.unread-dot {
    width: 10px; height: 10px;
    background: var(--accent-neon);
    border-radius: 50%;
}

/* --- Profile View --- */
.profile-view { padding: 20px; }
.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 30px;
}
.profile-avatar-wrapper {
    position: relative;
    margin-bottom: 15px;
}
.profile-avatar {
    width: 120px; height: 120px;
    border-radius: 50%;
    border: 3px solid var(--accent-neon);
    object-fit: cover;
}
.edit-avatar {
    position: absolute;
    bottom: 0; right: 0;
    background: var(--card-bg-light);
    width: 35px; height: 35px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--bg-dark);
}
.stats-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 30px;
}
.stat-box {
    background: var(--card-bg);
    padding: 20px;
    border-radius: var(--border-radius-md);
    text-align: center;
}
.stat-value { font-size: 1.8rem; font-weight: 800; color: var(--accent-neon); }
.stat-label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-top: 5px; }

/* AI Verification Feature */
.ai-verify-banner {
    background: linear-gradient(45deg, rgba(204,255,0,0.1), rgba(46,213,115,0.1));
    border: 1px solid rgba(204,255,0,0.3);
    padding: 15px;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}
.ai-icon {
    font-size: 2rem;
    color: var(--accent-neon);
}
.ai-text h4 { margin-bottom: 5px; }
.ai-text p { font-size: 0.8rem; color: var(--text-muted); }
