:root {
    --bg: #0a0c10;
    --surface: #161b22;
    --surface-hover: #1c2128;
    --primary: #3ba0ff;
    --primary-dim: rgba(59, 160, 255, 0.1);
    --text: #e6edf3;
    --text-muted: #8b949e;
    --border: #30363d;
    --danger: #ff7b72;
    --success: #3fb950;
    --header-height: 64px;
    --bottom-nav-height: 70px;
    --radius: 12px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
    margin: 0;
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Outfit', sans-serif;
    line-height: 1.5;
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Header */
.header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--header-height);
    background: rgba(10, 12, 16, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 20px;
    z-index: 1000;
    justify-content: space-between;
}

.brand {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--primary);
}

/* Grid System */
.gallery {
    padding: calc(var(--header-height) + 16px) 8px calc(var(--bottom-nav-height) + 16px);
    max-width: 1600px;
    margin: 0 auto;
}

.year-section { margin-bottom: 32px; }
.year-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 8px 12px;
    position: sticky;
    top: var(--header-height);
    background: var(--bg);
    z-index: 10;
    margin: 0;
}

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

@media (max-width: 768px) {
    .grid { grid-template-columns: repeat(3, 1fr); gap: 2px; }
    .header { padding: 0 12px; }
}

.media-item {
    aspect-ratio: 1;
    background: var(--surface);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    border-radius: 4px;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.media-item:hover { transform: scale(1.02); z-index: 2; }
.media-item img, .media-item video {
    width: 100%; height: 100%;
    object-fit: cover;
}

/* Upload Notification (Windows Style) */
.upload-panel {
    position: fixed;
    bottom: calc(var(--bottom-nav-height) + 20px);
    right: 20px;
    width: 360px;
    max-width: calc(100vw - 40px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    z-index: 2000;
    transform: translateY(120%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.upload-panel.active { transform: translateY(0); }

.upload-header {
    padding: 12px 16px;
    background: var(--surface-hover);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.upload-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 8px 0;
}

.upload-item {
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.upload-info { flex: 1; min-width: 0; }
.upload-name { 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    font-weight: 500;
}
.upload-status { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.upload-progress-container {
    height: 4px;
    background: var(--bg);
    border-radius: 2px;
    margin-top: 6px;
    overflow: hidden;
}
.upload-progress-bar {
    height: 100%;
    background: var(--primary);
    width: 0;
    transition: width 0.2s;
}

/* Bottom Nav */
.bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: var(--bottom-nav-height);
    background: rgba(22, 27, 34, 0.9);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 11px;
    gap: 4px;
    flex: 1;
}

.nav-item.active { color: var(--primary); }
.nav-item i { font-size: 20px; }

/* Buttons */
.btn {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn:hover { background: var(--surface-hover); border-color: var(--text-muted); }
.btn.primary { background: var(--primary); border: none; color: #000; }
.btn.primary:hover { background: #58a6ff; }
