/**
 * EnjoyTheGame 3x3 - Styles
 * Official brand design system for basketball tournament registration
 */

/* ================================
   Google Fonts
   ================================ */
@import url('https://fonts.googleapis.com/css2?family=Righteous&display=swap');

/* ================================
   CSS Variables
   ================================ */
:root {
    /* Brand Colors */
    --etg-teal: #0A4355;
    --etg-teal-dark: #082F3D;
    --etg-orange: #F9720D;
    --etg-orange-dark: #D85F00;
    --etg-red: #DB4936;
    --etg-beige: #E3C3A1;
    --etg-cream: #FDF6ED;
    --etg-sand: #F5E6D3;

    /* Semantic mapping */
    --etg-primary: var(--etg-orange);
    --etg-primary-dark: var(--etg-orange-dark);
    --etg-secondary: var(--etg-teal);
    --etg-secondary-dark: var(--etg-teal-dark);
    --etg-accent: var(--etg-red);
    --etg-bg-page: var(--etg-cream);
    --etg-bg-card: #FFFFFF;
    --etg-text-primary: var(--etg-teal);

    /* Status colors */
    --etg-success: #28a745;
    --etg-danger: #dc3545;
    --etg-warning: #ffc107;
    --etg-info: #17a2b8;

    /* Background shades */
    --etg-light: var(--etg-sand);
    --etg-dark: var(--etg-teal);

    /* Gradients */
    --etg-gradient: linear-gradient(135deg, var(--etg-orange), var(--etg-red));
    --etg-gradient-teal: linear-gradient(135deg, var(--etg-teal), var(--etg-teal-dark));

    /* Shadows (teal tint) */
    --etg-shadow: 0 4px 20px rgba(10, 67, 85, 0.08);
    --etg-shadow-hover: 0 8px 30px rgba(10, 67, 85, 0.12);

    /* Typography */
    --etg-font-heading: 'Righteous', cursive;
    --etg-font-body: 'Futura', 'Trebuchet MS', Arial, sans-serif;

    /* Border radius */
    --etg-radius: 16px;
    --etg-radius-sm: 8px;
}

/* ================================
   Typography Base
   ================================ */
h1, h2, h3, h4, h5, h6,
.etg-hero-title,
.etg-section-title,
.etg-page-header h1 {
    font-family: var(--etg-font-heading);
    color: var(--etg-text-primary);
}

body {
    font-family: var(--etg-font-body);
    color: var(--etg-text-primary);
    line-height: 1.6;
}

/* ================================
   Base Container
   ================================ */
.etg-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.etg-landing {
    background: var(--etg-bg-page);
}

/* Page background override */
.etg-page-bg {
    background: var(--etg-bg-page);
    min-height: 100vh;
}

/* ================================
   User Bar (Logged-in)
   ================================ */
.etg-user-bar {
    background: var(--etg-secondary);
    color: white;
    padding: 0.75rem 0;
}

.etg-user-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.etg-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.etg-user-info i {
    font-size: 1.5rem;
}

.etg-user-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.etg-user-actions .btn {
    white-space: nowrap;
}

@media (max-width: 576px) {
    .etg-user-bar-content {
        flex-direction: column;
        text-align: center;
    }

    .etg-user-info,
    .etg-user-actions {
        justify-content: center;
    }
}

/* ================================
   Hero Section
   ================================ */
.etg-hero {
    background: var(--etg-gradient-teal);
    padding: 6rem 0;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Hero with background image */
.etg-hero.etg-hero-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.etg-hero.etg-hero-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(10, 67, 85, 0.85) 0%, rgba(8, 47, 61, 0.9) 100%);
    z-index: 0;
}

.etg-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" stroke="rgba(255,255,255,0.08)" fill="none" stroke-width="2"/></svg>') repeat;
    opacity: 0.5;
    z-index: 0;
    pointer-events: none;
}

.etg-hero-content {
    position: relative;
    z-index: 1;
}

.etg-hero-logo {
    width: 180px;
    height: auto;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.3));
}

.etg-hero-title {
    font-family: var(--etg-font-heading);
    font-size: 3.5rem;
    font-weight: 400;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    color: white;
}

.etg-hero-subtitle {
    font-size: 1.5rem;
    opacity: 0.95;
    margin-bottom: 2rem;
    font-weight: 300;
}

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

.etg-hero-actions .btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: var(--etg-radius);
    font-weight: 600;
    transition: all 0.3s ease;
}

/* Primary CTA button (orange) */
.etg-hero-actions .btn-primary,
.btn-etg-primary {
    background: var(--etg-orange);
    border-color: var(--etg-orange);
    color: white;
}

.etg-hero-actions .btn-primary:hover,
.btn-etg-primary:hover {
    background: var(--etg-orange-dark);
    border-color: var(--etg-orange-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(249, 114, 13, 0.4);
}

/* Secondary CTA button (white/light) */
.etg-hero-actions .btn-light,
.btn-etg-secondary {
    background: white;
    border-color: white;
    color: var(--etg-teal);
}

.etg-hero-actions .btn-light:hover,
.btn-etg-secondary:hover {
    background: var(--etg-sand);
    border-color: var(--etg-sand);
    color: var(--etg-teal);
    transform: translateY(-2px);
}

/* Teal button variant */
.btn-etg-teal {
    background: var(--etg-teal);
    border-color: var(--etg-teal);
    color: white;
}

.btn-etg-teal:hover {
    background: var(--etg-teal-dark);
    border-color: var(--etg-teal-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(10, 67, 85, 0.3);
}

/* Outline variants */
.btn-outline-etg {
    background: transparent;
    border: 2px solid var(--etg-orange);
    color: var(--etg-orange);
}

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

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

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

/* ================================
   Sections
   ================================ */
.etg-section {
    padding: 4rem 0;
}

.etg-section.etg-section-sand {
    background: var(--etg-sand);
}

.etg-section.etg-section-white {
    background: white;
}

.etg-section-title {
    text-align: center;
    font-family: var(--etg-font-heading);
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 3rem;
    color: var(--etg-teal);
}

.etg-section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--etg-gradient);
    margin: 0.75rem auto 0;
    border-radius: 2px;
}

/* How It Works */
.etg-step-card {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: var(--etg-radius);
    box-shadow: var(--etg-shadow);
    height: 100%;
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
}

.etg-step-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--etg-shadow-hover);
}

