/* ============================================================
   TRACKER CSS v2.0 — Dark Theme Premium
   ============================================================ */

:root {
    --bg:         #0a0c14;
    --bg2:        #111520;
    --bg3:        #181d2e;
    --bg4:        #1e2438;
    --border:     #252b42;
    --border2:    #2e3550;
    --accent:     #f0a500;
    --accent2:    #cc8800;
    --accent3:    #ffe066;
    --text:       #e2e8f8;
    --text-muted: #5c6585;
    --text-dim:   #8892b0;
    --green:      #22d982;
    --green2:     #17a860;
    --red:        #f05050;
    --red2:       #c03030;
    --blue:       #4fa8ff;
    --purple:     #a78bfa;
    --orange:     #fb923c;
    --radius:     8px;
    --radius-lg:  12px;
    --shadow:     0 4px 24px rgba(0,0,0,0.5);
    --shadow-sm:  0 2px 8px rgba(0,0,0,0.3);
    --glow:       0 0 20px rgba(240,165,0,0.15);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--accent); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--accent3); }
img { max-width: 100%; }

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Header ─────────────────────────────────────────────── */
.site-header {
    background: rgba(17, 21, 32, 0.95);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.site-header .container {
    display: flex;
    align-items: center;
    gap: 20px;
    height: 60px;
}

.logo {
    font-size: 19px;
    font-weight: 800;
    color: var(--accent) !important;
    text-decoration: none !important;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    letter-spacing: -0.3px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(240,165,0,0.3);
}

.main-nav {
    display: flex;
    gap: 2px;
    flex: 1;
}

.main-nav a {
    color: var(--text-dim);
    padding: 6px 14px;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 13px;
    transition: all 0.15s;
    text-decoration: none;
}

.main-nav a:hover { color: var(--text); background: var(--bg3); }
.main-nav a.active { color: var(--accent); background: rgba(240,165,0,0.1); }
.nav-admin { color: var(--accent) !important; }

.nav-user {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.nav-username {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--text) !important;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 13px;
    padding: 5px 10px;
    border-radius: var(--radius);
    transition: background 0.15s;
}

.nav-username:hover { background: var(--bg3); }

.nav-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border2);
}

.nav-avatar-placeholder {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--bg3);
    border: 2px solid var(--border2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.nav-ratio {
    font-size: 11px;
    padding: 3px 8px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-dim);
}

/* ── Butoane ─────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.15s;
    text-decoration: none !important;
    line-height: 1;
    letter-spacing: 0.01em;
    background: var(--accent);
    color: #000 !important;
}

.btn:hover { background: var(--accent2); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(240,165,0,0.3); }
.btn:active { transform: translateY(0); }

.btn-outline {
    background: transparent;
    border: 1px solid var(--border2);
    color: var(--text-dim) !important;
}
.btn-outline:hover { background: var(--bg3); color: var(--text) !important; border-color: var(--text-muted); box-shadow: none; }

.btn-danger  { background: var(--red);   color: #fff !important; }
.btn-danger:hover  { background: var(--red2);  box-shadow: 0 4px 12px rgba(240,80,80,0.3); }

.btn-success { background: var(--green); color: #000 !important; }
.btn-success:hover { background: var(--green2); box-shadow: 0 4px 12px rgba(34,217,130,0.3); }

.btn-ghost { background: var(--bg3); color: var(--text-dim) !important; border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg4); color: var(--text) !important; box-shadow: none; }

.btn-sm  { padding: 5px 12px; font-size: 12px; }
.btn-lg  { padding: 11px 28px; font-size: 15px; }
.btn-xl  { padding: 14px 36px; font-size: 16px; }
.btn-block { width: 100%; }

button.btn { font-family: inherit; }

/* ── Flash ───────────────────────────────────────────────── */
.flash {
    padding: 12px 0;
    font-weight: 500;
    font-size: 13px;
    text-align: center;
    animation: slideDown 0.3s ease;
}
@keyframes slideDown { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }
.flash-success { background: rgba(34,217,130,0.12); color: var(--green);  border-bottom: 1px solid rgba(34,217,130,0.2); }
.flash-error   { background: rgba(240,80,80,0.12);  color: var(--red);    border-bottom: 1px solid rgba(240,80,80,0.2); }
.flash-info    { background: rgba(79,168,255,0.12); color: var(--blue);   border-bottom: 1px solid rgba(79,168,255,0.2); }
.flash-warning { background: rgba(240,165,0,0.12);  color: var(--accent); border-bottom: 1px solid rgba(240,165,0,0.2); }

/* ── Main ────────────────────────────────────────────────── */
.main-content { flex: 1; padding: 28px 0; }

/* ── Card ────────────────────────────────────────────────── */
.card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    margin-bottom: 18px;
    transition: border-color 0.15s;
}

.card:hover { border-color: var(--border2); }
.card-flat  { background: var(--bg3); border-color: var(--border2); }
.card-accent { border-color: var(--accent); box-shadow: var(--glow); }

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
    gap: 12px;
}

