﻿/* Global dark theme overrides (Grand Failer vibe) */
:root {
    --hc-bg: #0b0b0d;
    --hc-bg-alt: #121216;
    --hc-surface: #181a1f;
    --hc-border: #2a2d34;
    --hc-text: #e6e6e9;
    --hc-text-muted: #a7aab0;
    --hc-accent: #c53030; /* deep crimson */
    --hc-accent-2: #8b0000;
}

html, body {
    background: var(--hc-bg);
    color: var(--hc-text);
}

/* Remove default bottom spacing from template */
body {
    margin-bottom: 0 !important;
    padding-bottom: 70px;
}

/* Ensure page content doesn't get hidden under footer image */
main[role=main] {
    padding-bottom: 96px;
}

/* Links: switch from red to high-contrast light for readability */
a {
    color: #e2e8f0;
    text-decoration: none;
}

    a:visited {
        color: #cbd5e1;
    }

    a:hover, a:focus {
        color: #ffffff;
        text-decoration: underline;
    }

/* Ensure sidebar admin button text is readable on red background */
.admin-btn {
    color: #ffffff !important;
    font-weight: 700;
    text-align: center;
}

    .admin-btn:hover, .admin-btn:focus {
        color: #ffffff !important;
        text-decoration: none;
    }

.navbar.bg-dark, .navbar-dark {
    background-color: #0f0f12 !important;
}

.container, .container-fluid {
    color: var(--hc-text);
}

.border, .border-top, .border-bottom, .border-start, .border-end,
.table, .table > :not(caption) > * > * {
    border-color: var(--hc-border) !important;
}

.card, .list-group-item, .dropdown-menu, .modal-content {
    background-color: var(--hc-surface) !important;
    color: var(--hc-text) !important;
    border-color: var(--hc-border) !important;
}

/* Improve readability for admin tables and forms */
/* Admin tables use light background for maximum readability */
.admin-table {
    background-color: #ffffff !important;
    border-color: #e5e7eb !important;
}

    .admin-table thead th {
        background-color: #f8fafc !important;
        color: #111 !important;
        border-color: #e5e7eb !important;
    }

    .admin-table td, .admin-table th {
        color: #111 !important;
        border-color: #e5e7eb !important;
    }

    .admin-table a {
        color: #0f172a !important;
    }

    .admin-table .form-control, .admin-table .form-select {
        background-color: #ffffff;
        color: #111;
        border-color: #cbd5e1;
    }

.card .form-label {
    color: #f3f3f6 !important;
}

.card .form-control::placeholder {
    color: #b9bec8;
}

.card .btn-success {
    color: #0b0b0d;
    font-weight: 700;
}

.card .btn-warning {
    color: #0b0b0d;
    font-weight: 700;
}

.list-group-item .small, .text-muted, .card .small {
    color: var(--hc-text-muted);
}

.form-control, .form-select, .form-control:focus, .form-select:focus {
    background-color: #111318;
    border-color: var(--hc-border);
    color: var(--hc-text);
}

.btn-primary {
    background-color: var(--hc-accent);
    border-color: var(--hc-accent);
}

    .btn-primary:hover {
        background-color: #e04a4a;
        border-color: #e04a4a;
    }

.btn-outline-primary {
    color: #ff6464;
    border-color: #7a1d1d;
}

    .btn-outline-primary:hover {
        background-color: #7a1d1d;
        border-color: #7a1d1d;
        color: #fff;
    }

.btn-outline-light {
    color: #e6e6e9;
    border-color: #4b4f56;
}

    .btn-outline-light:hover {
        background-color: #4b4f56;
        color: #fff;
    }

/* Login page */
.login-box {
    max-width: 420px;
    margin: 24px auto 48px auto;
}

.login-ticket-btn {
    width: 180px; /* wider for better tap/click target */
    height: 73px; /* match image height as requested */
    background: url('/legacy-images/LoginButton.png') no-repeat center center;
    background-size: contain; /* scale image inside button area */
    border: none;
    cursor: pointer;
}

    .login-ticket-btn:focus {
        outline: 2px solid rgba(255,255,255,.15);
    }

.register-ticket-btn {
    width: 200px;
    height: 73px;
    background: url('/legacy-images/RegisterButton.png') no-repeat center center;
    background-size: contain;
    border: none;
    cursor: pointer;
}

footer.footer {
    background: url('/legacy-images/BG_Bottom.jpg') no-repeat center bottom;
    color: var(--hc-text-muted);
    padding: 0; /* no inner spacing */
    margin: 0; /* flush with page bottom */
    border-top: 0 !important;
    background-size: contain; /* keep aspect, stick to bottom */
    min-height: 76px;
}

    footer.footer .container {
        text-align: center;
    }

/* Banner */
header img {
    filter: contrast(105%) saturate(105%);
}

/* Gothic sidebar links in right column */
.gothic-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

    .gothic-panel .sidebar-img {
        display: block;
        width: 260px;
        max-width: 260px;
        height: auto;
        border: 1px solid rgba(255,255,255,.08);
        box-shadow: 0 6px 24px rgba(0,0,0,.6);
    }

/* Forum-specific */
.chat-left {
    background: #1a1d24 !important;
}

.chat-right {
    background: #241416 !important;
    border: 1px solid #3a1c1c;
}

.pagination .page-link {
    background-color: var(--hc-surface);
    color: var(--hc-text);
    border-color: var(--hc-border);
}

.pagination .page-item.active .page-link {
    background-color: var(--hc-accent);
    border-color: var(--hc-accent);
}

/* Table rows, hover */
.list-group-item {
    transition: background-color .15s ease;
}

    .list-group-item:hover {
        background-color: #1f2229 !important;
    }

    /* Links inside list items */
    /* Forum titles inside lists should be very readable */
    .list-group-item a {
        color: #e6e6e9;
        font-weight: 600;
    }

        .list-group-item a:hover {
            color: #ffffff;
        }

/* Verification message link emphasis */
.verify-msg {
    color: var(--hc-text-muted);
}

    .verify-msg .verify-link {
        color: #ffb3b3; /* light crimson for visibility */
        text-decoration: underline;
        font-weight: 700;
    }

        .verify-msg .verify-link:hover {
            color: #ffffff;
            text-shadow: 0 0 6px rgba(197,48,48,.6);
        }

/* Poster (author) highlight label */
.poster-badge {
    display: inline-block;
    padding: .02rem .28rem;
    line-height: 1.1;
    border-radius: .25rem;
    background-color: rgba(197, 48, 48, .65); /* softer crimson */
    border: 1px solid rgba(197, 48, 48, .35);
    color: #f6f6f7;
    font-weight: 600;
    letter-spacing: .05px;
    font-size: .75rem;
}

/* Slight variant when it's the signed-in user's bubble */
.chat-right .poster-badge {
    background-color: rgba(179, 51, 51, .72);
    border-color: rgba(179, 51, 51, .35);
}

/* Headings */
h1, h2, h3, h4, h5 {
    color: #f1f1f3;
}
