/* ========================================
   Track Events UI 2.0 - Racing Inspired
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700;800&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
    /* Color Palette - Racing Inspired */
    --color-bg-primary: #0a0e1a;
    --color-bg-secondary: #141927;
    --color-bg-tertiary: #1e2535;
    --color-bg-overlay: rgba(10, 14, 26, 0.95);

    --color-surface: #1e2535;
    --color-surface-hover: #252d40;
    --color-surface-active: #2d3548;

    --color-accent-orange: #ff6b35;
    --color-accent-cyan: #00e5ff;
    --color-accent-yellow: #ffd23f;
    --color-accent-green: #06ffa5;

    --color-text-primary: #e8eef5;
    --color-text-secondary: #9ba3b0;
    --color-text-muted: #5a6270;

    --color-border: #2d3548;
    --color-border-focus: var(--color-accent-orange);

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow-orange: 0 0 20px rgba(255, 107, 53, 0.3);
    --shadow-glow-cyan: 0 0 20px rgba(0, 229, 255, 0.3);

    /* Typography */
    --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'IBM Plex Mono', 'Courier New', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-text-primary);
    background: var(--color-bg-primary);
    background-image:
        /* Checkpoint markers - dots at grid intersections (SCROLLS) */
        radial-gradient(
            circle at 0 0,
            rgba(0, 229, 255, 0.3) 0%,
            rgba(0, 229, 255, 0.3) 1.5px,
            transparent 1.5px
        ),
        /* Speed lines - diagonal stripes (FIXED) */
        repeating-linear-gradient(
            -60deg,
            transparent,
            transparent 80px,
            rgba(255, 107, 53, 0.06) 80px,
            rgba(255, 107, 53, 0.06) 160px
        ),
        /* Grid overlay - racing telemetry aesthetic (SCROLLS) */
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 20px,
            rgba(0, 229, 255, 0.08) 20px,
            rgba(0, 229, 255, 0.08) 21px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 20px,
            rgba(0, 229, 255, 0.08) 20px,
            rgba(0, 229, 255, 0.08) 21px
        ),
        /* Radial gradients for depth - spotlight effect */
        radial-gradient(
            ellipse 800px 600px at 20% 30%,
            rgba(255, 107, 53, 0.12) 0%,
            transparent 50%
        ),
        radial-gradient(
            ellipse 800px 600px at 80% 70%,
            rgba(0, 229, 255, 0.12) 0%,
            transparent 50%
        ),
        /* Base gradient */
        linear-gradient(135deg, #0a0e1a 0%, #0d1220 50%, #0a0e1a 100%);
    background-size: 21px 21px, auto, auto, auto, auto, auto, auto;
    background-position: 20px 24px, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0;
    background-attachment: fixed, fixed, fixed, fixed, fixed, fixed, fixed;
    min-height: 100vh;
    padding: var(--space-lg);
}

/* ========================================
   Container & Layout
   ======================================== */

.container {
    max-width: 1400px;
    margin: 0 auto;
}

.header {
    margin-bottom: var(--space-2xl);
    text-align: center;
    position: relative;
}

.header h1 {
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--color-accent-orange) 0%, var(--color-accent-cyan) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-sm);
    animation: slideDown 0.6s ease-out;
}

.header .subtitle {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    animation: slideDown 0.6s ease-out 0.1s backwards;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-lg);
    position: relative;
}

/* Racing stripe under subtitle */
.header .subtitle::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-accent-orange) 0%, var(--color-accent-orange) 50%, var(--color-accent-cyan) 50%, var(--color-accent-cyan) 100%);
    border-radius: 2px;
}

/* ========================================
   Search Section
   ======================================== */

.search-section {
    max-width: 600px;
    margin: 0 auto var(--space-xl);
    animation: slideDown 0.6s ease-out 0.2s backwards;
}

.search-wrapper {
    position: relative;
    margin-bottom: var(--space-sm);
}

.search-input {
    width: 100%;
    padding: var(--space-lg) var(--space-xl);
    font-family: var(--font-body);
    font-size: 1rem;
    background: var(--color-surface);
    color: var(--color-text-primary);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.search-input:focus {
    outline: none;
    border-color: var(--color-border-focus);
    box-shadow: var(--shadow-md), var(--shadow-glow-orange);
    transform: translateY(-2px);
}

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

.search-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.search-clear {
    position: absolute;
    right: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    display: none;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-tertiary);
    border: none;
    border-radius: 50%;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 18px;
    line-height: 1;
}

