:root {
    --bg-color: #f4f0ea;
    --box-bg: #ffffff;
    --border-color: #000000;
    --shadow-color: #000000;
    --neo-yellow: #ffe600;
    --neo-pink: #ff66c4;
    --neo-cyan: #00f0ff;
    --neo-green: #00e676;
    --neo-purple: #a855f7;
    --neo-red: #ff4d4d;
    --text-dark: #000000;
    --text-muted: #4b5563;
}

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

body {
    background-color: var(--bg-color);
    background-image: radial-gradient(#000 1px, transparent 1px);
    background-size: 24px 24px;
    color: var(--text-dark);
    min-height: 100vh;
    padding: 24px;
}

/* Main Layout Wrapper */
.layout-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 24px;
    align-items: start;
}

/* Neo-Brutalist Box Base */
.neo-box {
    background: var(--box-bg);
    border: 3px solid var(--border-color);
    box-shadow: 5px 5px 0px var(--shadow-color);
    border-radius: 12px;
    transition: all 0.15s ease;
}

/* Sidebar Box & Links */
.sidebar-box {
    background: #ffffff;
    border: 3px solid #000;
    box-shadow: 6px 6px 0px #000;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 24px;
}

.brand-badge {
    background: var(--neo-yellow);
    border: 2px solid #000;
    font-weight: 800;
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
}

.sidebar-header h2 {
    font-weight: 900;
    font-size: 1.4rem;
    margin-top: 6px;
}

.author-credit {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.link-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.section-title {
    font-weight: 800;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-muted);
}

.neo-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border: 2px solid #000;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.88rem;
    text-decoration: none;
    color: #000;
    box-shadow: 3px 3px 0px #000;
    transition: all 0.15s ease;
}

.neo-link:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0px #000;
}

.github-profile-link { background: #38bdf8; }
.hf-profile-link { background: #fde047; }
.linkedin-profile-link { background: #818cf8; color: #ffffff; }
.github-link { background: var(--neo-cyan); }
.fp32-link { background: #e2e8f0; }
.fp16-link { background: #cbd5e1; }
.int8-link { background: var(--neo-green); }
.nf4-link { background: var(--neo-yellow); }


.privacy-badge-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 2px solid #000;
    padding: 10px 12px;
    border-radius: 8px;
    box-shadow: 3px 3px 0px #000;
}

.lock-icon {
    font-size: 1.4rem;
}

.privacy-badge-box p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Loader Screen (Pre-load startup) */
.loader-screen {
    padding: 48px;
    text-align: center;
    background: var(--neo-yellow);
    box-shadow: 8px 8px 0px #000;
}

.loader-content {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.loader-emoji {
    font-size: 3.5rem;
    background: #fff;
    border: 3px solid #000;
    border-radius: 50%;
    padding: 16px;
    box-shadow: 4px 4px 0px #000;
}

.loader-screen h2 {
    font-size: 1.8rem;
    font-weight: 900;
}

.loader-sub {
    font-weight: 600;
    color: #1f2937;
}

.neo-progress-container {
    width: 100%;
    background: #fff;
    border: 3px solid #000;
    box-shadow: 4px 4px 0px #000;
    padding: 16px;
    border-radius: 10px;
}

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

.percent-tag {
    font-family: 'JetBrains Mono', monospace;
    background: var(--neo-pink);
    border: 2px solid #000;
    padding: 2px 8px;
    border-radius: 6px;
}

.neo-progress-track {
    width: 100%;
    height: 16px;
    background: #e2e8f0;
    border: 2px solid #000;
    border-radius: 8px;
    overflow: hidden;
}

.neo-progress-fill {
    width: 0%;
    height: 100%;
    background: var(--neo-green);
    transition: width 0.3s ease;
}

/* File Checklist Card */
.file-checklist-card {
    width: 100%;
    background: #ffffff;
    border: 3px solid #000;
    box-shadow: 4px 4px 0px #000;
    border-radius: 10px;
    padding: 16px;
    text-align: left;
}

.checklist-header {
    font-weight: 900;
    font-size: 0.95rem;
    margin-bottom: 12px;
    border-bottom: 2px solid #000;
    padding-bottom: 6px;
}

.file-list-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 240px;
    overflow-y: auto;
}

.file-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: #f8fafc;
    border: 2px solid #000;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
}

.file-row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
}

.file-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    color: #0f172a;
}

.file-status-badge {
    font-weight: 800;
    font-size: 0.75rem;
    padding: 2px 6px;
    border: 1px solid #000;
    border-radius: 4px;
    background: #e2e8f0;
}

.file-status-badge.done { background: var(--neo-green); }
.file-status-badge.downloading { background: var(--neo-yellow); }

.file-mini-track {
    width: 100%;
    height: 8px;
    background: #cbd5e1;
    border: 1px solid #000;
    border-radius: 4px;
    overflow: hidden;
}

.file-mini-fill {
    height: 100%;
    background: var(--neo-pink);
    width: 0%;
    transition: width 0.2s ease;
}


/* Workspace Screen */
.workspace-screen {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.workspace-screen.hidden, .loader-screen.hidden {
    display: none !important;
}

.header-banner {
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--neo-cyan);
}

.neo-tag {
    font-weight: 800;
    font-size: 0.75rem;
    border: 2px solid #000;
    padding: 2px 8px;
    border-radius: 4px;
}

.yellow-tag { background: var(--neo-yellow); }

.header-title-group h1 {
    font-size: 1.6rem;
    font-weight: 900;
    margin-top: 4px;
}

.status-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 2px solid #000;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.82rem;
    box-shadow: 3px 3px 0px #000;
}

.pulse-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--neo-green);
    border: 2px solid #000;
}

/* Translation Grid */
.translation-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 16px;
    align-items: stretch;
}

.panel-box {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.panel-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.panel-label {
    font-weight: 900;
    font-size: 0.9rem;
}

.neo-select {
    flex: 1;
    background: #fff;
    border: 2px solid #000;
    padding: 10px 14px;
    font-weight: 800;
    font-size: 0.95rem;
    border-radius: 8px;
    box-shadow: 3px 3px 0px #000;
    outline: none;
    cursor: pointer;
}

textarea, .output-box {
    width: 100%;
    min-height: 200px;
    background: #fafafa;
    border: 2px solid #000;
    border-radius: 8px;
    padding: 14px;
    font-size: 1.05rem;
    line-height: 1.6;
    outline: none;
    resize: none;
}

.output-box {
    white-space: pre-wrap;
    word-break: break-word;
    background: #ffffff;
}

.panel-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.counter-tag, .latency-tag {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 0.8rem;
    background: #f1f5f9;
    border: 2px solid #000;
    padding: 4px 8px;
    border-radius: 6px;
}

/* Buttons */
.neo-btn {
    border: 2px solid #000;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 3px 3px 0px #000;
    transition: all 0.15s ease;
}

.neo-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0px #000;
}

.sm-btn {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
}

.circle-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.3rem;
}

.controls-bar {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 16px;
}

.translate-action-btn {
    padding: 14px 28px;
    border-radius: 30px;
    font-size: 1.05rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pink-btn { background: var(--neo-pink); }
.yellow-btn { background: var(--neo-yellow); }
.green-btn { background: var(--neo-green); }
.red-btn { background: var(--neo-red); color: white; }

@media (max-width: 900px) {
    .layout-wrapper {
        grid-template-columns: 1fr;
    }
    .translation-grid {
        grid-template-columns: 1fr;
    }
    .controls-bar {
        flex-direction: row;
    }
}