.card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Formulare ───────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }

.form-group label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
    color: var(--text-dim);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg3);
    border: 1px solid var(--border2);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.15s;
    outline: none;
    appearance: none;
}

.form-control:focus {
    border-color: var(--accent);
    background: var(--bg4);
    box-shadow: 0 0 0 3px rgba(240,165,0,0.12);
}

.form-control::placeholder { color: var(--text-muted); }
textarea.form-control       { resize: vertical; min-height: 100px; }
select.form-control         { cursor: pointer; }

.form-hint  { margin-top: 5px; font-size: 12px; color: var(--text-muted); }
.form-error { margin-top: 5px; font-size: 12px; color: var(--red); }

/* ── Tabel ───────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }

table { width: 100%; border-collapse: collapse; }

th, td { padding: 11px 16px; text-align: left; border-bottom: 1px solid var(--border); }

th {
    background: var(--bg3);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

th:first-child { border-radius: var(--radius) 0 0 0; }
th:last-child  { border-radius: 0 var(--radius) 0 0; }

tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.02); }

/* ── Badge ───────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.badge-green  { background: rgba(34,217,130,0.15);  color: var(--green);  border: 1px solid rgba(34,217,130,0.3); }
.badge-red    { background: rgba(240,80,80,0.15);   color: var(--red);    border: 1px solid rgba(240,80,80,0.3); }
.badge-blue   { background: rgba(79,168,255,0.15);  color: var(--blue);   border: 1px solid rgba(79,168,255,0.3); }
.badge-gold   { background: rgba(240,165,0,0.15);   color: var(--accent); border: 1px solid rgba(240,165,0,0.3); }
.badge-purple { background: rgba(167,139,250,0.15); color: var(--purple); border: 1px solid rgba(167,139,250,0.3); }
.badge-gray   { background: rgba(92,101,133,0.2);   color: var(--text-dim); border: 1px solid var(--border2); }
.badge-orange { background: rgba(251,146,60,0.15);  color: var(--orange); border: 1px solid rgba(251,146,60,0.3); }

/* ── Clasă user ──────────────────────────────────────────── */
.class-1 { color: var(--text-dim); }
.class-2 { color: var(--blue); }
.class-3 { color: var(--purple); }
.class-4 { color: var(--green); }
.class-5 { color: var(--accent); }
.class-6 { color: var(--red); }

/* ── Ratio ───────────────────────────────────────────────── */
.ratio-good { color: var(--green);  font-weight: 700; }
.ratio-warn { color: var(--accent); font-weight: 700; }
.ratio-bad  { color: var(--red);    font-weight: 700; }

/* ── Page header ─────────────────────────────────────────── */
.page-header {
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.page-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.3px;
}

.page-subtitle { color: var(--text-muted); font-size: 13px; margin-top: 3px; }

/* ── Auth ────────────────────────────────────────────────── */
.auth-wrap { 
    max-width: 480px; 
    margin: 48px auto; 
    width: 100%;
    padding: 0 16px;
    box-sizing: border-box;
}

.auth-logo {
    text-align: center;
    margin-bottom: 10px;
    width: 100%;
}

.auth-logo a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none !important;
}

.auth-logo img {
    max-height: 80px;
    max-width: 280px;
    object-fit: contain;
    margin-bottom: 8px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.auth-logo-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 12px;
    box-shadow: 0 8px 24px rgba(240,165,0,0.3);
}

.auth-site-name {
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
    display: block;
    letter-spacing: -0.5px;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 28px;
    font-size: 13px;
}

.auth-footer {
    text-align: center;
    margin-top: 18px;
    color: var(--text-muted);
    font-size: 13px;
}

/* ── Profil ──────────────────────────────────────────────── */
.profile-banner {
    height: 140px;
    background: linear-gradient(135deg, var(--bg3) 0%, var(--bg4) 50%, rgba(240,165,0,0.08) 100%);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    border: 1px solid var(--border);
    border-bottom: none;
    position: relative;
}

.profile-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    padding: 0 22px 22px;
    margin-bottom: 18px;
}

.profile-avatar-wrap {
    position: relative;
    display: inline-block;
    margin-top: -40px;
    margin-bottom: 12px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--bg2);
    display: block;
}

.profile-avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg3);
    border: 3px solid var(--bg2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
}

.profile-name  { font-size: 20px; font-weight: 800; letter-spacing: -0.3px; }
.profile-class { font-size: 13px; margin-top: 3px; }
.profile-meta  { font-size: 12px; color: var(--text-muted); margin-top: 6px; }