.search-clear:hover {
    background: var(--color-surface-hover);
    color: var(--color-text-primary);
    transform: translateY(-50%) scale(1.1);
}

.options-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    width: 100%;
    padding: var(--space-md);
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--color-accent-orange) 0%, var(--color-accent-cyan) 100%);
    color: var(--color-bg-primary);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.options-toggle:focus {
    outline: none;
}

.options-toggle:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md), var(--shadow-glow-orange);
}

.options-toggle.active {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md), var(--shadow-glow-orange);
}

.options-toggle-icon {
    transition: transform 0.3s ease;
}

.options-toggle.active .options-toggle-icon {
    transform: rotate(180deg);
}

/* ========================================
   Options Panel
   ======================================== */

.options-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 80vh;
    background: var(--color-bg-overlay);
    backdrop-filter: blur(20px);
    border-top: 2px solid var(--color-border);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    box-shadow: var(--shadow-lg);
    padding: var(--space-xl);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    overflow-y: auto;
}

.options-panel.show {
    transform: translateY(0);
}

.options-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--color-border);
}

.options-panel-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-primary);
}

.options-panel-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-surface);
    border: none;
    border-radius: 50%;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 24px;
}

.options-panel-close:hover {
    background: var(--color-surface-hover);
    color: var(--color-text-primary);
    transform: rotate(90deg);
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.option-group {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
}

.option-group-title {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-accent-orange);
    margin-bottom: var(--space-md);
}

.option-row {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.option-row:last-child {
    margin-bottom: 0;
}

.date-input {
    flex: 1;
    min-width: 0;
    max-width: 100%;
    padding: var(--space-md);
    font-family: var(--font-body);
    font-size: 0.8rem;
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    color-scheme: dark;
}

.zip-input,
.radius-select {
    flex: 1;
    min-width: 0;
    max-width: 100%;
    padding: var(--space-md);
    font-family: var(--font-body);
    font-size: 0.9rem;
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    color-scheme: dark;
}

.date-input::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.7;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23e8eef5' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5zM1 4v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4H1z'/%3E%3C/svg%3E");
    background-size: 16px 16px;
    background-repeat: no-repeat;
    background-position: center;
}

.date-input::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

.date-input:focus,
.zip-input:focus,
.radius-select:focus {
    outline: none;
    border-color: var(--color-border-focus);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.filter-checkboxes {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-body);
    font-size: 0.85rem;
}

.checkbox-label:hover {
    background: var(--color-surface-hover);
    border-color: var(--color-accent-orange);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--color-accent-orange);
}

.select-dropdown {
    position: relative;
}

.select-trigger {
    width: 100%;
    padding: var(--space-md);
    font-family: var(--font-body);
    font-size: 0.9rem;
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.select-trigger:hover {
    border-color: var(--color-accent-orange);
}

.select-trigger.active {
    border-color: var(--color-accent-orange);
    background: var(--color-surface);
}

.select-dropdown-menu {
    position: absolute;
    top: calc(100% + var(--space-xs));
    left: 0;
    right: 0;
    max-height: 300px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    z-index: 10;
    display: none;
}

.select-dropdown-menu.show {
    display: block;
}

.select-dropdown-controls {
    display: flex;
    gap: var(--space-xs);
    padding: var(--space-sm);
    background: var(--color-bg-secondary);
    border-bottom: 1px solid var(--color-border);
}

.select-control-btn {
    flex: 1;
    padding: var(--space-xs) var(--space-sm);
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--color-surface);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.select-control-btn:hover {
    background: var(--color-surface-hover);
    color: var(--color-accent-orange);
    border-color: var(--color-accent-orange);
}

.select-dropdown-search {
    padding: var(--space-sm);
    background: var(--color-bg-secondary);
    border-bottom: 1px solid var(--color-border);
}

.select-search-input {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    font-family: var(--font-body);
    font-size: 0.85rem;
    background: var(--color-surface);
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.select-search-input:focus {
    outline: none;
    border-color: var(--color-accent-orange);
    box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.1);
}

.select-search-input::placeholder {
    color: var(--color-text-muted);
}

.select-dropdown-options {
    max-height: 240px;
    overflow-y: auto;
}

.select-option {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 0.85rem;
}

.select-option:hover {
    background: var(--color-surface-hover);
}

.select-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--color-accent-orange);
}

