﻿body {
}

/* ====== Root safety (avoid collisions) ====== */
#it-showdown-root {
    all: initial;
}

#it-showdown-root * {
    box-sizing: border-box;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* ====== Tab ====== */
#it-showdown-tab {
    all: unset;
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9998;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 14px 14px 12px;
    border-radius: 16px 0 0 16px;
    cursor: pointer;
    user-select: none;
    background: linear-gradient(135deg, #0b1230, #0b1d47);
    box-shadow: 0 12px 28px rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.12);
    color: #fff;
}

    #it-showdown-tab:hover {
        transform: translateY(-50%) translateX(-4px);
        transition: transform 180ms ease;
    }

.it-tab-icon {
    font-size: 18px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

.it-tab-text {
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.it-tab-chevron {
    font-size: 16px;
    opacity: 0.85;
}

/* ====== Overlay ====== */
#it-showdown-overlay {
    position: fixed;
    inset: 0;
    z-index: 9997;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(3px);
}

/* ====== Drawer ====== */
#it-showdown-drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(520px, 92vw);
    z-index: 9999;
    background: radial-gradient(circle at top right, rgba(0,194,255,0.15), transparent 40%), linear-gradient(180deg, #060816, #0b1230 30%, #05060f);
    color: #fff;
    box-shadow: -22px 0 52px rgba(0,0,0,0.55);
    border-left: 1px solid rgba(255,255,255,0.12);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 260ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

    #it-showdown-drawer.it-open {
        transform: translateX(0);
    }

/* ====== Header ====== */
.it-drawer-header {
    padding: 18px 18px 14px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.it-title-line {
    display: flex;
    align-items: center;
    gap: 10px;
}

.it-title-badge {
    font-size: 20px;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.5));
}

.it-title {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.3px;
}

.it-subtitle {
    margin-top: 4px;
    font-size: 12px;
    opacity: 0.85;
}

.it-close-btn {
    all: unset;
    cursor: pointer;
    font-size: 16px;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
}

    .it-close-btn:hover {
        background: rgba(255,255,255,0.14);
    }

/* ====== Board ====== */
.it-board {
    position: relative;
    padding: 16px 18px 18px;
    overflow: auto;
    flex: 1;
}

.it-board-top {
    position: relative;
    margin-bottom: 14px;
    height: 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    overflow: hidden;
}

.it-board-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(0,194,255,0.55), transparent);
    animation: itGlowSweep 2.4s linear infinite;
}

@keyframes itGlowSweep {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* ====== Project rows ====== */
.it-project-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.it-project {
    position: relative;
    padding: 14px 14px;
    border-radius: 18px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 12px 26px rgba(0,0,0,0.25);
    overflow: hidden;
}

    .it-project::before {
        content: "";
        position: absolute;
        inset: 0;
        background: radial-gradient(circle at top left, rgba(255,255,255,0.10), transparent 55%);
        pointer-events: none;
    }

.it-row-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.it-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 14px;
    background: rgba(0,194,255,0.14);
    border: 1px solid rgba(0,194,255,0.25);
    font-weight: 900;
    flex-shrink: 0;
}

    .it-rank.it-rank-1 {
        background: rgba(255,215,0,0.20);
        border-color: rgba(255,215,0,0.35);
    }

.it-title-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.it-project-title {
    font-size: 15px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.it-mini-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 12px;
    opacity: 0.9;
}

/* ====== Status Lights ====== */
.it-status {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.it-light {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    box-shadow: 0 0 12px rgba(0,0,0,0.45);
    border: 1px solid rgba(255,255,255,0.18);
}

    .it-light.green {
        background: #18e27a;
        box-shadow: 0 0 18px rgba(24,226,122,0.55);
    }

    .it-light.yellow {
        background: #ffcc00;
        box-shadow: 0 0 18px rgba(255,204,0,0.55);
        animation: itPulse 2.0s ease-in-out infinite;
    }

    .it-light.red {
        background: #ff4d4d;
        box-shadow: 0 0 18px rgba(255,77,77,0.55);
        animation: itPulse 1.2s ease-in-out infinite;
    }

@keyframes itPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.9;
    }

    50% {
        transform: scale(1.12);
        opacity: 1;
    }
}

.it-status-label {
    font-size: 12px;
    font-weight: 700;
    opacity: 0.92;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ====== Progress ====== */
.it-progress-row {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.it-progress-bar {
    position: relative;
    height: 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.10);
    overflow: hidden;
    flex: 1;
    border: 1px solid rgba(255,255,255,0.12);
}

.it-progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(0,194,255,0.95), rgba(0,255,165,0.85));
    box-shadow: 0 0 18px rgba(0,194,255,0.30);
    transition: width 600ms ease;
}

    .it-progress-fill::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(120deg, transparent, rgba(255,255,255,0.18), transparent);
        transform: translateX(-120%);
        animation: itShine 2.8s ease-in-out infinite;
    }

@keyframes itShine {
    0% {
        transform: translateX(-120%);
    }

    60% {
        transform: translateX(120%);
    }

    100% {
        transform: translateX(120%);
    }
}

.it-percent {
    font-size: 12px;
    font-weight: 900;
    width: 46px;
    text-align: right;
}

/* ====== Footer ====== */
.it-board-footer {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.10);
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.it-footnote {
    font-size: 12px;
    opacity: 0.78;
}

.it-footnote-strong {
    font-size: 12px;
    font-weight: 800;
    opacity: 0.92;
    margin-left: 6px;
}

/* ====== Utility ====== */
.it-hidden {
    display: none;
}

/* ====== Mobile adjustments ====== */
@media (max-width: 520px) {
    #it-showdown-tab {
        padding: 12px 12px 12px 10px;
    }

    .it-tab-text {
        display: none;
    }

    .it-tab-chevron {
        display: none;
    }

    #it-showdown-drawer {
        width: 100vw;
    }
}

