/*
   Periodicals — Authentic 2007 Private Tracker Stylesheet
   Raw, crunchy, text-dense Gazelle/What.cd aesthetics.
   Primary Color Profile: Lighter Neutral Warm Gray
   NO rounded edges, NO glassmorphism, NO modern soft shadows.
*/

:root {
    --primary-highlight: #2c2d32;
    --bg-dark: #1e1e20;
    --wrapper-bg: #252528;
    --box-bg: #2b2b2e;
    --box-head-start: #3a3b40;
    --box-head-end: #2f3035;
    --border-dark: #38393e;
    --border-mid: #484a50;
    --border-light: #5c5e66;
    --text-main: #e2e4e8;
    --link-blue: #6ca5f2;
    --link-hover: #99c2ff;
    --stat-green: #4ee468;
    --stat-red: #ff5555;
    --stat-gold: #e6b800;
    --maroon-accent: #882b3d;
    --maroon-border: #662b36;
    --maroon-bright: #a83d4e;
}

/* User Rank Colors (Authentic Tracker Palette) */
.rank-user              { color: #888888 !important; font-weight: bold; }
.rank-member            { color: #dfb15b !important; font-weight: bold; }
.rank-power-user        { color: #ff3333 !important; font-weight: bold; }
.rank-elite             { color: #9b59b6 !important; font-weight: bold; }
.rank-jellybean         { color: #e91e63 !important; font-weight: bold; }
.rank-torrent-moderator { color: #ffb347 !important; font-weight: bold; }
.rank-moderator         { color: #ff9900 !important; font-weight: bold; }
.rank-admin             { color: #e74c3c !important; font-weight: bold; }
.rank-sysop             { color: #64b5f6 !important; font-weight: bold; }

@font-face {
    font-family: metal;
    src: url("/fonts/ArexaDemo-Regular.otf");
}

.metal-font {
    font-family: metal;
    font-size: 42px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border-radius: 0 !important; /* Strictly 90-degree square corners */
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif;
    font-size: 12px;
    line-height: 1.5;
    -webkit-font-smoothing: none; /* Crisp pixelated font rendering like 2007 OS */
}

a {
    color: var(--link-blue);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    color: var(--link-hover);
}

/* Page Wrapper */
#wrapper {
    width: 1300px;
    max-width: 95%;
    margin: 0 auto;
    padding: 10px 0 30px 0;
}

/* Header & Logo */
#header {
    background-color: #27282c;
    border: 1px solid var(--border-mid);
    margin-bottom: 8px;
}

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: linear-gradient(to bottom, #38393e 0%, #27282c 100%);
    border-bottom: 1px solid var(--border-mid);
}

.logo {
    font-family: Tahoma, Verdana, sans-serif;
    font-size: 26px;
    font-weight: bold;
    letter-spacing: 1px;
    color: #ffffff;
    text-shadow: 1px 1px 0px #000000;
}

.tagline {
    font-size: 11px;
    color: #a0a3ac;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 2px;
}

/* Top User Stats Ribbon */
#user-stats-bar {
    background-color: #212124;
    border-bottom: 1px solid var(--border-dark);
    padding: 6px 12px;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #dddddd;
}

.stat-item {
    margin-right: 14px;
}

.stat-label {
    color: #a0a3ac;
}

.stat-val {
    font-weight: bold;
    font-family: monospace;
    font-size: 12px;
    color: #ffffff;
}

.ratio-good {
    color: var(--stat-green);
    font-weight: bold;
}

.buffer-val {
    color: var(--stat-gold);
    font-weight: bold;
}

/* Main Tab Navigation Bar */
#nav-menu {
    background: linear-gradient(to bottom, #383a40 0%, #26272b 100%);
    padding: 0;
    list-style: none;
    display: flex;
    border-bottom: 1px solid var(--border-mid);
}

#nav-menu li {
    border-right: 1px solid var(--border-dark);
}

#nav-menu li a {
    display: block;
    padding: 7px 16px;
    color: #dddddd;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    border-top: 1px solid #484a50;
}

#nav-menu li a:hover,
#nav-menu li.active a {
    background: linear-gradient(to bottom, #42262d 0%, #2f1d22 100%);
    color: #ffffff;
    text-decoration: none;
    border-top: 2px solid var(--maroon-bright);
}

/* Main Layout Grid */
.content-layout {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.main-column {
    flex: 1;
    min-width: 0;
}

.sidebar-column {
    width: 250px;
    flex-shrink: 0;
}

/* Boxes & Headings */
.box {
    background-color: var(--box-bg);
    border: 1px solid var(--border-mid);
    margin-bottom: 10px;
}

.box-head {
    background: linear-gradient(to bottom, var(--box-head-start) 0%, var(--box-head-end) 100%);
    border-bottom: 1px solid var(--border-mid);
    border-left: 3px solid var(--maroon-accent);
    padding: 6px 10px;
    font-weight: bold;
    font-size: 12px;
    font-family: Tahoma, sans-serif;
    text-transform: uppercase;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    letter-spacing: 0.5px;
}

.box-body {
    padding: 10px;
}

/* Torrent Data Table */
.torrent_table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.torrent_table th {
    background: linear-gradient(to bottom, #383a40 0%, #26272b 100%);
    border: 1px solid var(--border-mid);
    padding: 6px 8px;
    text-align: left;
    color: #e2e4e8;
    font-weight: bold;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.torrent_table td {
    border: 1px solid var(--border-dark);
    padding: 6px 8px;
    vertical-align: middle;
}

.torrent_table tr:nth-child(even) {
    background-color: #27272a;
}

.torrent_table tr:nth-child(odd) {
    background-color: #2d2d31;
}

.torrent_table tr:hover {
    background-color: #3a3b42;
}

.cat-icon {
    width: 36px;
    height: 36px;
    background-color: #27282c;
    border: 1px solid var(--border-mid);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    color: var(--stat-gold);
    text-align: center;
}

.torrent-title {
    font-weight: bold;
    font-size: 12px;
}

.torrent-tags {
    font-size: 11px;
    color: #a0a3ac;
    margin-top: 2px;
}

.actions-cell {
    font-family: monospace;
    font-size: 12px;
    white-space: nowrap;
}

.num-cell {
    font-family: monospace;
    text-align: right;
    font-size: 12px;
}

.seeders {
    color: var(--stat-green);
    font-weight: bold;
}

.leechers {
    color: var(--stat-red);
    font-weight: bold;
}

.snatches {
    color: #cccccc;
}

/* Forms, Inputs & 2000s Bevel Buttons */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
select,
textarea {
    background-color: #1a1a1d;
    border: 1px solid var(--border-mid);
    border-top-color: #27272a;
    border-left-color: #27272a;
    color: #ffffff;
    padding: 4px 8px;
    font-size: 12px;
    font-family: Tahoma, Verdana, sans-serif;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
    border-color: var(--maroon-bright);
    outline: none;
}

.btn-classic {
    background: linear-gradient(to bottom, #4a1f28 0%, #2a1217 100%);
    border: 1px solid var(--maroon-border);
    border-top-color: #883a48;
    border-left-color: #883a48;
    color: #ffffff;
    padding: 4px 14px;
    font-size: 11px;
    font-family: Tahoma, sans-serif;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-classic:hover {
    background: linear-gradient(to bottom, #5e2430 0%, #35161c 100%);
    border-color: #993b4c;
}

/* Filter Tables */
.filter-table {
    width: 100%;
    border-collapse: collapse;
}

.filter-table td {
    padding: 5px 8px;
    vertical-align: middle;
    font-size: 12px;
}

/* Sidebar Stats & Poll Lists */
.stats-list {
    list-style: none;
}

.stats-list li {
    padding: 5px 0;
    border-bottom: 1px solid var(--border-dark);
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.stats-list li:last-child {
    border-bottom: none;
}

/* News Posts */
.news-post {
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-dark);
}

.news-post:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.news-header {
    font-weight: bold;
    color: #ffffff;
    font-size: 13px;
    margin-bottom: 3px;
}

.news-meta {
    font-size: 11px;
    color: #a0a3ac;
    margin-bottom: 6px;
}

/* BitTorrent Disclaimer Box */
.disclaimer-box {
    margin-top: 16px;
    padding: 10px 14px;
    background-color: #212124;
    border: 1px solid var(--border-dark);
    border-left: 3px solid var(--maroon-accent);
    color: #a0a3ac;
    font-size: 11px;
    line-height: 1.5;
    text-align: justify;
}

/* Footer */
#footer {
    margin-top: 18px;
    border-top: 1px solid var(--border-dark);
    padding-top: 12px;
    text-align: center;
    color: #a0a3ac;
    font-size: 11px;
}

/* Markdown Content Formatting */
.markdown-content h1 {
    font-size: 18px;
    font-weight: bold;
    color: #ffffff;
    border-bottom: 1px solid var(--border-mid);
    margin: 14px 0 8px 0;
    padding-bottom: 4px;
}

.markdown-content h2 {
    font-size: 15px;
    font-weight: bold;
    color: #e2e4e8;
    border-bottom: 1px solid var(--border-dark);
    margin: 12px 0 6px 0;
    padding-bottom: 2px;
}

.markdown-content h3 {
    font-size: 13px;
    font-weight: bold;
    color: #f0b018;
    margin: 10px 0 4px 0;
}

.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
    font-size: 12px;
    font-weight: bold;
    color: #dddddd;
    margin: 8px 0 4px 0;
}

.markdown-content p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.markdown-content ul,
.markdown-content ol {
    margin: 6px 0 10px 20px;
    padding-left: 10px;
}

.markdown-content li {
    margin-bottom: 4px;
}

.markdown-content blockquote {
    background-color: #241f22;
    border-left: 3px solid var(--maroon-accent);
    padding: 6px 12px;
    margin: 10px 0;
    color: #d8c3c7;
    font-style: italic;
}

.markdown-content pre {
    background-color: #1a1a1d;
    border: 1px solid var(--border-mid);
    padding: 8px 12px;
    font-family: monospace;
    font-size: 11px;
    overflow-x: auto;
    margin: 10px 0;
    color: #4ee468;
}

.markdown-content code {
    background-color: #1a1a1d;
    border: 1px solid var(--border-dark);
    padding: 1px 5px;
    font-family: monospace;
    font-size: 11px;
    color: #f0b018;
}

.markdown-content pre code {
    background: none;
    border: none;
    padding: 0;
    color: inherit;
}

.markdown-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
}

.markdown-content table th,
.markdown-content table td {
    border: 1px solid var(--border-mid);
    padding: 6px 8px;
    font-size: 12px;
}

.markdown-content table th {
    background: linear-gradient(to bottom, #383a40 0%, #26272b 100%);
    color: #ffffff;
    font-weight: bold;
    font-size: 11px;
    text-transform: uppercase;
}

.markdown-content hr {
    border: 0;
    border-top: 1px solid var(--border-mid);
    margin: 14px 0;
}

/* Torrent Details Page Layout */
.torrent-details-layout {
    display: flex;
    gap: 20px;
}

.torrent-cover-col {
    width: 190px;
    flex-shrink: 0;
    text-align: center;
}

.torrent-info-col {
    flex: 1;
    min-width: 0;
}

.torrent-box-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.torrent-head-links {
    font-weight: normal;
    font-size: 12px;
}

.torrent-specs-table {
    width: 100%;
    margin-bottom: 16px;
    border-collapse: collapse;
}

.torrent-specs-table td {
    padding: 5px 8px;
    vertical-align: middle;
    font-size: 12px;
    word-break: break-word;
}

.torrent-specs-table td.spec-label {
    width: 140px;
    font-weight: bold;
    color: #aaa;
    white-space: nowrap;
}

.infohash-code {
    font-family: monospace;
    background-color: #12090b;
    padding: 2px 6px;
    border: 1px solid #3d2328;
    color: #e6e6e6;
    font-size: 11px;
    word-break: break-all;
    overflow-wrap: anywhere;
    display: inline-block;
    max-width: 100%;
}

.torrent-action-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    background-color: #1d1114;
    border: 1px solid var(--primary-highlight-border);
    padding: 10px;
}

/* Comments Section */
.comment-item {
    background-color: #16181e;
    border: 1px solid var(--border-mid);
    padding: 10px 14px;
    margin-bottom: 10px;
    display: flex;
    gap: 12px;
}

.comment-avatar {
    width: 40px;
    text-align: center;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
    min-width: 0;
}

.comment-header {
    font-size: 11px;
    color: #ffffff;
    margin-bottom: 6px;
    border-bottom: 1px solid #22252e;
    padding-bottom: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.comment-body {
    font-size: 12px;
    color: #e6e6e6;
    line-height: 1.5;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Responsive Mobile & Tablet Layout Adjustments */
@media (max-width: 900px) {
    #wrapper {
        width: 100% !important;
        max-width: 100% !important;
        padding: 6px 8px 24px 8px;
    }

    .header-main {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    #user-stats-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 8px 10px;
    }

    #nav-menu {
        flex-wrap: wrap;
    }

    #nav-menu li {
        flex: 1 1 auto;
        text-align: center;
        border-bottom: 1px solid var(--border-dark);
    }

    #nav-menu li a {
        padding: 8px 10px;
        font-size: 10px;
    }

    .content-layout {
        flex-direction: column;
    }

    .sidebar-column {
        width: 100% !important;
    }

    .torrent_table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    .filter-table {
        display: block;
        overflow-x: auto;
    }
}

@media (max-width: 768px) {
    .torrent-details-layout {
        flex-direction: column;
        gap: 14px;
    }

    .torrent-cover-col {
        width: 100%;
        max-width: 220px;
        margin: 0 auto 10px auto;
    }

    .torrent-specs-table td.spec-label {
        width: 110px;
    }

    .torrent-box-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}

@media (max-width: 600px) {
    .box-head {
        font-size: 11px;
        padding: 6px 8px;
    }

    .box-body {
        padding: 8px;
    }

    input[type="text"],
    input[type="number"],
    input[type="email"],
    input[type="password"],
    select,
    textarea {
        max-width: 100% !important;
        font-size: 12px;
    }

    .btn-classic {
        padding: 6px 12px;
        font-size: 10px;
    }

    .torrent-action-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .torrent-action-toolbar a,
    .torrent-action-toolbar button,
    .torrent-action-toolbar form {
        width: 100%;
        text-align: center;
        display: block;
    }

    .torrent-action-toolbar button {
        width: 100%;
    }

    .torrent-specs-table td {
        padding: 4px 6px;
        font-size: 11px;
    }

    .torrent-specs-table td.spec-label {
        width: 95px;
    }
}