.etg-step-number {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: var(--etg-gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

.etg-step-card h4 {
    margin-top: 0.5rem;
    color: var(--etg-secondary);
}

/* ================================
   Team Cards
   ================================ */
.etg-team-card {
    background: white;
    border-radius: var(--etg-radius);
    padding: 1.75rem;
    box-shadow: var(--etg-shadow);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

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

.etg-team-card-full {
    height: 100%;
}

.etg-team-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    background: var(--etg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.etg-team-logo.large {
    width: 120px;
    height: 120px;
}

.etg-team-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.etg-team-logo i {
    font-size: 2rem;
    color: var(--etg-primary);
}

.etg-team-name {
    font-weight: 600;
    color: var(--etg-secondary);
    margin-bottom: 0.75rem;
}

.etg-team-captain {
    color: #666;
    font-size: 0.9rem;
}

.etg-team-captain i {
    color: var(--etg-warning);
}

.etg-team-description {
    color: #666;
    font-size: 0.85rem;
    margin: 0.75rem 0;
}

.etg-team-stats {
    margin-top: 0.5rem;
}

.etg-team-stats .badge {
    margin: 0 0.25rem;
}

/* ================================
   CTA Section
   ================================ */
.etg-cta {
    background: var(--etg-gradient-teal);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.etg-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" stroke="rgba(255,255,255,0.05)" fill="none" stroke-width="2"/></svg>') repeat;
    opacity: 0.5;
}

.etg-cta > * {
    position: relative;
    z-index: 1;
}

.etg-cta h2 {
    font-family: var(--etg-font-heading);
    font-size: 2rem;
    margin-bottom: 1rem;
    font-weight: 400;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.etg-cta p {
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.etg-cta-buttons {
    margin-top: 2rem;
}

.etg-cta-buttons .btn-primary {
    background: var(--etg-orange);
    border-color: var(--etg-orange);
}

.etg-cta-buttons .btn-primary:hover {
    background: var(--etg-orange-dark);
    border-color: var(--etg-orange-dark);
}

/* ================================
   Forms
   ================================ */
.etg-form-wrapper {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: var(--etg-radius);
    box-shadow: var(--etg-shadow);
}

.etg-form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.etg-form-header-logo {
    width: 100px;
    height: auto;
    margin-bottom: 1rem;
}

.etg-form-header h1 {
    font-family: var(--etg-font-heading);
    font-size: 1.75rem;
    color: var(--etg-teal);
    margin-bottom: 0.5rem;
}

.etg-form-header p {
    color: var(--etg-teal);
    opacity: 0.8;
}

.etg-form-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--etg-sand);
    border-radius: var(--etg-radius-sm);
    border-left: 4px solid var(--etg-orange);
}

.etg-form-section h5 {
    font-family: var(--etg-font-heading);
    color: var(--etg-teal);
    margin-bottom: 1rem;
    font-weight: 400;
}

.etg-form-section label {
    color: var(--etg-teal);
    font-weight: 500;
}

.etg-form-actions {
    text-align: center;
}

.etg-back-link {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--etg-teal);
    text-decoration: none;
    opacity: 0.8;
}

.etg-back-link:hover {
    color: var(--etg-orange);
    opacity: 1;
}

/* Form control focus states */
.etg-form-wrapper .form-control:focus,
.etg-form-section .form-control:focus {
    border-color: var(--etg-orange);
    box-shadow: 0 0 0 0.2rem rgba(249, 114, 13, 0.15);
}

.etg-form-wrapper .form-select:focus,
.etg-form-section .form-select:focus {
    border-color: var(--etg-orange);
    box-shadow: 0 0 0 0.2rem rgba(249, 114, 13, 0.15);
}

/* ================================
   Invite Code
   ================================ */
.etg-invite-code {
    font-size: 2rem;
    font-weight: bold;
    font-family: monospace;
    letter-spacing: 0.2em;
    padding: 1rem;
    background: var(--etg-light);
    border-radius: var(--etg-radius-sm);
    margin: 1rem 0;
    color: var(--etg-primary);
}

.etg-code-input {
    font-size: 1.5rem;
    font-family: monospace;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

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

.etg-success-icon {
    font-size: 4rem;
    color: var(--etg-success);
    margin-bottom: 1rem;
}

.etg-success-message h3 {
    color: var(--etg-secondary);
    margin-bottom: 1rem;
}

.etg-success-actions {
    margin-top: 2rem;
}

/* ================================
   Empty State
   ================================ */
.etg-empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

/* ================================
   Cards
   ================================ */
.etg-card {
    background: white;
    border-radius: var(--etg-radius);
    padding: 1.5rem;
    box-shadow: var(--etg-shadow);
    margin-bottom: 1.5rem;
}

.etg-card h4 {
    color: var(--etg-secondary);
    margin-bottom: 1rem;
    font-weight: 600;
}

/* ================================
   Status Badges
   ================================ */
.etg-status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.etg-status-badge.status-pending {
    background: #fff3cd;
    color: #856404;
}

.etg-status-badge.status-active {
    background: #cce5ff;
    color: #004085;
}

.etg-status-badge.status-approved {
    background: #d4edda;
    color: #155724;
}

.etg-status-badge.status-rejected {
    background: #f8d7da;
    color: #721c24;
}

.etg-status-badge.status-accepted {
    background: #d4edda;
    color: #155724;
}

.etg-status-badge.status-cancelled {
    background: #e2e3e5;
    color: #383d41;
}

/* ================================
   Roster
   ================================ */
.etg-roster-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.etg-roster-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: var(--etg-light);
    border-radius: var(--etg-radius-sm);
}

.etg-roster-player {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.etg-jersey-number {
    width: 40px;
    height: 40px;
    background: var(--etg-primary);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.etg-jersey-number-large {
    width: 80px;
    height: 80px;
    background: var(--etg-gradient);
    color: white;
    border-radius: var(--etg-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 2rem;
}

.etg-player-icon {
    font-size: 2.5rem;
    color: #ccc;
}

.etg-roster-info strong {
    display: block;
}

.etg-roster-info .text-muted {
    font-size: 0.85rem;
}

/* ================================
   Requests
   ================================ */
.etg-requests-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.etg-request-item {
    padding: 1rem;
    background: var(--etg-light);
    border-radius: var(--etg-radius-sm);
    border-left: 4px solid var(--etg-warning);
}

.etg-request-player {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.etg-request-player i {
    font-size: 2rem;
    color: #ccc;
}

.etg-request-info strong {
    display: block;
}

.etg-request-info .text-muted {
    font-size: 0.85rem;
    display: block;
}

.etg-request-message {
    font-style: italic;
    color: #666;
    margin: 0.5rem 0;
    padding-left: 1rem;
    border-left: 2px solid #ddd;
}

.etg-request-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

/* ================================
   Quick Access Login
   ================================ */
.etg-quick-access {
    background: white;
    padding: 3rem 0;
}

.etg-login-card {
    background: var(--etg-light);
    padding: 1.5rem;
    border-radius: var(--etg-radius);
    text-align: center;
}

.etg-login-card h5 {
    margin-bottom: 1rem;
    color: var(--etg-secondary);
}

.etg-login-wrapper {
    max-width: 400px;
}

.etg-login-footer {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

/* ================================
   Page Header
   ================================ */
.etg-page-header {
    margin-bottom: 2rem;
}

.etg-page-header h1 {
    color: var(--etg-secondary);
    font-weight: 700;
}

/* ================================
   Stats Cards
   ================================ */
.etg-stat-card {
    background: white;
    border-radius: var(--etg-radius);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--etg-shadow);
}

.etg-stat-card i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.etg-stat-card h3 {
    font-size: 2rem;
    margin: 0;
    color: var(--etg-secondary);
}

.etg-stat-card p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

/* ================================
   Admin Table
   ================================ */
.etg-admin-table {
    margin-bottom: 0;
}

.etg-admin-table th {
    background: var(--etg-light);
    font-weight: 600;
    color: var(--etg-secondary);
}

/* ================================
   Error Page
   ================================ */
.etg-error-wrapper {
    text-align: center;
    padding: 4rem 2rem;
}

.etg-error-icon {
    font-size: 5rem;
    color: var(--etg-warning);
    margin-bottom: 1rem;
}

.etg-error-message {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2rem;
}

/* ================================
   Invite Section
   ================================ */
.etg-invite-section {
    text-align: center;
    padding: 1rem;
    background: var(--etg-light);
    border-radius: var(--etg-radius-sm);
}

.etg-invite-section h5 {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

/* ================================
   Player Info Card
   ================================ */
.etg-player-info-card,
.etg-team-info-card {
    text-align: center;
}

.etg-player-avatar {
    width: 100px;
    height: 100px;
    margin: 0 auto 1rem;
    background: var(--etg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.etg-player-avatar i {
    font-size: 3rem;
    color: #ccc;
}

/* ================================
   History
   ================================ */
.etg-history-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.etg-history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--etg-light);
    border-radius: var(--etg-radius-sm);
}

.etg-history-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ================================
   Team Preview
   ================================ */
.etg-team-preview {
    text-align: center;
    padding: 2rem;
    background: var(--etg-light);
    border-radius: var(--etg-radius);
}

/* ================================
   Responsive
   ================================ */
@media (max-width: 768px) {
    .etg-hero-title {
        font-size: 2.5rem;
    }

    .etg-hero-subtitle {
        font-size: 1.2rem;
    }

    .etg-hero-actions {
        flex-direction: column;
    }

    .etg-form-wrapper {
        padding: 1.5rem;
    }

    .etg-invite-code {
        font-size: 1.5rem;
    }
}

/* ================================
   Tournament Hero Enhancements
   ================================ */
.etg-tournament-hero {
    padding-bottom: 3rem;
}

.etg-tournament-badge {
    margin-bottom: 1rem;
}

.etg-tournament-badge .badge {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

.etg-tournament-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin: 4rem 0;
}

.etg-info-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* ================================
   Upcoming Matches Preview
   ================================ */
.etg-matches-preview {
    background: white;
    padding: 3rem 0;
}

.etg-match-card {
    background: var(--etg-light);
    border-radius: var(--etg-radius);
    padding: 1.25rem;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    border-left: 4px solid var(--etg-primary);
}

.etg-match-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--etg-shadow);
}

.etg-match-teams {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
}

.etg-match-teams .team-home,
.etg-match-teams .team-away {
    font-weight: 600;
    font-size: 1rem;
}

.etg-match-teams .vs {
    color: var(--etg-primary);
    font-size: 0.8rem;
    font-weight: bold;
}

.etg-match-time {
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.etg-match-phase .badge {
    font-size: 0.75rem;
}

/* ================================
   Standings Preview
   ================================ */
.etg-standings-preview {
    background: #f1f1f1;
    padding: 3rem 0;
}

.etg-group-card {
    background: white;
    border-radius: var(--etg-radius);
    padding: 1rem;
    box-shadow: var(--etg-shadow);
}

.etg-group-title {
    font-weight: 700;
    color: var(--etg-secondary);
    border-bottom: 3px solid var(--etg-primary);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.etg-group-standings {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.etg-standing-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background: var(--etg-light);
    border-radius: var(--etg-radius-sm);
}

.etg-standing-row.leader {
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cc 100%);
    border: 1px solid #ffc107;
}

.etg-standing-row .position {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--etg-secondary);
    color: white;
    border-radius: 50%;
    font-weight: bold;
    font-size: 0.8rem;
}

.etg-standing-row.leader .position {
    background: #ffc107;
    color: #333;
}

.etg-standing-row .team-name {
    flex: 1;
    font-weight: 500;
    font-size: 0.9rem;
}

.etg-standing-row .points {
    font-weight: 700;
    color: var(--etg-primary);
    font-size: 0.85rem;
}

/* ================================
   Profile Edit Page
   ================================ */
.etg-edit-form .etg-card {
    margin-bottom: 1.5rem;
}

.etg-form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.etg-quick-info {
    text-align: left;
}

.etg-info-item {
    display: flex;
    flex-direction: column;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.etg-info-label {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.etg-info-value {
    font-weight: 500;
    color: var(--etg-secondary);
}

.etg-invite-code-small {
    font-family: monospace;
    background: var(--etg-light);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    color: var(--etg-primary);
}

/* ================================
   Asset Selector (Avatar/Logo)
   ================================ */
.etg-asset-selector {
    padding: 1rem 0;
}

.etg-current-asset {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--etg-light);
    border-radius: var(--etg-radius-sm);
    margin-bottom: 1rem;
}

.etg-asset-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 3px solid var(--etg-primary);
}

.etg-asset-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.etg-asset-preview i {
    font-size: 2.5rem;
    color: #ccc;
}

.etg-asset-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.etg-asset-label {
    font-weight: 500;
    color: var(--etg-secondary);
}

.etg-asset-tabs {
    margin-bottom: 1rem;
}

.etg-asset-tabs .nav-link {
    color: #666;
    border: none;
    padding: 0.75rem 1rem;
}

.etg-asset-tabs .nav-link.active {
    color: var(--etg-primary);
    border-bottom: 2px solid var(--etg-primary);
    background: transparent;
}

.etg-asset-tab-content {
    padding: 1rem 0;
}

.etg-asset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    grid-auto-rows: 80px;
    gap: 0.75rem;
    max-height: 300px;
    overflow-y: auto;
    padding: 0.5rem;
}

.etg-asset-item {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--etg-radius-sm);
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.2s ease;
    background: rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
}

.etg-asset-item:hover {
    border-color: var(--etg-primary);
    transform: scale(1.05);
}

.etg-asset-item.selected {
    border-color: var(--etg-primary);
    box-shadow: 0 0 0 2px rgba(255, 107, 0, 0.3);
}

.etg-asset-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Logo grid specific - use contain to show full logo without cropping */
.etg-logo-grid {
    gap: 1rem;
}

.etg-logo-grid .etg-asset-item {
    padding: 0.5rem;
    background: #f8f9fa;
}

.etg-logo-grid .etg-asset-item img {
    object-fit: contain;
}

.etg-asset-item .etg-asset-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 0.65rem;
    padding: 0.25rem;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.etg-asset-item .etg-asset-check {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--etg-primary);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}

.etg-asset-item.selected .etg-asset-check {
    display: flex;
}

.etg-empty-library {
    text-align: center;
    padding: 2rem;
    color: #999;
}

.etg-empty-library i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* ================================
   Upload Zone
   ================================ */
.etg-upload-zone {
    border: 2px dashed #ddd;
    border-radius: var(--etg-radius);
    padding: 2rem;
    text-align: center;
    transition: all 0.2s ease;
    background: #fafafa;
}

.etg-upload-zone:hover,
.etg-upload-zone.etg-dropzone-active {
    border-color: var(--etg-primary);
    background: #fff8f5;
}

.etg-upload-content i {
    font-size: 2.5rem;
    color: #ccc;
    margin-bottom: 0.5rem;
}

.etg-upload-content p {
    margin: 0.5rem 0;
    color: #666;
}

.etg-upload-progress {
    padding: 1rem;
}

.etg-upload-progress .progress {
    height: 8px;
    border-radius: 4px;
}

.etg-upload-status {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #666;
}

.etg-remove-asset {
    text-align: center;
}

/* ================================
   Document Section
   ================================ */
.etg-document-section {
    padding: 0.5rem 0;
}

.etg-document-card {
    background: var(--etg-light);
    border-radius: var(--etg-radius-sm);
    padding: 1rem;
    margin-bottom: 1rem;
}

.etg-document-card:last-child {
    margin-bottom: 0;
}

.etg-document-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.etg-document-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--etg-secondary);
}

.etg-document-title i {
    color: var(--etg-primary);
}

.etg-document-body {
    padding-top: 0.5rem;
}

.etg-document-meta {
    margin-bottom: 0.75rem;
}

.etg-document-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.etg-document-upload {
    margin-left: auto;
}

.etg-doc-upload-progress {
    margin-top: 0.5rem;
}

.etg-document-instructions {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #e3f2fd;
    border-radius: var(--etg-radius-sm);
}

/* ================================
   Document Status Summary
   ================================ */
.etg-doc-status-summary {
    text-align: left;
    padding: 0.75rem;
    background: var(--etg-light);
    border-radius: var(--etg-radius-sm);
}

.etg-doc-status-summary h6 {
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: #666;
}

.etg-doc-status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 0;
    font-size: 0.85rem;
}

/* ================================
   Team Documents Table
   ================================ */
.etg-docs-table {
    margin-bottom: 0;
}

.etg-docs-table th {
    background: var(--etg-light);
    font-weight: 600;
    font-size: 0.85rem;
    color: #666;
}

.etg-docs-table td {
    vertical-align: middle;
}

/* ================================
   Avatar Image
   ================================ */
.etg-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.etg-player-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ================================
   Responsive Adjustments
   ================================ */
@media (max-width: 768px) {
    .etg-asset-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .etg-document-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .etg-document-upload {
        margin-left: 0;
        margin-top: 0.5rem;
    }

    .etg-document-actions .btn {
        width: 100%;
        margin-bottom: 0.25rem;
    }

    .etg-form-actions {
        flex-direction: column;
    }

    .etg-form-actions .btn {
        width: 100%;
    }

    .etg-hero-logo {
        width: 120px;
    }
}

/* ================================
   Basketball Loading Animation
   ================================ */
.etg-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.etg-loading-ball {
    width: 60px;
    height: 60px;
    animation: etg-bounce 0.6s ease-in-out infinite alternate;
}

.etg-loading-ball img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.etg-loading-text {
    margin-top: 1rem;
    font-family: var(--etg-font-heading);
    color: var(--etg-teal);
    font-size: 1.1rem;
}

@keyframes etg-bounce {
    0% {
        transform: translateY(0) scale(1);
    }
    100% {
        transform: translateY(-20px) scale(0.95);
    }
}

@keyframes etg-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.etg-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--etg-sand);
    border-top-color: var(--etg-orange);
    border-radius: 50%;
    animation: etg-spin 0.8s linear infinite;
}

/* ================================
   Brand Navbar (Standalone)
   ================================ */
.etg-brand-navbar {
    background: var(--etg-gradient-teal);
    box-shadow: 0 2px 10px rgba(10, 67, 85, 0.15);
    padding: 0.5rem 0;
}

.etg-brand-navbar .navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.etg-brand-navbar .navbar-brand img {
    height: 40px;
    width: auto;
}

.etg-brand-navbar .navbar-brand span {
    font-family: var(--etg-font-heading);
    font-size: 1.3rem;
    color: white;
    font-weight: 400;
}

.etg-brand-navbar .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: color 0.2s;
}

.etg-brand-navbar .nav-link:hover {
    color: white !important;
}

.etg-brand-navbar .nav-link.active {
    color: var(--etg-orange) !important;
}

.etg-brand-navbar .btn-login {
    background: transparent;
    border: 2px solid var(--etg-orange);
    color: var(--etg-orange);
    padding: 0.4rem 1rem;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.2s;
}

.etg-brand-navbar .btn-login:hover {
    background: var(--etg-orange);
    color: white;
}

.etg-brand-navbar .btn-register {
    background: var(--etg-orange);
    border: 2px solid var(--etg-orange);
    color: white;
    padding: 0.4rem 1rem;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.2s;
}

.etg-brand-navbar .btn-register:hover {
    background: var(--etg-orange-dark);
    border-color: var(--etg-orange-dark);
}

