:root {
    --vibrant-yellow: #ffc107;
    --vibrant-orange: #fd7e14;
    --vibrant-green: #28a745;
    --vibrant-red: #e74c3c;
    --vibrant-cyan: #0dcaf0;
}

body {
    font-family: 'Raleway', sans-serif;
    scroll-behavior: smooth;
    background: #0f0f0f;
    color: white;
    overflow-x: hidden;
    position: relative;
}
body.dark { background:#0f0f0f; color:white; }
body.light { background:#f5f5f5; color:#111; }

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../assets/background.jpg') no-repeat center center fixed;
    background-size: cover;
    z-index: -3;
    transform: translateZ(0);
}

body::after {
    content: "";
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: radial-gradient(circle at 20% 30%, rgba(255,255,255,0.03) 0%, transparent 40%),
                radial-gradient(circle at 80% 70%, rgba(255,255,255,0.03) 0%, transparent 40%);
    animation: backgroundMove 20s linear infinite;
    z-index: -2;
}

@keyframes backgroundMove {
    0% { background-position: 20% 30%, 80% 70%; }
    50% { background-position: 30% 20%, 70% 80%; }
    100% { background-position: 20% 30%, 80% 70%; }
}

.topbar {
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    padding: 0.5rem 1rem;
    position: relative;
    z-index: 999;
}

.language-switcher .lang-link {
    color: #f8f9fa;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.language-switcher .lang-link:hover {
    color: var(--vibrant-yellow);
}

.language-switcher .separator {
    color: #ccc;
}

#themeToggle {
    border: none;
    background: none;
    color: #f8f9fa;
    font-size: 1.2rem;
}

#clock { font-weight: 600; }

.hero-section {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0));
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.logo-link {
    display: block;
    position: relative;
    width: 100%;
    max-width: 360px;
    margin: 20px auto;
}

.logo-link img.base {
    width: 100%;
    transition: opacity 0.3s ease;
}

.logo-link img.hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.logo-link:hover img.hover {
    opacity: 1;
}

.card {
    background: rgba(33, 33, 33, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border-radius: 15px;
    transition: all 0.3s ease;
    color: inherit;
}

body.dark .card { color: #fff; }
body.light .card { color: #111; }

.card:hover {
    transform: translateY(-6px);
    background-color: rgba(41, 41, 41, 0.5);
    box-shadow: 0 0 20px rgba(255, 193, 7, 0.3);
}

.btn {
    transition: all 0.3s ease;
    transform-origin: center;
}

.btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(255, 193, 7, 0.4);
}

.heatmap-grid { display:grid; grid-template-columns:repeat(25,1fr); gap:3px; align-items:center; }
.heat-day { font-size:0.75rem; text-align:center; opacity:0.8; }
.heat-cell { width:100%; aspect-ratio:1; border-radius:3px; background:rgba(255,255,255,0.05); }
.heatmap-legend { display:flex; align-items:center; margin-top:6px; }
.heatmap-legend .legend-bar { flex:1; height:10px; border-radius:3px; margin:0 8px; }
.legend-label { font-size:0.8rem; }
.time-marker { position:absolute; top:0; bottom:0; width:2px; background:red; pointer-events:none; }

#network-map {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    overflow: hidden;
    background: radial-gradient(circle at 50% 35%, rgba(40, 60, 99, 0.45), rgba(13, 23, 43, 0.9));
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.18), 0 18px 45px rgba(2, 6, 23, 0.45);
}

body.light #network-map {
    background: radial-gradient(circle at 50% 35%, rgba(226, 232, 240, 0.65), rgba(148, 163, 184, 0.35));
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.12), 0 12px 32px rgba(15, 23, 42, 0.18);
}

.network-map {
    position: relative;
    width: 100%;
    height: 100%;
}

.network-map__svg {
    display: block;
    width: 100%;
    height: 100%;
    color: #94a3b8;
}

.network-map__globe-shadow {
    fill: rgba(15, 23, 42, 0.75);
    stroke: rgba(51, 65, 85, 0.4);
    stroke-width: 1.2;
}

.network-map__grid-line {
    fill: none;
    stroke: rgba(71, 85, 105, 0.28);
    stroke-width: 0.6;
}

.network-map__continent {
    fill: rgba(30, 64, 175, 0.35);
    stroke: rgba(96, 165, 250, 0.35);
    stroke-width: 0.6;
}

.network-map__link-trail {
    fill: none;
    stroke-linecap: round;
    stroke-width: 3.5;
    stroke: rgba(37, 99, 235, 0.35);
}

.network-map__link {
    fill: none;
    stroke-linecap: round;
    stroke-width: 2.1;
    stroke: url(#network-map-link-gradient);
    stroke-dasharray: 10 18;
    animation: network-map-flow 3.6s linear infinite;
}

.network-map__node-halo {
    fill: rgba(59, 130, 246, 0.18);
    transform-origin: center;
    transform-box: fill-box;
    animation: network-map-pulse 3.5s ease-out infinite;
}

.network-map__node-dot {
    fill: #f8fafc;
    stroke: rgba(59, 130, 246, 0.75);
    stroke-width: 1.5;
}

.network-map__label {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.01em;
    text-anchor: middle;
    fill: #e2e8f0;
    paint-order: stroke;
    stroke: rgba(15, 23, 42, 0.85);
    stroke-width: 3;
}

.network-map__label tspan {
    font-size: 11px;
    font-weight: 400;
    fill: rgba(148, 163, 184, 0.95);
}

.network-map__label[data-position='above'] {
    dominant-baseline: auto;
}

.network-map__label[data-position='below'] {
    dominant-baseline: hanging;
}

@keyframes network-map-pulse {
    0% {
        transform: scale(0.65);
        opacity: 0.6;
    }
    60% {
        transform: scale(1.25);
        opacity: 0;
    }
    100% {
        transform: scale(1.35);
        opacity: 0;
    }
}

@keyframes network-map-flow {
    0% {
        stroke-dashoffset: 0;
    }
    100% {
        stroke-dashoffset: -140;
    }
}

@media (max-width: 640px) {
    #network-map {
        aspect-ratio: 4 / 3;
    }

    .network-map__label {
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .network-map__node-halo,
    .network-map__link {
        animation: none !important;
    }
}

.todo-overview-card {
    background: rgba(33, 33, 33, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: inherit;
}

body.light .todo-overview-card {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(17, 17, 17, 0.08);
}

.todo-overview-card h5 {
    font-weight: 700;
}

.todo-cache-label {
    font-size: 0.85rem;
    opacity: 0.75;
    margin-bottom: 0;
}

.todo-average-label {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.7;
}

.todo-average-value {
    font-weight: 700;
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    color: var(--vibrant-yellow);
    line-height: 1.1;
}

body.light .todo-average-value {
    color: var(--vibrant-orange);
}

.todo-summary-card {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    height: 100%;
}

body.light .todo-summary-card {
    background: rgba(17, 17, 17, 0.04);
    border-color: rgba(17, 17, 17, 0.08);
}

.todo-summary-card .todo-summary-label {
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 0.8;
}

.todo-summary-card .todo-summary-value {
    font-size: 1.75rem;
    font-weight: 700;
}

.todo-summary-card.status-open { border-left: 4px solid var(--vibrant-yellow); }
.todo-summary-card.status-in-progress { border-left: 4px solid var(--vibrant-orange); }
.todo-summary-card.status-blocked { border-left: 4px solid var(--vibrant-red); }
.todo-summary-card.status-done { border-left: 4px solid var(--vibrant-green); }

.todo-table {
    margin-top: 1.75rem;
    max-height: calc(10 * 3.5rem);
    overflow-y: auto;
}
.todo-table table {
    color: inherit;
    background: rgba(33, 33, 33, 0.45);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    border-collapse: separate;
    border-spacing: 0;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
    overflow: hidden;
    width: 100%;
}
.todo-table thead th {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    background: transparent;
    color: rgba(255, 255, 255, 0.82);
    padding: 0.95rem 1.25rem;
}
.todo-table tbody td {
    padding: 1rem 1.25rem;
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
}

body.light .todo-table thead th {
    border-color: rgba(17, 17, 17, 0.1);
    color: rgba(17, 17, 17, 0.72);
}

.todo-table tbody tr {
    border-color: rgba(255, 255, 255, 0.08);
    background: transparent;
    transition: background 0.2s ease, transform 0.2s ease;
}
.todo-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.08);
}
.todo-table tbody tr:last-child td {
    border-bottom: none;
}
.todo-table tbody td,
.todo-table tbody th {
    border-color: rgba(255, 255, 255, 0.06);
}
body.light .todo-table table {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(17, 17, 17, 0.08);
    box-shadow: 0 12px 28px rgba(17, 17, 17, 0.12);
}