.apply-filters-btn {
    display: block;
    width: auto;
    max-width: 300px;
    margin: var(--space-lg) auto 0;
    padding: var(--space-lg) var(--space-2xl);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--color-accent-orange) 0%, var(--color-accent-cyan) 100%);
    color: var(--color-bg-primary);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.apply-filters-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md), var(--shadow-glow-orange);
}

.apply-filters-btn:active {
    transform: translateY(0);
}

/* ========================================
   Event Count & Stats
   ======================================== */

.event-stats {
    max-width: 1400px;
    margin: 0 auto var(--space-xl);
    padding: var(--space-lg);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--color-accent-orange);
    border-radius: var(--radius-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-lg);
    box-shadow: var(--shadow-sm);
    animation: slideDown 0.6s ease-out 0.3s backwards;
}

.event-count {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    flex: 1;
}

.event-count strong {
    color: var(--color-accent-orange);
    font-weight: 600;
}

.clear-filters-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-primary);
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-accent-orange);
    border-radius: var(--radius-md);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.clear-filters-btn:hover {
    background: var(--color-accent-orange);
    color: var(--color-bg-primary);
    transform: translateX(-4px);
    box-shadow: var(--shadow-md), var(--shadow-glow-orange);
}

.clear-filters-btn span:last-child {
    font-size: 1.5rem;
    line-height: 1;
    font-weight: 300;
}

/* Active Filter Chips */
.active-filters {
    max-width: 1400px;
    margin: 0 auto var(--space-md);
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    animation: slideDown 0.6s ease-out 0.35s backwards;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-md);
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(255, 107, 53, 0.15);
    color: var(--color-accent-cyan);
    border: 1px solid var(--color-accent-orange);
    border-radius: 20px;
    transition: all 0.2s ease;
}

.filter-chip-label {
    color: var(--color-text-secondary);
    font-weight: 400;
    margin-right: 4px;
}

.filter-chip-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: transparent;
    border: none;
    color: var(--color-accent-cyan);
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    transition: all 0.2s ease;
}

.filter-chip-remove:hover {
    transform: scale(1.2);
    color: var(--color-text-primary);
}

.error-message {
    max-width: 600px;
    margin: 0 auto var(--space-lg);
    padding: var(--space-lg);
    background: rgba(255, 107, 53, 0.1);
    border: 1px solid var(--color-accent-orange);
    border-radius: var(--radius-md);
    color: var(--color-accent-orange);
    text-align: center;
}

/* ========================================
   Event Cards Grid
   ======================================== */

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-2xl);
}

.event-card {
    position: relative;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    animation: cardReveal 0.5s ease-out backwards;
    /* border-left set inline via event type color */
}

.event-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-accent-orange) 0%, var(--color-accent-cyan) 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.event-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), var(--shadow-glow-orange);
}

.event-card:hover::before {
    transform: scaleX(1);
}

.event-card.past-event {
    opacity: 0.5;
}

.event-card.past-event:hover {
    opacity: 0.7;
}

.event-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-md);
}

.event-date-calendar {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.event-date-month {
    width: 100%;
    padding: 5px 6px;
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-align: center;
    background: linear-gradient(135deg, var(--color-accent-orange) 0%, rgba(255, 107, 53, 0.8) 100%);
    color: #ffffff;
}

.event-date-day {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    color: var(--color-text-primary);
    padding: 8px 8px 4px 8px;
    letter-spacing: -0.02em;
}

.event-date-year {
    font-family: var(--font-body);
    font-size: 0.7rem;
    color: var(--color-text-muted);
    padding: 0 8px 8px 8px;
    line-height: 1;
}

.event-date-range {
    font-family: var(--font-display);
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--color-accent-cyan);
    padding: 4px 8px 6px 8px;
    border-top: 1px solid var(--color-border);
    width: 100%;
    text-align: center;
}

.event-badges {
    display: flex;
    gap: var(--space-xs);
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 4px;
}

.badge-new {
    background: rgba(6, 255, 165, 0.15);
    color: var(--color-accent-green);
    border: 1px solid var(--color-accent-green);
    animation: badgePulse 2s ease-in-out infinite;
}