/* ── Stats ───────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

.stat-box {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    text-align: center;
    transition: border-color 0.15s;
}

.stat-box:hover { border-color: var(--border2); }

.stat-value {
    font-size: 18px;
    font-weight: 800;
    color: var(--accent);
    display: block;
    letter-spacing: -0.3px;
}

.stat-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 3px;
    display: block;
}

/* ── Paginare ────────────────────────────────────────────── */
.pagination {
    display: flex;
    gap: 4px;
    justify-content: center;
    margin-top: 22px;
    flex-wrap: wrap;
}

.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    border: 1px solid var(--border);
    text-decoration: none !important;
    color: var(--text-dim);
    transition: all 0.15s;
}

.pagination a:hover        { background: var(--bg3); color: var(--text); border-color: var(--border2); }
.pagination .current       { background: var(--accent); color: #000; border-color: var(--accent); }
.pagination .disabled      { opacity: 0.3; pointer-events: none; }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
    background: var(--bg2);
    border-top: 1px solid var(--border);
    padding: 22px 0;
    margin-top: auto;
}

.site-footer .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-stats  { display: flex; gap: 18px; color: var(--text-muted); font-size: 12px; }
.footer-links  { display: flex; gap: 14px; }
.footer-links a { color: var(--text-muted); font-size: 12px; }
.footer-links a:hover { color: var(--accent); }
.footer-copy   { color: var(--text-muted); font-size: 12px; }

/* ── Grid ────────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }

/* ── Torrent row ─────────────────────────────────────────── */
.torrent-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    border-bottom: 1px solid var(--border);
    transition: background 0.1s;
}

.torrent-row:hover        { background: rgba(255,255,255,0.025); }
.torrent-row:last-child   { border-bottom: none; }
.torrent-row .cat-icon    { font-size: 18px; flex-shrink: 0; }
.torrent-row .t-info      { flex: 1; min-width: 0; }
.torrent-row .t-name      { font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; font-size: 13px; }
.torrent-row .t-name:hover { color: var(--accent); }
.torrent-row .t-meta      { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.torrent-row .t-stats     { display: flex; gap: 10px; flex-shrink: 0; font-size: 12px; font-weight: 700; }
.torrent-row .seeds       { color: var(--green); }
.torrent-row .leech       { color: var(--orange); }
.torrent-row .size        { color: var(--text-muted); font-size: 11px; flex-shrink: 0; min-width: 65px; text-align: right; }

/* ── Tag-uri torrent ─────────────────────────────────────── */
.t-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px; }

.t-tag {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.t-tag-res    { background: rgba(79,168,255,0.15);   color: var(--blue); }
.t-tag-src    { background: rgba(92,101,133,0.25);   color: var(--text-dim); }
.t-tag-codec  { background: rgba(167,139,250,0.15);  color: var(--purple); }
.t-tag-fl     { background: rgba(34,217,130,0.2);    color: var(--green);  font-weight: 900; }
.t-tag-2x     { background: rgba(240,165,0,0.2);     color: var(--accent); font-weight: 900; }

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar-widget {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 16px;
}

.sidebar-widget-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-muted);
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--bg3);
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    transition: background 0.1s;
}

.sidebar-item:last-child { border-bottom: none; }
.sidebar-item:hover      { background: rgba(255,255,255,0.02); }

/* ── Progress bar ────────────────────────────────────────── */
.progress {
    width: 100%;
    height: 6px;
    background: var(--bg3);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-bar.green  { background: linear-gradient(90deg, var(--green), var(--green2)); }
.progress-bar.red    { background: linear-gradient(90deg, var(--red), var(--red2)); }

/* ── Forum post sidebar ──────────────────────────────────── */
.post-user-sidebar {
    width: 130px;
    flex-shrink: 0;
    padding: 16px 12px;
    border-right: 1px solid var(--border);
    text-align: center;
    background: var(--bg3);
}

/* ── Misc utilities ──────────────────────────────────────── */
.text-muted   { color: var(--text-muted) !important; }
.text-dim     { color: var(--text-dim) !important; }
.text-green   { color: var(--green) !important; }
.text-red     { color: var(--red) !important; }
.text-blue    { color: var(--blue) !important; }
.text-accent  { color: var(--accent) !important; }
.text-orange  { color: var(--orange) !important; }
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.text-small   { font-size: 12px; }
.text-xs      { font-size: 11px; }
.fw-700       { font-weight: 700; }
.fw-800       { font-weight: 800; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.p-0  { padding: 0; }
.d-flex       { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.flex-1 { flex: 1; }
.w-100  { width: 100%; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

hr { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

code {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1px 6px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 12px;
    color: var(--accent3);
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .main-nav { display: none; }
}

@media (max-width: 600px) {
    .container { padding: 0 14px; }
    .page-title { font-size: 18px; }
    .site-footer .container { flex-direction: column; text-align: center; gap: 8px; }
    .footer-stats { flex-direction: column; gap: 4px; }
}

/* ── Admin Nav ───────────────────────────────────────────── */
.admin-nav {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    padding: 14px 16px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.admin-nav a {
    font-size: 12px !important;
    padding: 6px 12px !important;
}