body.light .todo-table tbody tr {
    border-color: rgba(17, 17, 17, 0.06);
    color: rgba(17, 17, 17, 0.85);
}
body.light .todo-table tbody tr:hover {
    background: rgba(17, 17, 17, 0.05);
}
body.light .todo-table tbody td,
body.light .todo-table tbody th {
    border-color: rgba(17, 17, 17, 0.06);
    background: transparent;
    color: rgba(17, 17, 17, 0.82);
}

.todo-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.todo-status-in-progress { background: rgba(253, 126, 20, 0.18); color: var(--vibrant-orange); }
.todo-status-testing { background: rgba(13, 202, 240, 0.18); color: var(--vibrant-cyan); }
.todo-status-blocked { background: rgba(231, 76, 60, 0.22); color: var(--vibrant-red); }
.todo-status-done { background: rgba(40, 167, 69, 0.18); color: var(--vibrant-green); }
.todo-status-backlog,
.todo-status-open { background: rgba(255, 193, 7, 0.18); color: var(--vibrant-yellow); }

body.light .todo-status-in-progress { background: rgba(253, 126, 20, 0.12); }
body.light .todo-status-testing { background: rgba(13, 202, 240, 0.12); }
body.light .todo-status-blocked { background: rgba(231, 76, 60, 0.12); }
body.light .todo-status-done { background: rgba(40, 167, 69, 0.12); }
body.light .todo-status-backlog,
body.light .todo-status-open { background: rgba(255, 193, 7, 0.12); }

.todo-progress-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 10rem;
    width: 100%;
}

.todo-progress-wrapper .progress {
    flex: 1 1 auto;
    height: 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);

    min-width: 0;
}

body.light .todo-progress-wrapper .progress {
    background: rgba(17, 17, 17, 0.12);
    box-shadow: inset 0 0 0 1px rgba(17, 17, 17, 0.08);
}

.todo-progress-wrapper .progress-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 0.75rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    background: linear-gradient(90deg, var(--vibrant-orange), var(--vibrant-green));
    transition: width 0.35s ease;
    position: relative;

}

.todo-progress-wrapper .progress-bar.progress-status-open,
.todo-progress-wrapper .progress-bar.progress-status-backlog {
    background: linear-gradient(90deg, var(--vibrant-yellow), #ffe27a);
    color: #111;
}

.todo-progress-wrapper .progress-bar.progress-status-in-progress {
    background: linear-gradient(90deg, var(--vibrant-orange), #ffbb64);
}

.todo-progress-wrapper .progress-bar.progress-status-testing {
    background: linear-gradient(90deg, var(--vibrant-cyan), #6de3ff);
}

.todo-progress-wrapper .progress-bar.progress-status-blocked {
    background: linear-gradient(90deg, var(--vibrant-red), #ff8a80);
}

.todo-progress-wrapper .progress-bar.progress-status-done {
    background: linear-gradient(90deg, var(--vibrant-green), #6bdc8f);
}


.todo-progress-bar-label {
    font-weight: 700;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
    width: 100%;
    text-align: center;
    color: #fff;
}

.todo-progress-wrapper .progress-bar.progress-status-open .todo-progress-bar-label,
.todo-progress-wrapper .progress-bar.progress-status-backlog .todo-progress-bar-label {
    color: #111;
    text-shadow: none;
}


.todo-progress-value {
    font-size: 0.85rem;
    font-weight: 600;
    min-width: 3rem;
    text-align: right;
}

.todo-placeholder {
    border: 1px dashed rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 2rem 1.5rem;
    text-align: center;
    margin-top: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.8);
}

body.light .todo-placeholder {
    border-color: rgba(17, 17, 17, 0.2);
    background: rgba(17, 17, 17, 0.04);
    color: rgba(17, 17, 17, 0.75);
}

.todo-placeholder-note {
    font-size: 0.85rem;
    opacity: 0.8;
}