.badge-updated {
    background: rgba(0, 229, 255, 0.15);
    color: var(--color-accent-cyan);
    border: 1px solid var(--color-accent-cyan);
}

.event-card-body {
    margin-bottom: var(--space-md);
}

.event-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: var(--space-xs);
    line-height: 1.3;
}

.event-location {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-sm);
}

.event-meta {
    display: flex;
    gap: var(--space-lg);
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border);
}

.event-meta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.event-meta-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
}

.event-meta-value {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-primary);
}

.event-price {
    color: var(--color-accent-cyan);
    font-weight: 600;
}

.event-card-footer {
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.event-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-accent-orange);
    text-decoration: none;
    background: rgba(255, 107, 53, 0.1);
    border: 1px solid var(--color-accent-orange);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.event-link:hover {
    background: var(--color-accent-orange);
    color: var(--color-bg-primary);
    transform: translateX(4px);
}

.event-updated {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.no-events {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--color-text-secondary);
}

.no-events-icon {
    font-size: 3rem;
    margin-bottom: var(--space-md);
    opacity: 0.3;
}

.no-events-text {
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin-bottom: var(--space-sm);
}

.no-events-hint {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

/* ========================================
   Animations
   ======================================== */

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes badgePulse {
    0%, 100% {
        box-shadow: 0 0 5px rgba(6, 255, 165, 0.3);
    }
    50% {
        box-shadow: 0 0 15px rgba(6, 255, 165, 0.6), 0 0 25px rgba(6, 255, 165, 0.3);
    }
}

/* Staggered card animation */
.event-card:nth-child(1) { animation-delay: 0.05s; }
.event-card:nth-child(2) { animation-delay: 0.1s; }
.event-card:nth-child(3) { animation-delay: 0.15s; }
.event-card:nth-child(4) { animation-delay: 0.2s; }
.event-card:nth-child(5) { animation-delay: 0.25s; }
.event-card:nth-child(6) { animation-delay: 0.3s; }
.event-card:nth-child(7) { animation-delay: 0.35s; }
.event-card:nth-child(8) { animation-delay: 0.4s; }
.event-card:nth-child(9) { animation-delay: 0.45s; }

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    body {
        padding: var(--space-md);
    }

    .header h1 {
        font-size: 2.5rem;
    }

    .events-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .options-panel {
        max-height: 90vh;
        padding: var(--space-lg);
    }

    .options-grid {
        grid-template-columns: 1fr;
    }

    .event-stats {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }

    .clear-filters-btn {
        width: 100%;
        justify-content: center;
    }

    .active-filters {
        padding: 0 var(--space-sm);
    }
}

/* ========================================
   Scrollbar Styling
   ======================================== */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--color-surface-hover);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-surface-active);
}

/* ========================================
   Authentication Pages
   ======================================== */

.auth-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    position: relative;
    overflow: hidden;
}

.auth-back-link {
    position: absolute;
    top: var(--space-xl);
    left: var(--space-xl);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--color-text-secondary);
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.auth-back-link:hover {
    color: var(--color-accent-orange);
}

.auth-back-arrow {
    font-size: 1.2rem;
    transition: transform 0.2s ease;
}

.auth-back-link:hover .auth-back-arrow {
    transform: translateX(-4px);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
    animation: cardReveal 0.5s ease-out;
}

.auth-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.auth-logo {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--color-accent-orange) 0%, var(--color-accent-cyan) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-xs);
}

.auth-tagline {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.auth-intro-text {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
    margin-bottom: var(--space-lg);
    text-align: center;
}

.auth-intro-text strong {
    color: var(--color-accent-cyan);
}

/* Auth Tabs */
.auth-tabs {
    display: flex;
    position: relative;
    margin-bottom: var(--space-xl);
    background: var(--color-bg-secondary);
    border-radius: var(--radius-md);
    padding: 4px;
}

.auth-tab {
    flex: 1;
    padding: var(--space-md);
    text-align: center;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.auth-tab:hover {
    color: var(--color-text-primary);
}

.auth-tab.active {
    color: var(--color-bg-primary);
}

.auth-tab-indicator {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background: linear-gradient(135deg, var(--color-accent-orange) 0%, var(--color-accent-cyan) 100%);
    border-radius: var(--radius-sm);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-tab-indicator.right {
    transform: translateX(100%);
}

/* Auth Messages */
.auth-message {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    font-size: 0.9rem;
}

.auth-error {
    background: rgba(255, 62, 108, 0.15);
    border: 1px solid #ff3e6c;
    color: #ff3e6c;
}

.auth-success {
    background: rgba(6, 255, 165, 0.15);
    border: 1px solid var(--color-accent-green);
    color: var(--color-accent-green);
}

.auth-message-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-weight: bold;
    font-size: 0.8rem;
}

.auth-error .auth-message-icon {
    background: #ff3e6c;
    color: var(--color-bg-primary);
}

.auth-success .auth-message-icon {
    background: var(--color-accent-green);
    color: var(--color-bg-primary);
}

/* Auth Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.auth-form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.auth-form-row {
    display: flex;
    gap: var(--space-sm);
}

.auth-form-group-half {
    flex: 1;
}

.auth-label {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-secondary);
}

.auth-input-wrapper {
    position: relative;
}

.auth-input {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    font-family: var(--font-body);
    font-size: 1rem;
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.auth-input:focus {
    outline: none;
    border-color: var(--color-accent-orange);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
}

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

.auth-password-toggle {
    position: absolute;
    right: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: var(--space-xs);
    transition: color 0.2s ease;
}

.auth-password-toggle:hover,
.auth-password-toggle.visible {
    color: var(--color-accent-cyan);
}

.eye-icon {
    font-size: 1.2rem;
}

.auth-password-strength {
    font-size: 0.75rem;
    min-height: 1rem;
    margin-top: var(--space-xs);
}

.strength-weak { color: #ff3e6c; }
.strength-fair { color: var(--color-accent-yellow); }
.strength-good { color: var(--color-accent-cyan); }
.strength-strong { color: var(--color-accent-green); }

/* Auth Options */
.auth-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.auth-remember {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    cursor: pointer;
}

.auth-remember input[type="checkbox"] {
    display: none;
}

.auth-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-border);
    border-radius: 4px;
    position: relative;
    transition: all 0.2s ease;
}

.auth-remember input:checked + .auth-checkbox {
    background: var(--color-accent-orange);
    border-color: var(--color-accent-orange);
}

.auth-remember input:checked + .auth-checkbox::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid var(--color-bg-primary);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.auth-forgot-link {
    font-size: 0.85rem;
    color: var(--color-accent-cyan);
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-forgot-link:hover {
    color: var(--color-accent-orange);
    text-decoration: underline;
}

/* Submit Button */
.auth-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    width: 100%;
    padding: var(--space-lg);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: linear-gradient(135deg, var(--color-accent-orange) 0%, var(--color-accent-cyan) 100%);
    color: var(--color-bg-primary);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md), var(--shadow-glow-orange);
}

.auth-submit-btn:active {
    transform: translateY(0);
}

.auth-submit-secondary {
    background: var(--color-surface);
    border: 2px solid var(--color-accent-orange);
    color: var(--color-accent-orange);
}

.auth-submit-secondary:hover {
    background: var(--color-accent-orange);
    color: var(--color-bg-primary);
}

.auth-btn-arrow {
    transition: transform 0.2s ease;
}

.auth-submit-btn:hover .auth-btn-arrow {
    transform: translateX(4px);
}

.auth-terms {
    text-align: center;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: var(--space-sm);
}

/* Auth Decoration */
.auth-decoration {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    pointer-events: none;
    overflow: hidden;
}

.auth-stripe {
    position: absolute;
    bottom: 0;
    left: -100%;
    width: 300%;
    height: 4px;
    transform: skewX(-45deg);
}

.auth-stripe-1 {
    bottom: 20px;
    background: var(--color-accent-orange);
    animation: stripeSlide 8s linear infinite;
}

.auth-stripe-2 {
    bottom: 35px;
    background: var(--color-accent-cyan);
    animation: stripeSlide 12s linear infinite reverse;
}

.auth-stripe-3 {
    bottom: 50px;
    background: var(--color-accent-yellow);
    opacity: 0.5;
    animation: stripeSlide 15s linear infinite;
}

@keyframes stripeSlide {
    0% { transform: translateX(-33%) skewX(-45deg); }
    100% { transform: translateX(0) skewX(-45deg); }
}

/* Email Verification Page */
.auth-verify-card {
    text-align: center;
    max-width: 480px;
}

