/* public/assets/css/index.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Outfit:wght@700;800&display=swap');

:root {
    /* Rich Dark Mode Palette */
    --bg-base: #0B0E14;
    --bg-surface: #151A22;
    --bg-surface-glass: rgba(21, 26, 34, 0.7);
    --primary: #F0A500;
    /* Subtle Gold/Orange referencing CS */
    --primary-glow: rgba(240, 165, 0, 0.3);
    --accent: #FF5A5F;
    --text-primary: #F8F9FA;
    --text-secondary: #ABB2BF;
    --border-color: rgba(255, 255, 255, 0.05);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.02em;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    filter: brightness(1.2);
}

/* Layout */
#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Glass Navbar */
nav {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: var(--bg-surface-glass);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-item {
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
}

.nav-item:hover,
.nav-item.active {
    color: var(--text-primary);
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Inter', sans-serif;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-primary {
    background: var(--primary);
    color: var(--bg-base);
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-steam {
    background: #171A21;
    color: white;
    border: 1px solid #66C0F4;
}

.btn-steam:hover {
    background: #66C0F4;
    color: #171A21;
    transform: translateY(-2px);
}

/* Utilities */
.logged-in,
.logged-out {
    display: none;
    /* Toggled via JS */
}

.p-4 {
    padding: 2rem;
}

/* Containers */
main {
    flex: 1;
    padding: 3rem 5%;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.hero {
    text-align: center;
    padding: 8rem 2rem;
    max-width: 100%;
    margin: 0 auto;
    background-image: linear-gradient(to bottom, rgba(11, 14, 20, 0.5), rgba(11, 14, 20, 1)), url('../images/hero-bg.webp');
    background-size: cover;
    background-position: center;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #a0a0a0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 2.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

/* Grid System */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

/* Cards (Glassmorphism) */
.card,
.match-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover,
.match-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.match-card img.avatar-bg {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-bottom: 1px solid var(--border-color);
}

/* Tinder Swiper CSS */
.swiper-container {
    position: relative;
    width: 100%;
    max-width: 380px;
    height: 550px;
    margin: 0 auto;
}

.swipe-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
    display: flex;
    flex-direction: column;
    user-select: none;
    -webkit-user-drag: none;
    touch-action: none;
}

.swipe-card.dragging {
    transition: none;
    cursor: grabbing;
}

.swipe-card-image-wrap {
    position: relative;
    width: 100%;
    flex-grow: 1;
    overflow: hidden;
    background: #000;
}

.swipe-card img.avatar-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    opacity: 0.85;
    /* darkens the image slightly for text readability */
}

/* Glassmorphism gradient for text over image */
.swipe-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 3rem 1.5rem 1rem 1.5rem;
    background: linear-gradient(to top, rgba(11, 20, 30, 0.95) 0%, rgba(11, 20, 30, 0.6) 50%, rgba(0, 0, 0, 0) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.swipe-card-name {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: white;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    gap: 8px;
}

.swipe-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 0;
}

.user-badge {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.user-badge i {
    opacity: 0.85;
}

.swipe-controls {
    display: flex;
    justify-content: space-around;
    padding: 1rem;
    background: var(--bg-surface);
}

.swipe-btn {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition);
}

.swipe-btn-pass {
    background: rgba(255, 50, 50, 0.1);
    color: #ff4444;
    border: 2px solid #ff4444;
}

.swipe-btn-like {
    background: rgba(50, 255, 50, 0.1);
    color: #44ff44;
    border: 2px solid #44ff44;
}

.swipe-btn-pass:hover {
    background: #ff4444;
    color: white;
    transform: scale(1.1);
}

.swipe-btn-like:hover {
    background: #44ff44;
    color: white;
    transform: scale(1.1);
}

.match-info {
    padding: 1.5rem;
}

.match-info h3 {
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
}

.match-info p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.match-meta {
    display: inline-block;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem !important;
    margin-bottom: 1.5rem !important;
}

/* Custom SVG Icons */
.svg-icon {
    width: 24px;
    height: 24px;
    vertical-align: middle;
    margin-right: 0.5rem;
    filter: invert(1) opacity(0.7);
    /* make them whitish to fit dark mode */
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: white;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
}

select.form-control option {
    background: var(--bg-base);
    color: var(--text-primary);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
}

/* User Avatar */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

/* Lang Switcher Dropdown */
.lang-switcher {
    position: relative;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    user-select: none;
    transition: var(--transition);
}

.lang-switcher:hover {
    background: rgba(255, 255, 255, 0.1);
}

.dropdown-selected {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dropdown-options {
    position: absolute;
    top: 120%;
    right: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    min-width: 140px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
    overflow: hidden;
}

.lang-switcher.open .dropdown-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.lang-option:hover,
.lang-option.active {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    color: white;
    font-weight: 500;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    animation: slideInRight 0.3s ease forwards;
    opacity: 0;
    transform: translateX(100%);
}

@keyframes slideInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.toast-pass {
    background: #ff4444;
}

.toast.toast-like {
    background: #44ff44;
    color: #111;
}

.toast.toast-match {
    background: var(--primary);
    color: #111;
}

.toast.hiding {
    animation: slideOutRight 0.3s ease forwards;
}

@keyframes slideOutRight {
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}