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

:root {
    --bg-body: #ffffff;
    --border-github: #d0d7de;

    --tertiary-fixed-dim: 213 186 255;
    --on-error-container: 65 0 2;
    --error: 186 26 26;
    --surface-dim: 216 218 214;
    --on-surface-variant: 67 71 63;
    --on-surface: 26 28 25;
    --surface-tint: 35 134 54;
    --primary-container: 141 255 173;
    --secondary-fixed-dim: 172 199 255;
    --tertiary-container: 236 220 255;
    --primary-fixed: 141 255 173;
    --primary-fixed-dim: 63 185 80;
    --on-tertiary: 255 255 255;
    --on-error: 255 255 255;
    --on-tertiary-fixed-variant: 89 40 162;
    --surface-container-highest: 225 227 223;
    --surface-bright: 248 250 246;
    --surface: 248 250 246;
    --surface-container: 236 238 234;
    --on-primary-fixed-variant: 0 83 25;
    --on-secondary-fixed: 0 26 64;
    --surface-variant: 225 227 221;
    --inverse-primary: 63 185 80;
    --on-tertiary-fixed: 39 0 87;
    --outline: 115 119 110;
    --inverse-on-surface: 240 241 236;
    --on-primary-fixed: 0 33 6;
    --surface-container-lowest: 255 255 255;
    --on-secondary: 255 255 255;
    --background: 248 250 246;
    --tertiary-fixed: 236 220 255;
    --inverse-surface: 47 50 46;
    --on-primary-container: 0 33 6;
    --error-container: 255 218 214;
    --secondary: 2 110 228;
    --on-primary: 255 255 255;
    --on-tertiary-container: 39 0 87;
    --tertiary: 109 63 174;
    --secondary-fixed: 215 226 255;
    --primary: 35 134 54;
    --surface-container-low: 242 244 240;
    --on-background: 26 28 25;
    --secondary-container: 215 226 255;
    --on-secondary-fixed-variant: 0 68 146;
    --on-secondary-container: 0 26 64;
    --surface-container-high: 230 233 228;
    --outline-variant: 193 198 187;
}

.dark {
    --bg-body: #0d1117;
    --border-github: #30363d;

    --tertiary-fixed-dim: 213 186 255;
    --on-error-container: 255 218 214;
    --error: 255 180 171;
    --surface-dim: 16 20 26;
    --on-surface-variant: 190 202 186;
    --on-surface: 223 226 235;
    --surface-tint: 63 185 80;
    --primary-container: 35 134 54;
    --secondary-fixed-dim: 172 199 255;
    --tertiary-container: 137 92 212;
    --primary-fixed: 141 255 173;
    --primary-fixed-dim: 63 185 80;
    --on-tertiary: 66 0 138;
    --on-error: 105 0 5;
    --on-tertiary-fixed-variant: 89 40 162;
    --surface-container-highest: 49 53 60;
    --surface-bright: 53 57 64;
    --surface: 16 20 26;
    --surface-container: 28 32 38;
    --on-primary-fixed-variant: 0 83 25;
    --on-secondary-fixed: 0 26 64;
    --surface-variant: 49 53 60;
    --inverse-primary: 35 134 54;
    --on-tertiary-fixed: 39 0 87;
    --outline: 137 148 133;
    --inverse-on-surface: 45 49 55;
    --on-primary-fixed: 0 33 6;
    --surface-container-lowest: 10 14 20;
    --on-secondary: 0 47 104;
    --background: 16 20 26;
    --tertiary-fixed: 236 220 255;
    --inverse-surface: 223 226 235;
    --on-primary-container: 249 255 243;
    --error-container: 147 0 10;
    --secondary: 172 199 255;
    --on-primary: 0 57 14;
    --on-tertiary-container: 255 252 255;
    --tertiary: 213 186 255;
    --secondary-fixed: 215 226 255;
    --primary: 63 185 80;
    --surface-container-low: 24 28 34;
    --on-background: 223 226 235;
    --secondary-container: 2 110 228;
    --on-secondary-fixed-variant: 0 68 146;
    --on-secondary-container: 248 248 255;
    --surface-container-high: 38 42 49;
    --outline-variant: 63 74 61;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background-color: var(--bg-body);
    color: rgb(var(--on-background));
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.view { display: none; }
.view.active { display: block; }

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
}

.github-border {
    border: 1px solid var(--border-github);
}

.glow-effect {
    box-shadow: 0 0 20px rgba(35, 134, 54, 0.15);
}

.glow-border:focus-within {
    box-shadow: 0 0 0 2px rgb(var(--secondary-container) / 0.4);
}

.primary-gradient {
    background: linear-gradient(180deg, #2ea043 0%, #238636 100%);
}

.primary-gradient:hover {
    background: linear-gradient(180deg, #3fb950 0%, #2ea043 100%);
}

#drop-zone.dragover {
    border-color: rgb(var(--primary));
    background-color: rgb(var(--primary-container) / 0.08);
}

header.header-scrolled {
    background-color: rgb(var(--surface-container) / 0.92);
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.transfers { margin-bottom: 16px; }

.transfer-item {
    background: rgb(var(--surface-container-low));
    border: 1px solid rgb(var(--outline-variant));
    border-radius: 12px;
    padding: 16px 20px;
}

.transfer-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.transfer-name {
    font-weight: 500;
    color: rgb(var(--on-surface));
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 70%;
}

.transfer-size {
    color: rgb(var(--on-surface-variant));
    flex-shrink: 0;
}

.transfer-progress-bar {
    height: 6px;
    background: rgb(var(--surface-variant) / 0.5);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}

.transfer-progress-fill {
    height: 100%;
    background: rgb(var(--primary));
    border-radius: 3px;
    transition: width 0.3s;
    width: 0%;
}

.transfer-status {
    font-size: 0.8rem;
    color: rgb(var(--on-surface-variant));
}

.transfer-status.error {
    color: rgb(var(--error));
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgb(var(--outline-variant));
    border-top-color: rgb(var(--primary));
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