.auth-verify-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-xl);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-verify-icon svg {
    width: 40px;
    height: 40px;
}

.auth-verify-success {
    background: rgba(6, 255, 165, 0.15);
    border: 2px solid var(--color-accent-green);
    color: var(--color-accent-green);
    animation: successPulse 2s ease-in-out infinite;
}

.auth-verify-error {
    background: rgba(255, 62, 108, 0.15);
    border: 2px solid #ff3e6c;
    color: #ff3e6c;
}

@keyframes successPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(6, 255, 165, 0.4); }
    50% { box-shadow: 0 0 0 20px rgba(6, 255, 165, 0); }
}

.auth-verify-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: var(--space-md);
}

.auth-verify-message {
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xl);
    line-height: 1.6;
}

/* ========================================
   Header User Menu (for logged in users)
   ======================================== */

.header-content {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.header-logo-link {
    text-decoration: none;
}

.header-logo-link h1 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--color-accent-orange) 0%, var(--color-accent-cyan) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.header-user {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.header-user-email {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}

.header-logout-btn {
    padding: var(--space-sm) var(--space-lg);
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-primary);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.2s ease;
}

.header-logout-btn:hover {
    border-color: var(--color-accent-orange);
    color: var(--color-accent-orange);
}

/* Header Auth Buttons (for logged out users) */
.header-auth {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.header-login-btn {
    padding: var(--space-sm) var(--space-lg);
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.header-login-btn:hover {
    color: var(--color-text-primary);
}

.header-signup-btn {
    padding: var(--space-sm) var(--space-lg);
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: linear-gradient(135deg, var(--color-accent-orange) 0%, var(--color-accent-cyan) 100%);
    color: var(--color-bg-primary);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.3s ease;
}

.header-signup-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm), var(--shadow-glow-orange);
}

/* ========================================
   Profile Page
   ======================================== */

.profile-container {
    max-width: 1000px;
    margin: 0 auto;
    padding-top: var(--space-xl);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
    padding: var(--space-xl);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--color-accent-orange) 0%, var(--color-accent-cyan) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-bg-primary);
}

.profile-name {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: var(--space-xs);
}

.profile-email {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xs);
}

.profile-joined {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.profile-section {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
}

.profile-section-future {
    opacity: 0.6;
}

.profile-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--color-border);
}

.profile-section-title {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text-primary);
}

.profile-section-icon {
    font-size: 1.2rem;
}

.profile-section-count {
    font-size: 0.8rem;
    color: var(--color-accent-cyan);
    background: rgba(0, 229, 255, 0.1);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
}

.profile-coming-soon {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    background: var(--color-bg-secondary);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
}

.profile-events-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.profile-event-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--color-bg-secondary);
    border-radius: var(--radius-md);
    transition: background 0.2s ease;
}

.profile-event-item:hover {
    background: var(--color-surface-hover);
}

.profile-event-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 50px;
    padding: var(--space-sm);
    background: var(--color-surface);
    border-radius: var(--radius-sm);
}

.profile-event-month {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--color-accent-orange);
    font-weight: 600;
}

.profile-event-day {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-text-primary);
}

.profile-event-details {
    flex: 1;
}

.profile-event-club {
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 2px;
}

.profile-event-track {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}

.profile-event-link {
    color: var(--color-accent-orange);
    text-decoration: none;
    font-size: 1.2rem;
    transition: transform 0.2s ease;
}

.profile-event-link:hover {
    transform: translateX(4px);
}

.profile-view-all {
    display: block;
    text-align: center;
    margin-top: var(--space-md);
    color: var(--color-accent-cyan);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s ease;
}

.profile-view-all:hover {
    color: var(--color-text-primary);
}

.profile-empty {
    text-align: center;
    color: var(--color-text-muted);
    padding: var(--space-lg);
}

.profile-browse-link {
    display: inline-block;
    margin-top: var(--space-md);
    color: var(--color-accent-orange);
    text-decoration: none;
}

/* Calendar Export */
.profile-calendar-export {
    text-align: center;
}

.profile-calendar-desc {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    margin-bottom: var(--space-lg);
}

.profile-calendar-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    background: var(--color-bg-secondary);
    border: 2px solid var(--color-accent-cyan);
    color: var(--color-accent-cyan);
    border-radius: var(--radius-md);
    text-decoration: none;
    font-family: var(--font-display);
    font-weight: 600;
    transition: all 0.2s ease;
}

