/* =========================================
   STEPOUT GAMES - BAJNOKSÁG
   Vanilla JS Version - Main Styles
   ========================================= */

/* --- CSS Variables --- */
:root {
    --primary: #E24C29;
    --primary-dark: #c53d1d;
    --secondary: #0f6ea2;
    --secondary-dark: #0a5580;
    --bg-dark: #0a1628;
    --bg-card: #1a2d45;
    --bg-input: #0d1f35;
    --text: #ffffff;
    --text-secondary: #a0b4c8;
    --text-muted: #6b7d8f;
    --border: #2a4060;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --transition: all 0.3s ease;
}

/* --- Reset & Base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    /* Háttérkép - pont mint a baggermannban */
    background: url('../../img/back.jpg') center/cover no-repeat fixed;
    background-size: cover;
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--text);
}

/* --- Navigation (Baggermann style) --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 2rem;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.nav-brand {
    position: absolute;
    left: 2rem;
    text-decoration: none;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    height: 70px;
}

.nav-logo {
    height: 50px;
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.1rem;
    flex-wrap: nowrap;
}

.nav-link {
    color: var(--text);
    padding: 0.5rem 0.75rem;
    font-weight: 500;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: var(--transition);
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link.active {
    color: var(--primary);
}

.nav-auth-inline {
    display: contents;
}

.nav-auth-inline .nav-link {
    color: var(--text);
}

.nav-auth-inline .nav-link:hover {
    color: var(--primary);
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    position: absolute;
    right: 1rem;
}

.mobile-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    background: rgba(15, 95, 145, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1rem;
    flex-direction: column;
    z-index: 999;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}

.mobile-menu.active {
    display: flex;
}

.mobile-link {
    color: var(--text);
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    font-weight: 500;
    text-decoration: none;
    display: block;
    text-align: center;
    font-size: 1rem;
}

.mobile-link:hover,
.mobile-link:active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary);
}

.mobile-auth {
    display: flex;
    flex-direction: column;
}

.mobile-auth .mobile-link {
    border-bottom: 1px solid var(--border);
    color: #ffffff;
    font-weight: 600;
}

@media (max-width: 900px) {
    .nav-links,
    .nav-auth {
        display: none;
    }
    
    .mobile-toggle {
        display: flex;
    }
}

/* --- Main Content --- */
.main-content {
    margin-top: 70px;
    min-height: calc(100vh - 70px - 60px);
    padding: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    overflow-x: hidden;
}

.page {
    animation: fadeIn 0.3s ease;
    overflow-x: hidden;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Welcome Section (Baggermann style) --- */
.welcome-section {
    text-align: center;
    padding: 3rem 2rem 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.welcome-title {
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    color: #fff;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.welcome-text {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.welcome-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    max-width: 400px;
    margin: 0 auto;
}

.welcome-btn {
    display: block;
    width: 100%;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.welcome-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .welcome-title {
        font-size: 1.8rem;
    }
    
    .welcome-text {
        font-size: 1rem;
    }
    
    .welcome-section {
        padding: 2rem 1rem;
    }
}

/* --- Hero Section --- */
.hero {
    text-align: center;
    padding: 4rem 2rem;
    background: rgba(8, 35, 60, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius);
    margin-bottom: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero h1 span {
    color: var(--primary);
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* --- City Filter Bar --- */
.city-filter-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
}

.city-filter-bar label {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text);
}

.city-select {
    min-width: 200px;
    background: rgba(8, 35, 60, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* --- Hero Menu (Baggermann style) --- */
.hero-menu {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 350px;
    margin: 0 auto;
}

.btn-menu {
    display: block;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 30px;
    color: var(--text);
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
}

.btn-menu:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    color: var(--text);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(226, 76, 41, 0.4);
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background: var(--secondary-dark);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* --- Cards --- */
.card {
    background: rgba(8, 35, 60, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

/* --- Forms --- */
.form-group {
    margin-bottom: 1.25rem;
    overflow: hidden;
    min-width: 0;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea,
.form-group select,
.select {
    width: 100%;
    max-width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 1rem;
    transition: var(--transition);
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* iOS date input fix */
input[type="date"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    min-width: 0;
    max-width: 100%;
    min-height: 50px;
    height: 50px;
    line-height: 50px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 1rem;
    padding: 0.875rem 1rem;
}

input[type="date"]::-webkit-date-and-time-value {
    text-align: left;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus,
.select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(226, 76, 41, 0.2);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-hint {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

@media (max-width: 480px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* --- Auth Pages --- */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 140px);
    width: 100%;
    padding: 2rem 1rem;
    box-sizing: border-box;
}

.auth-card {
    background: rgba(8, 35, 60, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.auth-card h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary);
}

.auth-link {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-secondary);
}

/* --- Page Header --- */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page h1 {
    margin-bottom: 1.5rem;
}

/* --- Filters --- */
.filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filters .select {
    min-width: 200px;
}

/* --- Leaderboard --- */
.leaderboard {
    background: rgba(8, 35, 60, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
}

.leaderboard-item {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.leaderboard-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.leaderboard-item:last-child {
    border-bottom: none;
}

.leaderboard-rank {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-muted);
}

.leaderboard-item:nth-child(1) .leaderboard-rank,
.leaderboard-item.top-1 .leaderboard-rank { color: #ffd700; }
.leaderboard-item:nth-child(2) .leaderboard-rank,
.leaderboard-item.top-2 .leaderboard-rank { color: #c0c0c0; }
.leaderboard-item:nth-child(3) .leaderboard-rank,
.leaderboard-item.top-3 .leaderboard-rank { color: #cd7f32; }

.leaderboard-item.top-1 { background: rgba(255, 215, 0, 0.08); border-left: 3px solid #ffd700; }
.leaderboard-item.top-2 { background: rgba(192, 192, 192, 0.08); border-left: 3px solid #c0c0c0; }
.leaderboard-item.top-3 { background: rgba(205, 127, 50, 0.08); border-left: 3px solid #cd7f32; }

.leaderboard-info h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.leaderboard-info span {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.leaderboard-points {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--success);
}

/* --- Teams Grid --- */
.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.team-card {
    background: rgba(8, 35, 60, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

.team-card h3 {
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.team-card .team-city {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.team-card .team-stats {
    display: flex;
    gap: 1.5rem;
}

.team-card .team-stat {
    text-align: center;
}

.team-card .team-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--success);
}

.team-card .team-stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* --- Events --- */
.events-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.event-card {
    background: rgba(8, 35, 60, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1.5rem;
    align-items: center;
    transition: var(--transition);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
}

.event-card:hover {
    border-color: var(--primary);
}

.event-date {
    text-align: center;
    background: var(--primary);
    color: white;
    padding: 1rem;
    border-radius: var(--radius-sm);
    min-width: 80px;
}

.event-date .day {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
}

.event-date .month {
    font-size: 0.85rem;
    text-transform: uppercase;
}

.event-info h3 {
    margin-bottom: 0.5rem;
}

.event-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.event-info .event-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

/* --- Stats Grid --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(8, 35, 60, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* --- Search --- */
.search-box {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.search-input {
    flex: 1;
    padding: 1rem 1.5rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 1rem;
}

.search-results {
    min-height: 200px;
}

.search-count {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.hint {
    color: var(--text-muted);
    text-align: center;
    padding: 3rem;
}

/* --- Modals --- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: rgba(18, 85, 135, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 1.25rem;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--danger);
}

.modal-body {
    padding: 1.5rem;
}

/* --- Toast --- */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    background: rgba(18, 85, 135, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius-sm);
    padding: 1rem 1.5rem;
    border-left: 4px solid var(--primary);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.25);
    animation: slideIn 0.3s ease;
    max-width: 350px;
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }

@keyframes slideIn {
    from { opacity: 0; transform: translateX(100px); }
    to { opacity: 1; transform: translateX(0); }
}

/* --- Loading --- */
.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 0.5rem;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --- Section --- */
.section {
    margin-bottom: 3rem;
}

.section h2 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

/* --- Footer --- */
.footer {
    background: rgba(5, 20, 35, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 4rem;
    padding: 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 2rem;
    align-items: start;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-logo {
    display: flex;
    align-items: center;
}

.footer-logo-img {
    height: 50px;
    width: auto;
    display: block;
}

.footer-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-contact {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.footer-social a {
    color: var(--text-secondary);
    transition: var(--transition);
}

.footer-social a:hover {
    color: var(--primary);
}

.footer-email,
.footer-phone {
    color: var(--text);
    font-size: 0.95rem;
}

.footer-email:hover,
.footer-phone:hover {
    color: var(--primary);
}

.footer-legal {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.footer-legal:hover {
    color: var(--primary);
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 2rem;
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0;
}

/* Footer responsive */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .footer-brand {
        align-items: center;
    }
    
    .footer-contact {
        align-items: center;
    }
}

/* --- Empty State --- */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
    }
    
    .auth-page {
        padding: 1rem 0.75rem;
    }
    
    .auth-card {
        padding: 1.5rem;
        max-width: 100%;
    }
    
    .hero {
        padding: 2rem 1rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .event-card {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .toast-container {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }
    
    .toast {
        max-width: 100%;
    }
}

/* --- Utility Classes --- */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* --- Back Link --- */
.back-link {
    display: inline-flex;
    align-items: center;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    transition: var(--transition);
}

.back-link:hover {
    color: var(--primary);
}

/* --- Event Details Page --- */

/* Full Event Banner */
.event-full-banner {
    background: linear-gradient(135deg, #dc3545, #c82333);
    border-radius: var(--radius);
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.event-full-banner .full-icon {
    font-size: 2.5rem;
}

.event-full-banner .full-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.event-full-banner .full-subtext {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

.event-full-message {
    text-align: center;
    padding: 2rem;
}

.event-full-message p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.event-register-card.event-full {
    border: 2px solid var(--danger);
    opacity: 0.9;
}

.text-danger {
    color: var(--danger) !important;
    font-weight: 600;
}

/* --- Photo Buttons --- */
.photo-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.photo-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(15, 60, 110, 0.9);
    border: 2px solid rgba(100, 180, 255, 0.5);
    border-radius: var(--radius);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.photo-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.photo-btn-camera:hover {
    border-color: var(--primary);
    background: rgba(226, 76, 41, 0.2);
}

.photo-btn.selected {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.2);
}

/* Field validation error state */
.field-error {
    border-color: #ff6b6b !important;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.3) !important;
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

/* Checkbox styling for forms */
.checkbox-group {
    margin: 1rem 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
    -webkit-appearance: checkbox;
    -moz-appearance: checkbox;
    appearance: auto;
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    margin-top: 2px;
    accent-color: var(--primary);
    cursor: pointer;
    padding: 0;
    border: 2px solid var(--border);
    border-radius: 4px;
    background: var(--bg-input);
    flex-shrink: 0;
}

.checkbox-label span {
    color: var(--text-secondary);
}

.checkbox-label .privacy-link {
    color: var(--primary);
    text-decoration: underline;
    font-weight: 600;
}

.checkbox-label .privacy-link:hover {
    color: var(--accent);
}

/* Spots badge on event cards */
.spots-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.spots-badge.available {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.spots-badge.full {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.event-card.event-full {
    opacity: 0.7;
    border-color: var(--danger);
}

/* --- Registration Success Page --- */
.success-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.success-card {
    background: rgba(8, 35, 60, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius);
    padding: 3rem;
    text-align: center;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.success-icon-large {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    animation: bounce 1s ease-in-out;
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.success-card h1 {
    font-size: 2rem;
    color: var(--success);
    margin-bottom: 1rem;
}

.success-team-name {
    font-size: 1.3rem;
    color: var(--text);
    margin-bottom: 2rem;
}

.success-info {
    text-align: left;
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
}

.success-info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.success-info-item:last-child {
    margin-bottom: 0;
}

.success-info-item .info-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.success-info-item p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.5;
}

.success-info-item strong {
    color: var(--primary);
}

.success-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.success-actions .btn {
    padding: 0.875rem 2rem;
}

@media (max-width: 600px) {
    .success-card {
        padding: 2rem 1.5rem;
    }
    
    .success-icon-large {
        font-size: 4rem;
    }
    
    .success-card h1 {
        font-size: 1.5rem;
    }
    
    .success-actions {
        flex-direction: column;
    }
    
    .success-actions .btn {
        width: 100%;
    }
}

.event-details-header {
    background: linear-gradient(135deg, rgba(10, 25, 45, 0.95), rgba(5, 50, 80, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.event-details-header h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.event-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.event-meta-item {
    color: var(--text-secondary);
    font-size: 1rem;
}

.event-details-body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.event-details-body .card h3 {
    margin-bottom: 1rem;
    color: var(--primary);
    font-size: 1.2rem;
}

.event-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.event-info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.event-info-item strong {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.event-info-item span {
    font-size: 1.1rem;
    font-weight: 500;
}

.event-register-card {
    background: linear-gradient(135deg, var(--bg-card), rgba(226, 76, 41, 0.1));
    border: 2px solid var(--primary);
}

.event-register-card h3 {
    color: var(--primary) !important;
}

@media (max-width: 768px) {
    .event-details-header h1 {
        font-size: 1.5rem;
    }
    
    .event-meta {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* --- Success Message --- */
.success-message {
    text-align: center;
    padding: 2rem;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.success-message h4 {
    color: var(--success);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.success-message p {
    margin-bottom: 0.5rem;
}

/* --- Form Input Phone --- */
input[type="tel"] {
    font-family: inherit;
}

/* --- Team Actions --- */
.team-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* --- Invite Link Box --- */
.invite-link-box {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.invite-link-box input {
    flex: 1;
    font-size: 0.85rem;
    background: var(--bg-dark);
    color: var(--primary);
    font-weight: 500;
}

.invite-share-buttons {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.btn-success {
    background: #25D366;
    color: white;
}

.btn-success:hover {
    background: #1da851;
}

/* --- Divider --- */
.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1.5rem 0;
}

/* --- Modal h4 --- */
.modal-body h4 {
    margin-bottom: 1rem;
    font-size: 1rem;
    color: var(--text-secondary);
}

/* --- Points History --- */
.points-history {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: rgba(8, 35, 60, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: var(--radius);
    padding: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.point-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    padding: 1rem 1.25rem;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.point-item:hover {
    border-color: var(--primary);
    transform: translateX(5px);
}

.point-item.verified {
    border-left: 4px solid var(--success);
}

.point-item.pending {
    border-left: 4px solid var(--warning);
}

.point-item.rejected {
    border-left: 4px solid var(--danger);
    opacity: 0.6;
}

.point-info {
    flex: 1;
}

.point-team {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.35rem;
    color: var(--primary);
}

.point-details {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.point-value {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-align: right;
}

.point-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--success);
    min-width: 60px;
}

.point-status {
    font-size: 1.5rem;
}

.points-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0.5rem;
}

.points-history-header h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--text-secondary);
}

.points-history-total {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--success);
}

/* --- Home Page Mini Components --- */
.leaderboard-mini {
    background: rgba(8, 35, 60, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
}

.leaderboard-mini .leaderboard-item {
    padding: 0.875rem 1.25rem;
}

.events-preview {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.events-preview .event-card {
    background: rgba(8, 35, 60, 0.9);
}