.etg-brand-navbar .user-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
}

/* ================================
   Brand Footer
   ================================ */
.etg-brand-footer {
    background: var(--etg-gradient-teal);
    color: rgba(255, 255, 255, 0.8);
    padding: 1.5rem 0;
    margin-top: auto;
}

.etg-brand-footer .footer-logo {
    height: 50px;
    width: auto;
    margin-bottom: 0.5rem;
}

.etg-brand-footer a {
    color: var(--etg-orange);
    text-decoration: none;
}

.etg-brand-footer a:hover {
    color: var(--etg-beige);
    text-decoration: underline;
}

/* ================================
   Card Enhancements
   ================================ */
.etg-card {
    border-top: 4px solid var(--etg-orange);
}

.etg-card h4 {
    font-family: var(--etg-font-heading);
    font-weight: 400;
}

.etg-team-card {
    border-top: 4px solid var(--etg-teal);
}

.etg-team-card:hover {
    border-top-color: var(--etg-orange);
}

.etg-step-card {
    border-top: 4px solid transparent;
    background: white;
}

.etg-step-card:hover {
    border-top-color: var(--etg-orange);
}

/* ================================
   Badge Enhancements
   ================================ */
.badge.bg-etg-primary {
    background-color: var(--etg-orange) !important;
}

.badge.bg-etg-teal {
    background-color: var(--etg-teal) !important;
}

.badge.bg-etg-beige {
    background-color: var(--etg-beige) !important;
    color: var(--etg-teal);
}

/* ================================
   Invite Code Enhancement
   ================================ */
.etg-invite-code {
    color: var(--etg-orange);
    border: 2px dashed var(--etg-beige);
    background: var(--etg-sand);
}

/* ================================
   Text Colors
   ================================ */
.text-etg-teal {
    color: var(--etg-teal) !important;
}

.text-etg-orange {
    color: var(--etg-orange) !important;
}

.text-etg-red {
    color: var(--etg-red) !important;
}

/* ================================
   Background Colors
   ================================ */
.bg-etg-cream {
    background-color: var(--etg-cream) !important;
}

.bg-etg-sand {
    background-color: var(--etg-sand) !important;
}

.bg-etg-teal {
    background-color: var(--etg-teal) !important;
}

.bg-etg-orange {
    background-color: var(--etg-orange) !important;
}

/* ================================
   Mobile Responsiveness - 768px
   ================================ */
@media (max-width: 768px) {
    /* Section padding */
    .etg-section {
        padding: 2.5rem 0;
    }

    /* Container padding */
    .etg-container {
        padding: 1.5rem 1rem;
    }

    /* Match cards - stack on tablet */
    .etg-match-card {
        padding: 1rem;
    }

    /* Standings groups - 2 columns on tablet */
    .etg-group-card {
        margin-bottom: 1rem;
    }

    /* Quick access cards */
    .etg-login-card {
        padding: 1.25rem;
    }

    /* Touch-friendly form controls */
    .form-control,
    .form-select {
        min-height: 48px;
        font-size: 16px; /* Prevents iOS zoom */
    }

    .form-check-input {
        width: 24px;
        height: 24px;
    }

    .form-check-label {
        padding-left: 0.5rem;
    }
}

/* ================================
   Small Phones (< 480px)
   ================================ */
@media (max-width: 480px) {
    /* Hero section */
    .etg-hero {
        padding: 3rem 0;
    }

    .etg-hero-logo {
        width: 100px;
    }

    .etg-hero-title {
        font-size: 1.8rem;
    }

    .etg-hero-subtitle {
        font-size: 1rem;
    }

    .etg-hero-actions .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
        width: 100%;
    }

    /* Section titles */
    .etg-section-title {
        font-size: 1.5rem;
    }

    /* Forms */
    .etg-form-wrapper {
        padding: 1rem;
        margin: 0 0.5rem;
    }

    .etg-form-section {
        padding: 1rem;
    }

    .etg-form-header h1 {
        font-size: 1.4rem;
    }

    .etg-form-header-logo {
        width: 80px;
    }

    /* Cards */
    .etg-card {
        padding: 1rem;
    }

    .etg-team-card {
        padding: 1rem;
    }

    .etg-step-card {
        padding: 1.5rem 1rem;
    }

    /* Buttons */
    .btn-lg {
        padding: 0.75rem 1.25rem;
        font-size: 1rem;
    }

    /* Minimum tap target size (44px recommended) */
    .btn {
        min-height: 44px;
    }

    /* Invite code */
    .etg-invite-code {
        font-size: 1.25rem;
        padding: 0.75rem;
    }

    /* Tournament info badges */
    .etg-tournament-info {
        flex-direction: column;
        gap: 0.5rem;
    }

    .etg-info-badge {
        width: 100%;
        justify-content: center;
    }

    /* CTA section */
    .etg-cta h2 {
        font-size: 1.5rem;
    }

    .etg-cta-buttons {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    .etg-cta-buttons .btn {
        width: 100%;
        margin: 0;
    }

    /* Asset grid */
    .etg-asset-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Stat cards */
    .etg-stat-card h3 {
        font-size: 1.5rem;
    }

    /* Tables - horizontal scroll */
    .table-responsive-sm {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Player/Team info */
    .etg-player-avatar,
    .etg-team-logo.large {
        width: 80px;
        height: 80px;
    }

    .etg-jersey-number-large {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}

/* ================================
   Touch-Friendly Active States
   ================================ */
@media (hover: none) {
    .btn:active {
        transform: scale(0.98);
    }

    .etg-team-card:active,
    .etg-step-card:active {
        transform: scale(0.98);
    }
}

/* ================================
   Team Card Actions
   ================================ */
.etg-team-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.etg-team-actions .btn {
    flex: 1;
    min-width: 100px;
    max-width: 150px;
}

/* Spots badge - use orange for better visibility */
.etg-spots-badge {
    background: var(--etg-orange) !important;
    color: white;
}

/* Brighter success badge for player count */
.etg-team-card .badge.bg-success {
    background-color: #28a745 !important;
}

/* ================================
   Modal Team Logo Enhancement
   ================================ */
.etg-modal-team-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--etg-sand);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 3px solid var(--etg-teal);
}

.etg-modal-team-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.etg-modal-team-name {
    font-family: var(--etg-font-heading);
    color: var(--etg-teal);
    font-size: 1.5rem;
}

/* ================================
   Hero Mobile Title Fixes
   ================================ */
@media (max-width: 480px) {
    .etg-hero-title {
        font-size: 1.6rem;
        line-height: 1.2;
        word-break: keep-all;
        hyphens: none;
    }
}

@media (max-width: 576px) {
    .etg-hero-logo {
        width: 100px;
    }
}

/* ================================
   Password Toggle Active State
   ================================ */
#togglePassword.active,
#togglePasswordConfirm.active {
    background: var(--etg-orange);
    border-color: var(--etg-orange);
    color: white;
}

/* ================================
   Teams Filter Bar
   ================================ */
.etg-teams-filter {
    background: white;
    padding: 1rem;
    border-radius: var(--etg-radius);
    box-shadow: var(--etg-shadow);
}

.etg-teams-filter .form-control,
.etg-teams-filter .form-select {
    border-color: var(--etg-sand);
}

.etg-teams-filter .form-control:focus,
.etg-teams-filter .form-select:focus {
    border-color: var(--etg-orange);
    box-shadow: 0 0 0 0.2rem rgba(249, 114, 13, 0.15);
}

/* ================================
   Instagram Section
   ================================ */
.etg-instagram-banner {
    background: var(--etg-sand);
    padding: 4rem 0;
}

.etg-instagram-card {
    position: relative;
    border-radius: var(--etg-radius);
    overflow: hidden;
    box-shadow: var(--etg-shadow-hover);
}

.etg-instagram-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #833AB4 0%, #E1306C 50%, #F77737 100%);
    opacity: 0.95;
}

.etg-instagram-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="15" cy="15" r="10" stroke="rgba(255,255,255,0.1)" fill="none" stroke-width="1"/><circle cx="85" cy="85" r="15" stroke="rgba(255,255,255,0.1)" fill="none" stroke-width="1"/><circle cx="50" cy="50" r="25" stroke="rgba(255,255,255,0.05)" fill="none" stroke-width="1"/></svg>') repeat;
}

.etg-instagram-content {
    position: relative;
    z-index: 1;
    padding: 3rem;
    color: white;
}

