* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

:root {
    --purpur: #a170a0;
    --purpur-dark: #7a4f79;
    --purpur-light: #c9a0c8;
    --purpur-bg: #2d242d;
    --purpur-subtle: #4d3a4d;
    --text: #e8dee8;
    --text-muted: #a393a3;
    --border: #4d3a4d;
    --surface: #1e181e;
    --surface-hover: #2a222a;
    --bg-dark: #120e12;
    --gold: #ffcc00;
    --gold-dark: #ccaa00;
    --gold-text: #4a4000;
    --red: #ff5555;
}

body {
    background: var(--bg-dark);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: #fff;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

a {
    color: var(--purpur-light);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #fff;
}

/* Top Bar */
.top-bar {
    background: linear-gradient(135deg, var(--purpur-dark) 0%, var(--purpur) 100%);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 10;
}

.top-bar .logo-area {
    display: flex;
    align-items: center;
    gap: 16px;
}

.site-title {
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.site-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    margin-top: 2px;
}

.top-bar-right {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

/* Navigation */
.nav {
    background: rgba(30, 24, 30, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 9;
}

.nav a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    padding: 14px 22px;
    font-size: 15px;
    font-weight: 500;
    display: block;
    position: relative;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

.nav a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.nav a.active {
    color: #fff;
    border-bottom: 2px solid var(--purpur-light);
    background: linear-gradient(to top, rgba(161, 112, 160, 0.2) 0%, transparent 100%);
}

.nav a.gold-tab {
    color: var(--gold);
}

.nav a.gold-tab:hover {
    color: #fff;
    background: rgba(255, 204, 0, 0.1);
}

.nav a.gold-tab.active {
    border-bottom-color: var(--gold);
    background: linear-gradient(to top, rgba(255, 204, 0, 0.15) 0%, transparent 100%);
}

/* Banner Container */
.banner-container {
    width: 100%;
    max-width: 1200px;
    margin: 20px auto 0;
    padding: 0 16px;
    display: flex;
    justify-content: center;
}

.banner-container img {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    object-fit: cover;
    max-height: 250px;
    width: 100%;
    background: var(--surface);
}

/* Layout */
.layout {
    display: flex;
    gap: 24px;
    padding: 24px 16px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

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

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

/* Cards (Posts, etc) */
.post-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.post-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: rgba(255,255,255,0.02);
}

.post-card-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--purpur-light);
}

.post-meta {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 6px;
    display: flex;
    gap: 16px;
}

.post-body {
    padding: 20px;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text);
}

.post-body p {
    margin-bottom: 12px;
}
.post-body p:last-child {
    margin-bottom: 0;
}

.post-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    background: rgba(255,255,255,0.01);
    text-align: right;
}

/* Buttons */
.btn {
    background: linear-gradient(135deg, var(--purpur) 0%, var(--purpur-dark) 100%);
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(161, 112, 160, 0.3);
}

.btn:hover {
    background: linear-gradient(135deg, var(--purpur-light) 0%, var(--purpur) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(161, 112, 160, 0.4);
    color: #fff;
}

.btn-red {
    background: linear-gradient(135deg, #ff5555 0%, #cc0000 100%);
    box-shadow: 0 2px 8px rgba(255, 85, 85, 0.3);
}

.btn-red:hover {
    background: linear-gradient(135deg, #ff7777 0%, #ee2222 100%);
    box-shadow: 0 4px 12px rgba(255, 85, 85, 0.4);
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: var(--gold-text);
    box-shadow: 0 2px 8px rgba(255, 204, 0, 0.3);
}

.btn-gold:hover {
    background: linear-gradient(135deg, #ffdd33 0%, var(--gold) 100%);
    box-shadow: 0 4px 12px rgba(255, 204, 0, 0.4);
    color: var(--gold-text);
}

.btn-light {
    background: rgba(255,255,255,0.1);
    color: #fff;
}
.btn-light:hover {
    background: rgba(255,255,255,0.2);
}

/* Sidebar Boxes */
.sidebar-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.sidebar-box-title {
    background: rgba(161, 112, 160, 0.15);
    color: var(--purpur-light);
    font-size: 13px;
    font-weight: 600;
    padding: 10px 16px;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
}

.sidebar-box-body {
    padding: 16px;
    font-size: 14px;
    color: var(--text);
}

.sidebar-box-body p {
    margin-bottom: 10px;
}
.sidebar-box-body p:last-child {
    margin-bottom: 0;
}

.ip-box {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    margin-bottom: 12px;
}

.ip-box .ip-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ip-box .ip-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--purpur-light);
    margin-top: 4px;
    letter-spacing: 0.5px;
}

/* Forms & Inputs */
input[type="text"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 10px 14px;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border);
    color: #fff;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--purpur-light);
    box-shadow: 0 0 0 2px rgba(161, 112, 160, 0.2);
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 14px;
    margin-bottom: 6px;
    color: var(--text);
    font-weight: 500;
}

/* Search Form */
.search-form {
    margin-left: 20px;
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    padding: 2px 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
}

.search-form:focus-within {
    border-color: var(--purpur-light);
    background: rgba(0,0,0,0.3);
}

.search-form input {
    background: none !important;
    border: none !important;
    color: white;
    font-size: 14px;
    width: 160px;
    padding: 6px !important;
    box-shadow: none !important;
}

.search-form button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 14px;
}

