:root {
    /* Design Language: Rugged, Content-First */
    --color-primary: #111827;
    /* Charcoal */
    --color-bg: #F9FAFB;
    /* Off-white */
    --color-accent: #F97316;
    /* Orange */
    --color-muted: #6B7280;
    --color-border: #E5E7EB;
    --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --spacing-unit: 8px;
    --border-radius: 6px;
    --max-width: 600px;
    /* Mobile-first limit for body */
}

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

body {
    font-family: var(--font-stack);
    background-color: var(--color-bg);
    color: var(--color-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Typography */
h1,
h2,
h3 {
    font-weight: 600;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Layout */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: calc(var(--spacing-unit) * 2);
}

/* Responsive Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: calc(var(--spacing-unit) * 3);
    padding: var(--spacing-unit) 0;
    position: relative;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
    z-index: 20;
    /* Ensure logo stays on top of menu */
}

/* Desktop Nav - Default */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Burger Button - Hidden on Desktop */
.burger-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 24px;
    padding: 4px;
    z-index: 20;
}

/* Mobile Menu - Hidden by default */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: white;
    z-index: 10;
    padding: 80px 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}

.mobile-menu.open {
    transform: translateX(0);
}

.mobile-menu a {
    font-size: 20px;
    font-weight: 600;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border);
}

/* Media Query for Mobile */
@media (max-width: 768px) {
    .nav-actions {
        display: none;
        /* Hide desktop nav */
    }

    .burger-btn {
        display: block;
        /* Show burger */
    }
}

.logo {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Components: Chips */
.chips-scroll {
    display: flex;
    overflow-x: auto;
    gap: var(--spacing-unit);
    margin-bottom: calc(var(--spacing-unit) * 3);
    padding-bottom: var(--spacing-unit);
    scrollbar-width: none;
    /* Firefox */
}

.chips-scroll::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.chip {
    padding: 6px 14px;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
}

.chip.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

/* Components: Event Card */
.event-card {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: calc(var(--spacing-unit) * 2);
    margin-bottom: calc(var(--spacing-unit) * 2);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-unit);
    transition: transform 0.1s;
}

.event-card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing-unit);
}

.event-card:active {
    transform: scale(0.99);
}

.event-meta {
    font-size: 13px;
    color: var(--color-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 2px;
}

.event-details-row {
    display: flex;
    align-items: center;
    gap: var(--spacing-unit);
    font-size: 14px;
    color: var(--color-muted);
    margin-top: 4px;
}

.badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;

    /* Detail Page specific */
    background: #E5E7EB;
    color: var(--color-primary);
    text-transform: uppercase;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--color-primary);
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    margin: 12px 0 24px 0;
    line-height: 1.1;
}

.badge.large {
    font-size: 13px;
    padding: 4px 8px;
}

.info-group {
    margin-bottom: 24px;
}

.info-label {
    font-size: 13px;
    text-transform: uppercase;
    color: var(--color-muted);
    font-weight: 600;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 16px;
    font-weight: 500;
}

.description {
    white-space: pre-line;
    line-height: 1.6;
    color: #374151;
}

/* Sticky Footer */
.sticky-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 16px 24px;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* For desktop, maybe center or limit width of sticky footer if container is centered */
@media (min-width: 600px) {
    .sticky-footer {
        max-width: var(--max-width);
        margin: 0 auto;
        border-left: 1px solid var(--color-border);
        border-right: 1px solid var(--color-border);
    }
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    min-width: 140px;
    transition: opacity 0.2s;
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background-color: var(--color-muted);
}

.capacity-indicator {
    display: flex;
    flex-direction: column;
}

/* Add padding to bottom of container so content isn't hidden by sticky footer */
.container {
    padding-bottom: 100px;
}

/* Forms & Auth */
.form-group {
    margin-bottom: 16px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 14px;
}

input,
select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    font-size: 16px;
    font-family: inherit;
    height: 45px;
    /* Enforce consistent height */
    background-color: white;
}

.error-message {
    color: #DC2626;
    margin-bottom: 16px;
    font-size: 14px;
}

.auth-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 14px;
    color: var(--color-muted);
}

.auth-footer a {
    color: var(--color-primary);
    font-weight: 600;
}

/* Additional Form Styles (Ported from create-event) */
.form-container {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
}

.form-actions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
}

.btn-secondary {
    background-color: #f0f0f0;
    color: #333;
}

/* Modal Styles */
/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 24px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transform: scale(0.95);
    transition: transform 0.2s ease;
}

.modal-overlay.open .modal-content {
    transform: scale(1);
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.modal-text {
    color: var(--color-muted);
    font-size: 14px;
    margin-bottom: 24px;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.btn-danger {
    background-color: #DC2626;
    color: white;
}

.btn-text {
    background: none;
    color: var(--color-primary);
    padding: 12px 16px;
    font-weight: 500;
}