:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --accent-primary: #38bdf8;
    --accent-secondary: #818cf8;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --success: #4ade80;
    --warning: #facc15;
    --danger: #f87171;
    --glass-border: rgba(255, 255, 255, 0.1);
    --card-full-opacity: 0.5;
}

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

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(at 0% 0%, rgba(56, 189, 248, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(129, 140, 248, 0.15) 0px, transparent 50%);
    color: var(--text-main);
    line-height: 1.5;
    min-height: 100vh;
    padding: 2rem 1rem;
}

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

header {
    text-align: center;
    margin-bottom: 3rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(to right, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.status-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.refresh-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s;
}

.refresh-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

section {
    margin-bottom: 3rem;
}

h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

h2::before {
    content: '';
    display: block;
    width: 4px;
    height: 1.25rem;
    background: var(--accent-primary);
    border-radius: 2px;
}

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

.card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.time {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.badge {
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-green { background: rgba(74, 222, 128, 0.2); color: var(--success); }
.badge-blue { background: rgba(56, 189, 248, 0.2); color: var(--accent-primary); }

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.card-details {
    font-size: 0.875rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.spots {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.spot-indicator {
    display: flex;
    gap: 4px;
}

.spot-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.spot-dot.filled { background: var(--success); }
.spot-dot.open { background: var(--warning); border: 1px solid var(--warning); box-shadow: 0 0 8px var(--warning); }

.empty-state {
    text-align: center;
    padding: 3rem;
    background: var(--card-bg);
    border-radius: 1rem;
    border: 1px dashed var(--glass-border);
    color: var(--text-muted);
}

.join-link {
    display: block;
    margin-top: 1.5rem;
    text-align: center;
    padding: 0.75rem;
    background: linear-gradient(to right, var(--accent-primary), var(--accent-secondary));
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    transition: opacity 0.2s;
}

.join-link:hover {
    opacity: 0.9;
}

/* Toggle Switch Styling */
.toggle-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    border: 1px solid var(--glass-border);
}

.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #334155;
    transition: .4s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--accent-primary);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* Full card styling */
.card.is-full {
    opacity: var(--card-full-opacity);
    filter: grayscale(0.5);
}

.card.is-full:not(.visible) {
    display: none;
}

.card.is-full .badge {
    background: rgba(248, 113, 113, 0.2);
    color: var(--danger);
}

@media (max-width: 640px) {
    h1 { font-size: 2rem; }
    .grid { grid-template-columns: 1fr; }
}