/* Factions Specific Additions */
.sub-nav {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    padding: 0 24px;
    overflow-x: auto;
}

.sub-nav a {
    color: var(--text-muted);
    text-decoration: none;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}

.sub-nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.03);
}

.sub-nav a.active {
    color: #fff;
    border-bottom-color: var(--purpur-light);
    background: rgba(255, 255, 255, 0.05);
}

.war-banner {
    background: linear-gradient(135deg, #cc0000 0%, #880000 100%);
    color: white;
    padding: 12px 20px;
    text-align: center;
    font-weight: 600;
    margin-bottom: 20px;
    border-radius: 8px;
    display: none;
    box-shadow: 0 4px 15px rgba(204, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

.illegal-banner {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: var(--gold-text);
    padding: 12px 20px;
    text-align: center;
    font-weight: 600;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(255, 204, 0, 0.2);
}

.badge {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 12px;
    background: var(--purpur);
    color: white;
    vertical-align: middle;
    margin-left: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-war {
    background: var(--red);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

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

th {
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    background: rgba(255,255,255,0.02);
}

tr:hover td {
    background: rgba(255,255,255,0.02);
}

/* Footer */
.footer {
    background: var(--bg-dark);
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    text-align: center;
    font-size: 13px;
    padding: 24px;
    margin-top: auto;
}

/* Toasts */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10005;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--surface);
    color: #fff;
    padding: 14px 24px;
    border-radius: 8px;
    border-left: 4px solid var(--purpur-light);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    font-weight: 500;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Warnings */
.warning-banner {
    background: linear-gradient(135deg, #cc0000 0%, #880000 100%);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: none;
    position: relative;
    box-shadow: 0 4px 20px rgba(204, 0, 0, 0.4);
}

.warning-banner h4 {
    margin-bottom: 6px;
    font-size: 16px;
}

.warning-banner p {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
}

.warning-banner .close-warn {
    position: absolute;
    top: 12px;
    right: 20px;
    cursor: pointer;
    font-size: 24px;
    opacity: 0.7;
    transition: opacity 0.2s;
    line-height: 1;
}

.warning-banner .close-warn:hover {
    opacity: 1;
}

/* Downloads specific */
.release-item {
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
}

.release-info h3 {
    font-size: 16px;
    color: var(--purpur-light);
    margin-bottom: 4px;
}

.release-info p {
    font-size: 14px;
    color: var(--text-muted);
}

.post-media {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    background: #111;
    display: block;
    margin-top: 16px;
    border-radius: 8px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .top-bar {
        flex-direction: column;
        text-align: center;
        gap: 16px;
        padding: 16px;
    }

    .top-bar-right {
        width: 100%;
        text-align: center;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding-top: 12px;
    }
    
    .search-form {
        margin-left: 0;
        margin-top: 12px;
        width: 100%;
        justify-content: center;
    }

    .nav {
        flex-wrap: wrap;
    }

    .nav a {
        flex: 1 0 33.33%;
        text-align: center;
        padding: 12px 5px;
        font-size: 14px;
        border-right: 1px solid rgba(255, 255, 255, 0.05);
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .nav a:nth-child(3n) {
        border-right: none;
    }

    .layout {
        flex-direction: column;
        padding: 16px;
    }

    .sidebar {
        width: 100%;
    }

    .release-item {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
}

/* Admin Login Card */
.login-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 30px;
    width: 100%;
    max-width: 400px;
    margin: 40px auto;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.login-card h2 {
    color: var(--purpur-light);
    margin-bottom: 16px;
}

/* Rules Page Styles */
.anarchy-notice {
    background: rgba(255, 68, 68, 0.1);
    border-left: 4px solid var(--red);
    padding: 16px;
    margin-bottom: 24px;
    border-radius: 0 8px 8px 0;
    color: var(--text);
    font-size: 14px;
}

.rule-item {
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
}

.rule-item h3 {
    font-size: 16px;
    color: var(--purpur-light);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.rule-item h3 span:first-child {
    background: var(--purpur);
    color: #fff;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
}

.rule-severity {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: auto;
}

.rule-severity.ban {
    background: var(--red);
    color: #fff;
}

.rule-severity.warning {
    background: var(--gold);
    color: var(--gold-text);
}

.rule-item p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Post Replies */
.replies-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.reply-item {
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid var(--purpur-dark);
    padding: 8px 12px;
    border-radius: 0 4px 4px 0;
}
.btn-xs {
    padding: 4px 10px;
    font-size: 11px;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
}

.modal-card {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 24px;
    border-radius: 12px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.modal-card h3 {
    margin-bottom: 12px;
    color: var(--purpur-light);
}