.profile-calendar-btn:hover {
    background: var(--color-accent-cyan);
    color: var(--color-bg-primary);
}

.profile-calendar-icon {
    font-size: 1.2rem;
}

.profile-calendar-hint {
    margin-top: var(--space-md);
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

/* Account Section */
.profile-account-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.profile-account-row {
    display: flex;
    justify-content: space-between;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--color-border);
}

.profile-account-label {
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.profile-account-value {
    color: var(--color-text-primary);
    font-size: 0.85rem;
}

.verified-badge {
    color: var(--color-accent-green);
}

.unverified-badge {
    color: var(--color-accent-yellow);
}

.profile-name-form {
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-border);
}

.profile-password-form {
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-border);
}

.profile-form-title {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-md);
}

.profile-save-btn {
    width: 100%;
    padding: var(--space-md);
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--color-surface-hover);
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: var(--space-md);
}

.profile-save-btn:hover {
    border-color: var(--color-accent-orange);
    color: var(--color-accent-orange);
}

.profile-future-desc {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.profile-subscription-desc {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: var(--space-lg);
}

.profile-tracks-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.profile-tracks-controls {
    display: flex;
    gap: var(--space-xs);
}

.profile-tracks-search {
    background: var(--color-bg-secondary);
    border-radius: var(--radius-sm);
}

.profile-tracks-list {
    max-height: 240px;
    overflow-y: auto;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg-secondary);
}

.profile-tracks-list .select-option {
    border-bottom: 1px solid var(--color-border);
}

.profile-tracks-list .select-option:last-child {
    border-bottom: none;
}

/* ========================================
   Event Card Attendance Button
   ======================================== */

.event-attendance-btn {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: transparent;
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.event-attendance-btn:hover {
    border-color: var(--color-accent-green);
    color: var(--color-accent-green);
}

.event-attendance-btn.attending {
    background: rgba(6, 255, 165, 0.15);
    border-color: var(--color-accent-green);
    color: var(--color-accent-green);
}

.event-attendance-btn.attending:hover {
    background: rgba(255, 62, 108, 0.15);
    border-color: #ff3e6c;
    color: #ff3e6c;
}

.attendance-icon {
    font-size: 1rem;
}

/* My Events Filter Chip */
.filter-chip-my-events {
    background: rgba(6, 255, 165, 0.15);
    border-color: var(--color-accent-green);
    color: var(--color-accent-green);
}

/* Header Brand */
.header-brand h1 {
    margin-bottom: 0;
}

.header-actions {
    position: absolute;
    right: 0;
    top: 0;
    display: flex;
    align-items: center;
}

/* Event Footer */
.event-footer-left {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.header-profile-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    color: var(--color-text-secondary);
    transition: all 0.2s ease;
}

.header-profile-avatar svg {
    width: 20px;
    height: 20px;
}

.header-profile-avatar:hover {
    border-color: var(--color-accent-cyan);
    color: var(--color-accent-cyan);
}

.header-profile-avatar-active {
    border-color: var(--color-accent-orange);
    color: var(--color-accent-orange);
}

/* Profile Page Back Link */
.profile-back-link {
    position: absolute;
    top: var(--space-lg);
    left: var(--space-lg);
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--color-text-secondary);
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    z-index: 10;
}

.profile-back-link:hover {
    color: var(--color-accent-orange);
}

.profile-back-arrow {
    font-size: 1.2rem;
    transition: transform 0.2s ease;
}

.profile-back-link:hover .profile-back-arrow {
    transform: translateX(-4px);
}

/* Highlighted checkbox */
.checkbox-label-highlight {
    background: rgba(6, 255, 165, 0.1);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-accent-green);
}

/* Responsive auth */
@media (max-width: 768px) {
    .auth-card {
        padding: var(--space-xl);
        margin: var(--space-md);
    }

    .auth-back-link {
        top: var(--space-md);
        left: var(--space-md);
    }

    .profile-back-link {
        top: var(--space-md);
        left: var(--space-md);
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .profile-grid {
        grid-template-columns: 1fr;
    }

    .header-content {
        flex-direction: column;
        gap: var(--space-md);
    }

    .header-actions {
        position: static;
        transform: none;
    }

    .header-user {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .event-footer-left {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
    }
}