.etg-instagram-content h2 {
    font-family: var(--etg-font-heading);
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.etg-instagram-icon {
    width: 70px;
    height: 70px;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.etg-instagram-handle {
    font-size: 1.25rem;
    font-weight: 600;
    opacity: 0.95;
    margin-bottom: 1rem;
}

.etg-instagram-desc {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
    max-width: 400px;
}

.etg-instagram-hashtag {
    margin-bottom: 0;
}

.etg-instagram-hashtag span {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.95rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.etg-instagram-features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.etg-instagram-feature {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: var(--etg-radius-sm);
    padding: 1.25rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.etg-instagram-feature:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
}

.etg-instagram-feature i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

.etg-instagram-feature span {
    font-weight: 600;
    font-size: 0.9rem;
}

.btn-instagram {
    background: white;
    color: #E1306C;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--etg-radius);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-instagram:hover {
    color: #833AB4;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.btn-instagram i {
    font-size: 1.3rem;
}

/* Instagram Feed Widget */
.etg-instagram-feed {
    margin-top: 2rem;
}

.etg-instagram-widget-container {
    background: white;
    border-radius: var(--etg-radius);
    padding: 1.25rem;
    box-shadow: var(--etg-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.etg-instagram-widget-container:hover {
    transform: translateY(-5px);
    box-shadow: var(--etg-shadow-hover);
}

.etg-instagram-embed {
    border-radius: var(--etg-radius-sm);
    overflow: hidden;
    display: block;
}

@media (max-width: 991px) {
    .etg-instagram-content {
        padding: 2rem;
    }

    .etg-instagram-icon {
        margin: 0 auto 1rem;
    }

    .etg-instagram-desc {
        margin: 0 auto 1.5rem;
    }
}

@media (max-width: 576px) {
    .etg-instagram-banner {
        padding: 2rem 0;
    }

    .etg-instagram-content {
        padding: 1.5rem;
    }

    .etg-instagram-content h2 {
        font-size: 1.5rem;
    }

    .etg-instagram-icon {
        width: 60px;
        height: 60px;
        font-size: 1.6rem;
    }

    .etg-instagram-features-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .etg-instagram-feature {
        padding: 1rem;
    }

    .etg-instagram-feature i {
        font-size: 1.2rem;
    }

    .etg-instagram-feature span {
        font-size: 0.8rem;
    }

    .btn-instagram {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
        width: 100%;
    }

    .etg-instagram-widget-container {
        padding: 1rem;
    }
}

/* ================================
   Join Modal - Smart States
   ================================ */
.etg-join-as-card {
    background: var(--etg-sand);
    border-radius: var(--etg-radius-sm);
    padding: 1rem;
    border-left: 4px solid var(--etg-orange);
}

.etg-join-as-avatar {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 50%;
    background: var(--etg-cream);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--etg-teal);
    font-size: 1.25rem;
}

.etg-join-guest-notice {
    background: #fff8f5;
    border-radius: var(--etg-radius-sm);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid rgba(249, 114, 13, 0.2);
}

.etg-join-guest-notice i {
    font-size: 1.5rem;
}

.etg-join-guest-notice p {
    color: var(--etg-teal);
    font-size: 0.95rem;
}

.etg-join-warning {
    text-align: center;
    padding: 1.5rem;
}

.etg-join-warning h5 {
    color: var(--etg-teal);
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.etg-join-loading {
    text-align: center;
    padding: 2rem;
}

.etg-join-success {
    text-align: center;
    padding: 1.5rem;
}

.etg-join-success .etg-success-icon {
    font-size: 4rem;
    color: var(--etg-success);
    margin-bottom: 1rem;
    animation: bounceIn 0.5s ease;
}

.etg-join-success h4 {
    color: var(--etg-teal);
    font-family: var(--etg-font-heading);
    margin-bottom: 0.5rem;
}

.etg-join-error {
    text-align: center;
    padding: 1.5rem;
}

.etg-join-error .etg-error-icon {
    font-size: 3rem;
    color: var(--etg-danger);
    margin-bottom: 1rem;
    animation: bounceIn 0.5s ease;
}

.etg-join-error h5 {
    color: var(--etg-teal);
    margin-bottom: 0.5rem;
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Modal transitions */
#requestJoinModal .modal-content {
    border: none;
    border-radius: var(--etg-radius);
    box-shadow: 0 10px 40px rgba(10, 67, 85, 0.2);
}

#requestJoinModal .modal-body {
    padding: 1.5rem;
}

/* ================================
   Tournament Progress Bar
   ================================ */
.etg-phase-progress {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    padding: 1rem 0;
}

.etg-phase-progress::before {
    content: '';
    position: absolute;
    top: 24px;
    left: 5%;
    right: 5%;
    height: 4px;
    background: #e9ecef;
    z-index: 0;
}

.etg-phase-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    z-index: 1;
}

.etg-phase-indicator {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    background: #e9ecef;
    color: #6c757d;
    transition: all 0.3s ease;
}

.etg-phase-item.etg-phase-completed .etg-phase-indicator {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.etg-phase-item.etg-phase-current .etg-phase-indicator {
    background: var(--etg-gradient);
    color: white;
    animation: etg-pulse 2s infinite;
}

.etg-phase-item.etg-phase-pending .etg-phase-indicator {
    background: #e9ecef;
    color: #adb5bd;
}

.etg-phase-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.25rem;
}

.etg-phase-item.etg-phase-completed .etg-phase-label {
    color: #28a745;
}

.etg-phase-item.etg-phase-current .etg-phase-label {
    color: var(--etg-orange);
    font-weight: 600;
}

.etg-phase-count {
    font-size: 0.75rem;
    color: #6c757d;
}

.etg-phase-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: currentColor;
}

@keyframes etg-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(249, 114, 13, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(249, 114, 13, 0);
    }
}

/* Progress bar responsive */
@media (max-width: 768px) {
    .etg-phase-progress {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .etg-phase-progress::before {
        display: none;
    }

    .etg-phase-item {
        flex: 0 0 calc(33.333% - 0.75rem);
    }

    .etg-phase-indicator {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .etg-phase-label {
        font-size: 0.75rem;
    }

    .etg-phase-count {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .etg-phase-item {
        flex: 0 0 calc(50% - 0.5rem);
    }
}

/* ================================
   Tournament Status Bar
   ================================ */
.etg-tournament-status-bar {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: var(--etg-radius);
    box-shadow: var(--etg-shadow);
}

.etg-status-badge {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.etg-status-draft {
    background: #e9ecef;
    color: #495057;
}

.etg-status-registration_open {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.etg-status-registration_closed {
    background: #ffc107;
    color: #212529;
}

.etg-status-in_progress {
    background: var(--etg-gradient);
    color: white;
}

.etg-status-completed {
    background: var(--etg-teal);
    color: white;
}

.etg-status-cancelled {
    background: #dc3545;
    color: white;
}

/* ================================
   Mobile Bottom Navigation Bar
   ================================ */
.etg-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: white;
    border-top: 1px solid #eee;
    display: none;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
}

@media (max-width: 768px) {
    .etg-bottom-nav {
        display: flex;
    }

    body.has-bottom-nav {
        padding-bottom: calc(60px + env(safe-area-inset-bottom));
    }

    body.has-bottom-nav main {
        padding-bottom: 1rem;
    }
}

.etg-bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    text-decoration: none;
    font-size: 0.7rem;
    gap: 2px;
    padding: 8px 4px;
    transition: color 0.2s ease;
    min-height: 44px;
}

.etg-bottom-nav-item:hover,
.etg-bottom-nav-item:focus {
    color: var(--etg-teal);
    text-decoration: none;
}

.etg-bottom-nav-item.active {
    color: var(--etg-orange);
}

.etg-bottom-nav-item i {
    font-size: 1.25rem;
}

.etg-bottom-nav-item span {
    font-weight: 500;
}

/* ================================
   Skeleton Loaders
   ================================ */
.etg-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: etg-skeleton-pulse 1.5s ease-in-out infinite;
    border-radius: 4px;
}

@keyframes etg-skeleton-pulse {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.etg-skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
}

.etg-skeleton-text.w-75 { width: 75%; }
.etg-skeleton-text.w-50 { width: 50%; }
.etg-skeleton-text.w-25 { width: 25%; }

.etg-skeleton-title {
    height: 1.5em;
    width: 60%;
    margin-bottom: 1em;
}

.etg-skeleton-card {
    height: 120px;
    margin-bottom: 1rem;
    border-radius: var(--etg-radius);
}

.etg-skeleton-row {
    height: 48px;
    margin-bottom: 4px;
    border-radius: var(--etg-radius-sm);
}

.etg-skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.etg-skeleton-badge {
    height: 24px;
    width: 60px;
    border-radius: 12px;
}

/* Standings Skeleton */
.etg-standings-skeleton {
    padding: 1rem;
}

.etg-standings-skeleton .etg-skeleton-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-radius: var(--etg-radius-sm);
}

.etg-standings-skeleton .skeleton-rank {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.etg-standings-skeleton .skeleton-name {
    flex: 1;
    height: 1em;
}

.etg-standings-skeleton .skeleton-stat {
    width: 30px;
    height: 1em;
}

/* Schedule Skeleton */
.etg-schedule-skeleton {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    padding: 1rem;
}

.etg-schedule-skeleton .etg-skeleton-card {
    height: 160px;
}

/* ================================
   Empty State Cards (Redesigned)
   ================================ */
.etg-empty-state-card {
    background: white;
    border-radius: var(--etg-radius);
    box-shadow: var(--etg-shadow);
    padding: 3rem 2rem;
    text-align: center;
    border-top: 4px solid var(--etg-orange);
    max-width: 500px;
    margin: 2rem auto;
}

.etg-empty-state-card .etg-empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--etg-sand);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--etg-orange);
}

