:root { --bg: #0f172a; --card: #1e293b; --border: #334155; --primary: #d90429; --primary-hover: #ef233c; --text: #f8fafc; --text-muted: #94a3b8; }
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; font-family: 'Inter', sans-serif; }
body { background: var(--bg); color: var(--text); height: 100vh; overflow: hidden; display: flex; flex-direction: column; }
.hidden { display: none !important; }
.mono { font-family: 'JetBrains Mono', monospace; }

#auth-screen { position: fixed; inset: 0; background: var(--bg); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth-box { width: 100%; max-width: 400px; text-align: center; animation: fadeIn 0.5s ease; background: var(--card); padding: 40px 30px; border-radius: 16px; border: 1px solid var(--border); box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.auth-input { width: 100%; background: #0b101a; border: 1px solid var(--border); padding: 14px; color: #fff; border-radius: 8px; font-size: 15px; margin-bottom: 15px; outline: 0; text-align: center; }
.auth-input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(217, 4, 41, 0.2); }

.btn-login { width: 100%; background: var(--primary); color: #fff; padding: 14px; border: 0; border-radius: 8px; font-weight: 600; font-size: 16px; cursor: pointer; transition: 0.3s; }
.btn-login:hover { background: var(--primary-hover); }

#app-layout { display: flex; height: 100%; width: 100%; overflow: hidden; }
.sidebar { width: 260px; background: #162032; border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 20px; z-index: 10; }
.brand { font-size: 20px; font-weight: 800; margin-bottom: 40px; color: #fff; display: flex; align-items: center; gap: 10px; }
.brand span { color: var(--primary); }

.nav-item { padding: 14px; margin-bottom: 8px; border-radius: 10px; cursor: pointer; color: var(--text-muted); display: flex; align-items: center; gap: 12px; transition: .2s; font-size: 15px; }
.nav-item:hover { background: rgba(255,255,255,.03); color: var(--text); }
.nav-item.active { background: rgba(217, 4, 41, 0.15); color: var(--primary); font-weight: 600; }

.main-content { flex: 1; padding: 30px; overflow-y: auto; position: relative; padding-bottom: 100px; }
.top-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; }
.user-badge { background: rgba(255,255,255,.05); padding: 6px 12px; border-radius: 50px; font-size: 12px; border: 1px solid var(--border); color: var(--text-muted); }

.card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 20px; margin-bottom: 20px; }
.upload-zone { border: 2px dashed var(--border); border-radius: 12px; padding: 30px 20px; text-align: center; cursor: pointer; background: rgba(217, 4, 41, 0.02); transition: .3s; }
.upload-zone:active, .upload-zone.dragover { border-color: var(--primary); background: rgba(217, 4, 41, 0.08); }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 15px; }
.stat-box { background: rgba(255,255,255,.02); padding: 15px; border-radius: 12px; border: 1px solid var(--border); }
.stat-val { font-size: 22px; font-weight: 700; margin-top: 5px; }

.code-block { background: #0b101a; border: 1px solid var(--border); border-radius: 8px; padding: 15px; overflow-x: auto; font-size: 13px; color: #a5b4fc; position: relative; }
.copy-btn { position: absolute; top: 8px; right: 8px; background: rgba(255,255,255,.1); border: 0; color: #fff; padding: 4px 8px; border-radius: 4px; font-size: 10px; cursor: pointer; }

@media (max-width: 768px) {
    .sidebar { position: fixed; bottom: 0; left: 0; width: 100%; height: auto; flex-direction: row; justify-content: space-around; padding: 10px; border-right: 0; border-top: 1px solid var(--border); background: #162032; }
    .brand { display: none; }
    .nav-item { flex-direction: column; gap: 5px; font-size: 10px; padding: 8px; margin: 0; border-radius: 8px; }
    .nav-item i { font-size: 18px; }
    .nav-item span { font-size: 10px; }
    .main-content { padding: 20px; padding-bottom: 90px; }
    .stat-box { padding: 12px; }
    .stat-val { font-size: 18px; }
    .lang-tabs button { flex: 1; font-size: 12px; }
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }