/* 
 * ARENA BEACH TENNIS - DESIGN SYSTEM
 * Estilo: Brutalista Moderno / High Tech
 * Geometria: Bordas afiadas (0px - 2px)
 * Paleta: Laranja Areia, Azul Profundo, Branco Neve
 */

:root {
    --primary: #FF6B00;
    /* Laranja Vibrante (Areia/Energia) */
    --secondary: #001F3F;
    /* Azul Marinho Profundo */
    --accent: #FFD700;
    /* Ouro (Vencedor) */
    --bg-dark: #0A0A0A;
    /* Fundo Dark */
    --text-light: #F0F0F0;
    --text-dim: #A0A0A0;
    --sharp-radius: 2px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Rajdhani', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
.logo {
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* HEADER */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--primary);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.auth-box {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.login-btn {
    background: white;
    color: #444;
    border: 1px solid #ddd;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 4px;
}

.login-btn:hover {
    background: #f1f1f1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-name {
    font-family: 'Rajdhani', sans-serif;
    color: var(--primary);
    font-weight: 700;
}

.logout-btn {
    background: transparent;
    color: var(--text-dim);
    border: 1px solid #444;
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s;
}

.logout-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
}

.logo span {
    color: var(--primary);
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-nav a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary);
}

/* HERO SECTION - Topological Choice: Fragmented Asymmetry */
.hero {
    height: 90vh;
    display: flex;
    align-items: center;
    padding: 0 5%;
    position: relative;
    background: linear-gradient(135deg, #0A0A0A 60%, rgba(255, 107, 0, 0.05));
}

.hero-content h1 {
    font-size: clamp(2.5rem, 8vw, 5rem);
    line-height: 1;
    margin-bottom: 2rem;
}

.hero-content h1 span {
    color: var(--primary);
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-dim);
    max-width: 600px;
    margin-bottom: 3rem;
    border-left: 2px solid var(--primary);
    padding-left: 1.5rem;
}

/* BUTTONS - Sharp edges mandate */
.hero-actions {
    display: flex;
    gap: 1.5rem;
}

.primary-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    cursor: pointer;
    border-radius: var(--sharp-radius);
    transition: transform 0.2s, box-shadow 0.2s;
    text-transform: uppercase;
}

.primary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 107, 0, 0.4);
}

.secondary-btn {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 1rem 2.5rem;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    cursor: pointer;
    border-radius: var(--sharp-radius);
    transition: all 0.2s;
    text-transform: uppercase;
}

.secondary-btn:hover {
    background: var(--primary);
    color: white;
}

/* PAGE SECTIONS */
.page-section {
    padding: 100px 5%;
    min-height: 80vh;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 3rem;
    border-bottom: 4px solid var(--primary);
    display: inline-block;
}

.section-title span {
    color: var(--primary);
}

/* RANKING TABLE */
.ranking-container {
    background: rgba(255, 255, 255, 0.03);
    padding: 2rem;
    border: 1px solid rgba(255, 107, 0, 0.1);
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1.2rem;
}

.ranking-table th {
    text-align: left;
    padding: 1rem;
    color: var(--text-dim);
    text-transform: uppercase;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    border-bottom: 2px solid var(--primary);
}

.ranking-table td {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ranking-table tr.top-three td:nth-child(2) {
    color: var(--accent);
    font-weight: 700;
}

.loading,
.empty-state,
.error-state {
    text-align: center;
    padding: 4rem;
    color: var(--text-dim);
    font-style: italic;
}

/* BOOKING SYSTEM */
.booking-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.courts-selector {
    display: grid;
    gap: 1.5rem;
}

.court-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-left: 5px solid transparent;
    cursor: pointer;
    transition: all 0.3s;
}

.court-card:hover {
    background: rgba(255, 107, 0, 0.1);
}

.court-card.active {
    border-left-color: var(--primary);
    background: rgba(255, 107, 0, 0.15);
}

.court-card h4 {
    margin-bottom: 0.5rem;
}

.hide {
    display: none;
}

.high-tech-form {
    display: grid;
    gap: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-group {
    display: grid;
    gap: 0.5rem;
}

.form-group label {
    text-transform: uppercase;
    font-size: 0.8rem;
    color: var(--text-dim);
}

.form-group input {
    background: #1a1a1a;
    border: 1px solid #333;
    color: white;
    padding: 0.8rem;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.1rem;
}

.full-width {
    width: 100%;
}

.wide-form {
    max-width: 800px;
    width: 100%;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.form-helper {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* AGENDA STYLES */
.filter-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: center;
}

.high-tech-input {
    background: #1a1a1a;
    border: 1px solid var(--primary);
    color: white;
    padding: 0.8rem;
    font-family: 'Rajdhani', sans-serif;
}

.agenda-grid {
    display: grid;
    gap: 1rem;
}

.agenda-card {
    display: grid;
    grid-template-columns: 150px 1fr 120px;
    background: rgba(255, 255, 255, 0.05);
    border-left: 4px solid var(--primary);
    padding: 1.5rem;
    align-items: center;
}

.agenda-time {
    font-family: 'Orbitron', sans-serif;
    color: var(--primary);
    font-size: 1.1rem;
}

.agenda-court {
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
}

.agenda-player {
    color: var(--text-dim);
}

.agenda-status {
    text-align: right;
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 700;
}

.agenda-status.confirmed {
    color: #00FF88;
}

.empty-agenda {
    text-align: center;
    padding: 5rem;
    background: rgba(255, 107, 0, 0.03);
    border: 1px dashed var(--primary);
}

@media (max-width: 768px) {
    .agenda-card {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .agenda-status {
        text-align: left;
    }
}

/* MOBILE RESPONSIVENESS */
@media (max-width: 768px) {
    .booking-grid {
        grid-template-columns: 1fr;
    }

    .main-nav {
        display: none;
    }

    .hero {
        text-align: center;
        justify-content: center;
    }

    .hero-content p {
        border-left: none;
        padding-left: 0;
        margin: 0 auto 3rem auto;
    }

    .hero-actions {
        flex-direction: column;
        gap: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .ranking-container {
        padding: 1rem;
        overflow-x: auto;
    }

    .ranking-table {
        font-size: 1rem;
    }
}