:root {
    --bg-color: #0f172a;
    --panel-bg: rgba(30, 41, 59, 0.7);
    --panel-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --secondary-color: #475569;
    --secondary-hover: #334155;
    --highlight: #60a5fa;
    --success: #10b981;
    --danger: #ef4444;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Background Animated Blobs */
.background-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 10s infinite ease-in-out alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, #3b82f6, #8b5cf6);
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 35vw;
    height: 35vw;
    background: radial-gradient(circle, #ec4899, #8b5cf6);
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(5%, 5%) scale(1.1); }
}

/* Layout */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.highlight {
    color: var(--highlight);
    font-weight: 500;
}

/* Glassmorphism Panel */
.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--panel-border);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
}

/* Upload Section */
.upload-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    border: 2px dashed rgba(96, 165, 250, 0.4);
    cursor: pointer;
}

.upload-section:hover, .upload-section.dragover {
    border-color: var(--primary-color);
    background: rgba(30, 41, 59, 0.8);
}

.upload-content {
    text-align: center;
}

.upload-icon {
    width: 64px;
    height: 64px;
    color: var(--highlight);
    margin-bottom: 1rem;
}

.upload-content h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.upload-content p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Buttons */
button {
    cursor: pointer;
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: var(--secondary-hover);
}

/* Results Section */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.week-navigation {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--panel-border);
    border-radius: 0.5rem;
    padding: 0.25rem;
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.icon-btn svg {
    width: 20px;
    height: 20px;
}

.date-picker {
    background: transparent;
    border: none;
    color: var(--text-main);
    padding: 0.25rem 0.5rem;
    outline: none;
    font-family: 'Inter', sans-serif;
    color-scheme: dark;
}

.search-input {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--panel-border);
    color: var(--text-main);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    outline: none;
    font-family: 'Inter', sans-serif;
    min-width: 200px;
}
.search-input:focus {
    border-color: var(--primary-color);
}

.date-picker {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--panel-border);
    color: var(--text-main);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    outline: none;
    font-family: 'Inter', sans-serif;
}

/* Table */
.table-container {
    overflow-x: auto;
    border-radius: 0.5rem;
    border: 1px solid var(--panel-border);
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

thead th {
    background: rgba(15, 23, 42, 0.8);
    padding: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1px solid var(--panel-border);
}

tbody td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

tbody tr {
    transition: background-color 0.2s ease;
}

tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Weekly view specifics */
.sunday-col {
    color: #ef4444 !important;
}

tbody td.sunday-col {
    background-color: rgba(239, 68, 68, 0.05);
}

.cell-content {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    align-items: center;
    min-height: 50px;
    justify-content: center;
}

.pill {
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.pill-in {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(52, 211, 153, 0.3);
}

.pill-out {
    background: rgba(249, 115, 22, 0.15);
    color: #fb923c;
    border: 1px solid rgba(251, 146, 60, 0.3);
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

/* Utilities */
.hidden {
    display: none !important;
}

footer {
    margin-top: auto;
    text-align: center;
    padding-top: 2rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 640px) {
    .results-header {
        flex-direction: column;
        align-items: stretch;
    }
    .actions {
        flex-direction: column;
    }
}