.etg-empty-state-card h4 {
    font-family: var(--etg-font-heading);
    color: var(--etg-teal);
    margin-bottom: 0.75rem;
    font-size: 1.5rem;
}

.etg-empty-state-card p {
    color: #6c757d;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

/* Progress Steps in Empty State */
.etg-empty-progress {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.etg-progress-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #6c757d;
}

.etg-progress-step.completed {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.etg-progress-step.completed i {
    color: #28a745;
}

.etg-progress-step.current {
    background: rgba(249, 114, 13, 0.1);
    color: var(--etg-orange);
    font-weight: 600;
}

.etg-progress-step.current i {
    color: var(--etg-orange);
}

/* Empty State with Action Button */
.etg-empty-state-card .btn {
    margin-top: 1rem;
}

/* ================================
   Pull to Refresh
   ================================ */
.etg-pull-indicator {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    z-index: 1001;
    background: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0 0 var(--etg-radius) var(--etg-radius);
    box-shadow: var(--etg-shadow);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.3s ease;
    font-size: 0.9rem;
    color: var(--etg-teal);
}

.etg-pull-indicator.visible {
    transform: translateX(-50%) translateY(0);
}

.etg-pull-indicator.refreshing i {
    animation: etg-spin 0.8s linear infinite;
}

.etg-pull-indicator .etg-pull-arrow {
    transition: transform 0.2s ease;
}

.etg-pull-indicator.ready .etg-pull-arrow {
    transform: rotate(180deg);
}

/* ================================
   Swipe Navigation Hint
   ================================ */
.etg-swipe-hint {
    display: none;
    position: fixed;
    bottom: calc(70px + env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 67, 85, 0.9);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    z-index: 999;
    animation: etg-swipe-hint 3s ease-in-out;
    pointer-events: none;
}

@keyframes etg-swipe-hint {
    0%, 100% { opacity: 0; transform: translateX(-50%) translateY(10px); }
    20%, 80% { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@media (max-width: 768px) {
    .etg-swipe-hint.show {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
}

/* ================================
   Lazy Load Content Wrapper
   ================================ */
.etg-lazy-section {
    min-height: 100px;
}

.etg-lazy-section .etg-skeleton-container {
    display: block;
}

.etg-lazy-section .etg-lazy-content {
    display: none;
}

.etg-lazy-section.loaded .etg-skeleton-container {
    display: none;
}

.etg-lazy-section.loaded .etg-lazy-content {
    display: block;
}

/* ================================
   Enhanced Section Titles (Gradient Underline)
   ================================ */
.etg-section-title-decorated {
    position: relative;
    display: inline-block;
    font-family: var(--etg-font-heading);
    font-size: 1.5rem;
    color: var(--etg-teal);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
}

.etg-section-title-decorated::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--etg-gradient);
    border-radius: 2px;
}

/* ================================
   Touch Target Fixes
   ================================ */
@media (max-width: 768px) {
    /* Ensure minimum 44px touch targets */
    .etg-nav-pill {
        min-height: 44px;
        padding: 0.75rem 1rem;
    }

    .etg-team-list-item a {
        min-height: 48px;
        padding: 0.875rem 1.25rem;
    }

    .etg-standings-table td,
    .etg-standings-table th {
        padding: 0.75rem 0.5rem;
    }

    .etg-standings-table .etg-team-link {
        display: inline-block;
        padding: 0.25rem 0;
        min-height: 44px;
        line-height: 2;
    }

    /* Larger tap areas for table rows with links */
    .table td a {
        display: inline-block;
        padding: 0.5rem 0;
    }

    /* Navigation tabs */
    .nav-tabs .nav-link {
        min-height: 44px;
        padding: 0.75rem 1rem;
    }
}

/* ================================
   Tournament Page Navigation
   ================================ */
.etg-tournament-nav {
    background: white;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 100;
}

@media (max-width: 768px) {
    .etg-tournament-nav {
        /* On mobile, account for pull-to-refresh */
        top: 0;
    }
}

.etg-nav-pills {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.etg-nav-pills::-webkit-scrollbar {
    display: none;
}

/* ================================
   Card Style Consistency
   ================================ */
.etg-card-branded {
    background: white;
    border-radius: var(--etg-radius);
    box-shadow: var(--etg-shadow);
    border-top: 4px solid var(--etg-orange);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.etg-card-branded:hover {
    transform: translateY(-2px);
    box-shadow: var(--etg-shadow-hover);
}

.etg-card-branded .etg-card-header {
    background: linear-gradient(135deg, var(--etg-teal) 0%, var(--etg-teal-dark) 100%);
    color: white;
    border-bottom: none;
}

.etg-card-branded .etg-card-header h5 {
    color: white;
}

/* ================================
   Page Transition Animation
   ================================ */
@media (max-width: 768px) {
    .etg-page-content {
        animation: etg-page-enter 0.3s ease-out;
    }

    @keyframes etg-page-enter {
        from {
            opacity: 0;
            transform: translateX(20px);
        }
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }
}

/* ================================
   Tournament Subpage Hero
   ================================ */
.etg-subpage-hero {
    background: linear-gradient(135deg, var(--etg-teal) 0%, var(--etg-teal-dark) 100%);
    position: relative;
    padding: 1.5rem 0 2rem;
    color: white;
    overflow: hidden;
}

.etg-subpage-hero-overlay {
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="2"/></svg>') repeat;
    background-size: 80px;
    opacity: 0.5;
}

.etg-subpage-hero .container {
    position: relative;
    z-index: 1;
}

.etg-subpage-hero .etg-hero-back-link {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.etg-subpage-hero .etg-hero-back-link:hover {
    color: white;
}

.etg-subpage-hero-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.etg-subpage-title {
    font-family: var(--etg-font-heading);
    font-size: 2rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}

.etg-subpage-title i {
    color: var(--etg-orange);
}

.etg-subpage-subtitle {
    opacity: 0.85;
    margin: 0;
    font-size: 1rem;
}

.etg-subpage-hero .etg-tournament-badge {
    display: inline-block;
    width: fit-content;
}

.etg-subpage-hero .badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
}

@media (max-width: 768px) {
    .etg-subpage-hero {
        padding: 1rem 0 1.5rem;
    }

    .etg-subpage-title {
        font-size: 1.5rem;
    }

    .etg-subpage-subtitle {
        font-size: 0.9rem;
    }
}

/* ================================
   Subpage Navigation Tabs
   ================================ */
.etg-subpage-nav {
    background: white;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.etg-subpage-nav .container {
    padding-top: 0;
    padding-bottom: 0;
}

.etg-subpage-nav-pills {
    display: flex;
    gap: 0.25rem;
    padding: 0.5rem 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.etg-subpage-nav-pills::-webkit-scrollbar {
    display: none;
}

.etg-subpage-nav-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border-radius: 25px;
    background: transparent;
    color: #6c757d;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s;
    font-size: 0.9rem;
    font-weight: 500;
    min-height: 44px;
}

.etg-subpage-nav-pill:hover {
    background: #f8f9fa;
    color: var(--etg-teal);
}

.etg-subpage-nav-pill.active {
    background: var(--etg-orange);
    color: white;
}

.etg-subpage-nav-pill i {
    font-size: 0.9rem;
}

/* ================================
   Section Backgrounds (Visual Rhythm)
   ================================ */
.etg-section {
    padding: 2rem 0;
}

.etg-section-cream {
    background: var(--etg-cream);
}

.etg-section-sand {
    background: var(--etg-sand);
}

.etg-section-white {
    background: white;
}

/* ================================
   Standings Group Cards (Redesigned)
   ================================ */
.etg-standings-group-card {
    background: white;
    border-radius: var(--etg-radius);
    box-shadow: var(--etg-shadow);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.etg-standings-group-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--etg-shadow-hover);
}

.etg-standings-group-header {
    background: linear-gradient(135deg, var(--etg-teal) 0%, var(--etg-teal-dark) 100%);
    color: white;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.etg-group-letter-badge {
    width: 36px;
    height: 36px;
    background: var(--etg-orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--etg-font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    flex-shrink: 0;
}

.etg-standings-group-header h5 {
    margin: 0;
    font-family: var(--etg-font-heading);
    font-size: 1rem;
    font-weight: 400;
    color: white;
}

.etg-standings-table-wrapper {
    overflow-x: auto;
}

/* Enhanced Standings Table */
.etg-standings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.etg-standings-table th {
    background: #f8f9fa;
    padding: 0.75rem 0.5rem;
    text-align: center;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #6c757d;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #eee;
}

.etg-standings-table th:nth-child(2) {
    text-align: left;
}

.etg-standings-table td {
    padding: 0.75rem 0.5rem;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.etg-standings-table td:nth-child(2) {
    text-align: left;
}

.etg-standings-table tbody tr:last-child td {
    border-bottom: none;
}

.etg-standings-table tbody tr:hover {
    background: rgba(10, 67, 85, 0.02);
}

/* Qualified teams (top 2) - Orange highlight instead of green */
.etg-standings-table tr.etg-qualified {
    background: linear-gradient(90deg, rgba(249, 114, 13, 0.08) 0%, rgba(249, 114, 13, 0.02) 100%);
}

.etg-standings-table tr.etg-qualified:hover {
    background: linear-gradient(90deg, rgba(249, 114, 13, 0.12) 0%, rgba(249, 114, 13, 0.04) 100%);
}

/* Rank badges */
.etg-rank-badge {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.etg-rank-1 {
    background: var(--etg-orange);
    color: white;
}

.etg-rank-2 {
    background: var(--etg-sand);
    color: var(--etg-teal);
    border: 2px solid var(--etg-orange);
}

.etg-rank-other {
    background: #f0f0f0;
    color: #6c757d;
}

/* Team link in standings */
.etg-standings-table .etg-team-link {
    color: var(--etg-teal);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.etg-standings-table .etg-team-link:hover {
    color: var(--etg-orange);
}

/* Stats styling */
.etg-stat-wins {
    color: var(--etg-success);
    font-weight: 600;
}

.etg-stat-losses {
    color: var(--etg-danger);
}

.etg-stat-points {
    font-family: var(--etg-font-heading);
    font-size: 1.1rem;
    color: var(--etg-teal);
}

.etg-stat-diff-positive {
    color: var(--etg-success);
}

.etg-stat-diff-negative {
    color: var(--etg-danger);
}

/* ================================
   Legend Card (Branded)
   ================================ */
.etg-legend-card {
    background: var(--etg-sand);
    border-radius: var(--etg-radius);
    border-left: 4px solid var(--etg-teal);
    padding: 1rem 1.25rem;
}

.etg-legend-card h6 {
    font-family: var(--etg-font-heading);
    color: var(--etg-teal);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.etg-legend-card h6 i {
    color: var(--etg-orange);
}

.etg-legend-card ul {
    margin: 0;
    padding-left: 1rem;
}

.etg-legend-card li {
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
    color: #555;
}

.etg-legend-card .etg-legend-qualified {
    display: inline-block;
    width: 12px;
    height: 12px;
    background: linear-gradient(90deg, rgba(249, 114, 13, 0.3) 0%, rgba(249, 114, 13, 0.1) 100%);
    border-left: 2px solid var(--etg-orange);
    vertical-align: middle;
    margin-right: 0.25rem;
}

/* ================================
   Schedule & Results Cards (Consistent)
   ================================ */
.etg-match-card {
    background: white;
    border-radius: var(--etg-radius);
    box-shadow: var(--etg-shadow);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    border-top: 3px solid transparent;
}

.etg-match-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--etg-shadow-hover);
}

.etg-match-card.etg-match-completed {
    border-top-color: var(--etg-teal);
}

.etg-match-card.etg-match-live {
    border-top-color: var(--etg-orange);
}

.etg-match-card-header {
    background: #f8f9fa;
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #6c757d;
    border-bottom: 1px solid #eee;
}

.etg-match-card-body {
    padding: 1rem;
}

.etg-match-card-footer {
    padding: 0.75rem 1rem;
    background: #fafafa;
    text-align: center;
    border-top: 1px solid #eee;
}

/* Phase tabs styling */
.etg-phase-tabs {
    background: white;
    border-radius: var(--etg-radius);
    padding: 0.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--etg-shadow);
}

.etg-phase-tabs .nav-tabs {
    border: none;
    gap: 0.25rem;
}

.etg-phase-tabs .nav-link {
    border: none;
    border-radius: var(--etg-radius-sm);
    padding: 0.6rem 1rem;
    color: #6c757d;
    font-weight: 500;
    transition: all 0.2s;
}

.etg-phase-tabs .nav-link:hover {
    background: #f8f9fa;
    color: var(--etg-teal);
}

.etg-phase-tabs .nav-link.active {
    background: var(--etg-teal);
    color: white;
}

.etg-phase-tabs .badge {
    margin-left: 0.5rem;
    font-size: 0.7rem;
}

/* ================================
   Phase Tabs (Schedule/Results)
   ================================ */
.etg-phase-tabs-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -1rem;
    padding: 0 1rem;
}

.etg-phase-tabs {
    display: flex;
    gap: 0.5rem;
    background: white;
    border-radius: var(--etg-radius);
    padding: 0.5rem;
    box-shadow: var(--etg-shadow);
    min-width: max-content;
}

.etg-phase-tab {
    border: none;
    background: transparent;
    padding: 0.6rem 1rem;
    border-radius: var(--etg-radius-sm);
    font-family: var(--etg-font-body);
    font-weight: 500;
    font-size: 0.9rem;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.etg-phase-tab:hover {
    background: #f8f9fa;
    color: var(--etg-teal);
}

.etg-phase-tab.active {
    background: var(--etg-teal);
    color: white;
}

.etg-phase-count {
    background: rgba(0, 0, 0, 0.1);
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

.etg-phase-tab.active .etg-phase-count {
    background: rgba(255, 255, 255, 0.2);
}

/* ================================
   Date Header (Schedule)
   ================================ */
.etg-date-header {
    font-family: var(--etg-font-heading);
    font-size: 1.1rem;
    color: var(--etg-teal);
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: white;
    border-radius: var(--etg-radius-sm);
    border-left: 4px solid var(--etg-orange);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.etg-date-header i {
    color: var(--etg-orange);
}

.etg-date-header-pending {
    border-left-color: #6c757d;
    color: #6c757d;
}

.etg-date-header-pending i {
    color: #6c757d;
}

/* ================================
   Match Card (Schedule/Results)
   ================================ */
.etg-match-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.etg-match-group {
    font-weight: 600;
    color: var(--etg-teal);
}

.etg-match-number {
    color: #999;
}

.etg-court-badge {
    background: var(--etg-sand);
    color: var(--etg-teal);
    padding: 0.25rem 0.5rem;
    border-radius: var(--etg-radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.etg-match-teams {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.etg-match-team {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    border-radius: var(--etg-radius-sm);
    background: #f8f9fa;
    transition: background 0.2s;
}

.etg-match-team.etg-team-winner {
    background: linear-gradient(90deg, rgba(249, 114, 13, 0.1) 0%, transparent 100%);
    border-left: 3px solid var(--etg-orange);
}

.etg-match-team .etg-team-name {
    font-weight: 500;
    color: var(--etg-teal);
}

.etg-match-team.etg-team-winner .etg-team-name {
    font-weight: 700;
}

.etg-match-team .etg-team-score {
    font-family: var(--etg-font-heading);
    font-size: 1.25rem;
    color: #6c757d;
    min-width: 30px;
    text-align: center;
}

.etg-match-team.etg-team-winner .etg-team-score,
.etg-score-winner {
    color: var(--etg-orange);
}

.etg-match-vs {
    text-align: center;
    font-size: 0.75rem;
    color: #999;
    font-weight: 600;
    letter-spacing: 1px;
}

/* Match Status */
.etg-match-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.etg-status-completed {
    background: rgba(10, 67, 85, 0.1);
    color: var(--etg-teal);
}

.etg-status-completed i {
    color: var(--etg-success);
}

.etg-status-live {
    background: rgba(249, 114, 13, 0.1);
    color: var(--etg-orange);
}

.etg-status-pending {
    background: #f0f0f0;
    color: #6c757d;
}

.etg-match-time {
    color: var(--etg-teal);
    font-weight: 500;
}

.etg-match-time i {
    color: var(--etg-orange);
    margin-right: 0.25rem;
}

/* Pulse animation for live matches */
@keyframes etg-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.etg-pulse {
    animation: etg-pulse 1.5s ease-in-out infinite;
}

/* ================================
   Responsive Schedule
   ================================ */
@media (max-width: 768px) {
    .etg-phase-tabs-wrapper {
        margin: 0 -1rem;
        padding: 0 1rem;
    }

    .etg-date-header {
        font-size: 1rem;
    }

    .etg-match-team .etg-team-score {
        font-size: 1.1rem;
    }
}

/* ================================
   Results Page Additions
   ================================ */
.etg-match-date-small {
    font-size: 0.75rem;
    color: #999;
}

.etg-winner-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: 0.75rem;
    font-size: 0.75rem;
    color: var(--etg-orange);
    font-weight: 500;
}

.etg-winner-indicator i {
    color: #ffc107;
}

/* Team links in match cards */
.etg-match-team a.etg-team-name {
    color: var(--etg-teal);
    text-decoration: none;
    transition: color 0.2s;
}

.etg-match-team a.etg-team-name:hover {
    color: var(--etg-orange);
}

.etg-match-team.etg-team-winner a.etg-team-name {
    color: var(--etg-teal);
    font-weight: 700;
}

/* ================================
   Stats Card (Results Page)
   ================================ */
.etg-stats-card {
    background: white;
    border-radius: var(--etg-radius);
    padding: 1.5rem;
    box-shadow: var(--etg-shadow);
}

.etg-stats-title {
    font-family: var(--etg-font-heading);
    color: var(--etg-teal);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.etg-stats-title i {
    color: var(--etg-orange);
}

.etg-stat-box {
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: var(--etg-radius-sm);
    transition: transform 0.2s;
}

.etg-stat-box:hover {
    transform: translateY(-2px);
}

.etg-stat-value {
    font-family: var(--etg-font-heading);
    font-size: 2rem;
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.etg-stat-label {
    font-size: 0.8rem;
    color: #6c757d;
}

.etg-stat-primary {
    color: var(--etg-teal);
}

.etg-stat-success {
    color: var(--etg-success);
}

.etg-stat-orange {
    color: var(--etg-orange);
}

.etg-stat-teal {
    color: var(--etg-teal);
}

/* Responsive Stats */
@media (max-width: 768px) {
    .etg-stat-value {
        font-size: 1.5rem;
    }

    .etg-stat-box {
        padding: 0.75rem;
    }
}

/* ================================
   Basketball Intro Animation
   ================================ */

/* Full-screen overlay container */
.etg-intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--etg-teal) 0%, var(--etg-teal-dark) 100%);
    z-index: 10000;
    overflow: hidden;
}

/* Overlay fade out when complete */
.etg-intro-overlay.etg-intro-complete {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease-out;
}

/* Animation stage container - centered reference point */
.etg-intro-stage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 450px;
}

/* Skip button */
.etg-intro-skip {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: var(--etg-font-body);
    transition: all 0.2s;
    z-index: 10001;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.etg-intro-skip:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Basketball Hoop SVG - centered at top */
.etg-intro-hoop {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 160px;
    height: 200px;
    opacity: 0;
    animation: etgHoopAppear 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards 0.1s;
}

/* Basketball SVG - single fluid animation */
.etg-intro-ball {
    position: absolute;
    width: 60px;
    height: 60px;
    /* Start position: bottom-left of stage */
    left: 30px;
    top: 350px;
    opacity: 0;
    will-change: transform, opacity;
}

/* Ball full animation sequence - GPU accelerated with transform only */
.etg-intro-ball.etg-ball-animate {
    animation: etgBallFlight 2s cubic-bezier(0.22, 0.61, 0.36, 1) forwards 0.4s;
}

/* Net wobble effect */
.etg-intro-hoop.etg-net-wobble .etg-net {
    animation: etgNetWobble 0.6s ease-out;
    transform-origin: top center;
}

/* Celebration particles container - positioned at rim */
.etg-intro-particles {
    position: absolute;
    top: 75px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
}

/* Individual particle */
.etg-particle {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    opacity: 0;
}

.etg-particle:nth-child(odd) {
    background: var(--etg-orange);
}

.etg-particle:nth-child(even) {
    background: var(--etg-cream);
}

/* Particle burst animation when active */
.etg-intro-particles.etg-particles-active .etg-particle {
    animation: etgParticleBurst 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.etg-intro-particles.etg-particles-active .etg-particle:nth-child(1) { animation-delay: 0s; }
.etg-intro-particles.etg-particles-active .etg-particle:nth-child(2) { animation-delay: 0.03s; }
.etg-intro-particles.etg-particles-active .etg-particle:nth-child(3) { animation-delay: 0.06s; }
.etg-intro-particles.etg-particles-active .etg-particle:nth-child(4) { animation-delay: 0.09s; }
.etg-intro-particles.etg-particles-active .etg-particle:nth-child(5) { animation-delay: 0.04s; }
.etg-intro-particles.etg-particles-active .etg-particle:nth-child(6) { animation-delay: 0.07s; }
.etg-intro-particles.etg-particles-active .etg-particle:nth-child(7) { animation-delay: 0.02s; }
.etg-intro-particles.etg-particles-active .etg-particle:nth-child(8) { animation-delay: 0.1s; }

/* ================================
   Intro Animation Keyframes
   ================================ */

/* Hoop appears with bounce */
@keyframes etgHoopAppear {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(-30px) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

/* Ball complete flight - GPU accelerated using transform only */
@keyframes etgBallFlight {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1) rotate(0deg);
    }
    /* Rising arc */
    30% {
        transform: translate(80px, -230px) scale(0.95) rotate(200deg);
    }
    /* Peak of arc - above the rim */
    50% {
        transform: translate(120px, -320px) scale(0.9) rotate(380deg);
    }
    /* Descending to rim - ball enters basket */
    65% {
        opacity: 1;
        transform: translate(140px, -292px) scale(0.85) rotate(500deg);
    }
    /* Through the net */
    80% {
        opacity: 1;
        transform: translate(140px, -240px) scale(0.8) rotate(580deg);
    }
    /* Falling below - fade out */
    100% {
        opacity: 0;
        transform: translate(140px, -170px) scale(0.7) rotate(650deg);
    }
}

/* Net wobble on score */
@keyframes etgNetWobble {
    0% {
        transform: scaleY(1) scaleX(1);
    }
    20% {
        transform: scaleY(1.1) scaleX(0.9);
    }
    40% {
        transform: scaleY(0.95) scaleX(1.05);
    }
    60% {
        transform: scaleY(1.05) scaleX(0.98);
    }
    80% {
        transform: scaleY(0.98) scaleX(1.02);
    }
    100% {
        transform: scaleY(1) scaleX(1);
    }
}

/* Particle explosion */
@keyframes etgParticleBurst {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--tx), var(--ty)) scale(0.2);
    }
}

/* ================================
   Landing Content Reveal
   ================================ */

/* Initial hidden state for landing content */
.etg-landing.etg-content-hidden {
    opacity: 0;
}

/* Content reveal animation */
.etg-landing.etg-content-revealing {
    animation: etgContentReveal 0.7s ease-out forwards;
}

@keyframes etgContentReveal {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================================
   Reduced Motion & Mobile
   ================================ */

/* Respect user preference for reduced motion */
@media (prefers-reduced-motion: reduce) {
    .etg-intro-overlay {
        display: none !important;
    }

    .etg-landing.etg-content-hidden {
        opacity: 1;
    }
}

/* Mobile responsive adjustments */
@media (max-width: 576px) {
    .etg-intro-ball {
        width: 55px;
        height: 55px;
        left: 10%;
        bottom: 20%;
    }

    .etg-intro-hoop {
        width: 140px;
        height: 170px;
        top: 12%;
    }

    .etg-intro-skip {
        bottom: 1.5rem;
        right: 1.5rem;
        padding: 0.4rem 1rem;
        font-size: 0.85rem;
    }

    .etg-particle {
        width: 10px;
        height: 10px;
    }

    @keyframes etgBallTrajectory {
        0% {
            left: 10%;
            bottom: 20%;
            transform: scale(1);
        }
        35% {
            left: 30%;
            bottom: 50%;
            transform: scale(0.95);
        }
        70% {
            left: 47%;
            bottom: 45%;
            transform: scale(0.9);
        }
        100% {
            left: 50%;
            bottom: 38%;
            transform: translateX(-50%) scale(0.8);
        }
    }
}
