/* ==========================================================================
   AVELIA2 - PvM MEDIUM OFFICIAL MASTER THEME (Bordeaux, Ruby & Imperial Gold)
   ========================================================================== */

:root {
    --bg-main: #0c0306;
    --bg-secondary: #17050b;
    --bordeaux-surface: rgba(28, 8, 14, 0.94);
    --bordeaux-surface-hover: rgba(42, 12, 21, 0.96);
    --bordeaux-header: rgba(18, 4, 8, 0.96);
    --border-ruby: rgba(185, 45, 65, 0.4);
    --border-ruby-glow: rgba(220, 60, 85, 0.7);
    --gold-primary: #f7d383;
    --gold-secondary: #e6b85c;
    --gold-glow: rgba(247, 211, 131, 0.45);
    --text-primary: #f3e9eb;
    --text-secondary: #bfaab0;
    --accent-crimson: #a81c33;
    --accent-crimson-hover: #c72542;
    --card-shadow: 0 16px 45px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 160, 180, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-main) !important;
    background: radial-gradient(ellipse at 50% 0%, #290811 0%, #120407 50%, #060103 100%) !important;
    color: var(--text-primary) !important;
    font-family: 'Open Sans', sans-serif !important;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: var(--gold-primary);
    text-decoration: none;
    transition: all 0.25s ease;
}

a:hover {
    color: #fff;
    text-shadow: 0 0 10px var(--gold-glow);
}

/* ---------------- Topbar ---------------- */
.topbar {
    background: #080204 !important;
    border-bottom: 1px solid rgba(185, 45, 65, 0.25) !important;
    color: var(--text-secondary) !important;
    font-size: 13px !important;
    padding: 7px 0 !important;
}

.topbar a {
    color: var(--gold-primary) !important;
    font-weight: 600;
}

/* ---------------- Navbar ---------------- */
.navbar {
    background: var(--bordeaux-header) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    border-bottom: 1px solid var(--border-ruby) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8) !important;
    padding: 14px 0 !important;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    font-family: 'Philosopher', serif !important;
    font-size: 26px !important;
    font-weight: 700 !important;
    color: var(--gold-primary) !important;
    text-shadow: 0 0 15px var(--gold-glow) !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-brand span {
    font-size: 13px;
    letter-spacing: 2px;
    color: #e59ba9;
    font-weight: 400;
    text-transform: uppercase;
}

.nav-link {
    color: var(--text-primary) !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    font-size: 13px !important;
    letter-spacing: 0.6px !important;
    padding: 8px 16px !important;
    transition: all 0.25s ease !important;
}

.nav-link:hover, .nav-link.active {
    color: var(--gold-primary) !important;
    text-shadow: 0 0 10px var(--gold-glow) !important;
}

.nav-link-btn {
    background: linear-gradient(135deg, var(--accent-crimson) 0%, #630c1b 100%) !important;
    border: 1px solid #d4455b !important;
    border-radius: 6px !important;
    box-shadow: 0 4px 15px rgba(168, 28, 51, 0.45) !important;
    color: #fff !important;
    padding: 7px 22px !important;
    font-weight: 700 !important;
}

.nav-link-btn:hover {
    background: linear-gradient(135deg, var(--accent-crimson-hover) 0%, #851225 100%) !important;
    box-shadow: 0 6px 20px rgba(199, 37, 66, 0.7) !important;
    transform: translateY(-1px);
    color: #fff !important;
}

/* ---------------- Hero Banner ---------------- */
.hero-banner {
    position: relative;
    background-image: linear-gradient(180deg, rgba(12, 3, 6, 0.05) 0%, rgba(12, 3, 6, 0.35) 65%, #0c0306 100%), url('../images/background_header.png?v=2026');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    min-height: 620px;
    display: flex;
    align-items: flex-end;
    padding: 0 0 50px;
    border-bottom: 1px solid var(--border-ruby);
}

.hero-content {
    max-width: 650px;
}

.hero-logo-spacer {
    padding-top: 330px;
}

@media (max-width: 991px) {
    .hero-banner {
        min-height: 480px;
    }
    .hero-logo-spacer {
        padding-top: 210px;
    }
}

@media (max-width: 576px) {
    .hero-logo-spacer {
        padding-top: 130px;
    }
}

.hero-badge {
    display: inline-block;
    background: rgba(168, 28, 51, 0.4);
    border: 1px solid #d4455b;
    border-radius: 20px;
    padding: 5px 16px;
    font-size: 13px;
    font-weight: 700;
    color: var(--gold-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 18px;
    box-shadow: 0 0 15px rgba(212, 69, 91, 0.3);
}

.hero-title {
    font-family: 'Philosopher', serif;
    font-size: 52px;
    font-weight: 700;
    color: #fff;
    line-height: 1.15;
    margin-bottom: 18px;
    text-shadow: 0 3px 20px rgba(0, 0, 0, 0.9);
}

.hero-title span {
    color: var(--gold-primary);
    text-shadow: 0 0 25px var(--gold-glow);
}

.hero-desc {
    color: var(--text-primary);
    font-size: 17px;
    line-height: 1.6;
    margin-bottom: 30px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.btn-hero-primary {
    background: linear-gradient(135deg, var(--accent-crimson) 0%, #630c1b 100%);
    border: 1px solid #d4455b;
    border-radius: 8px;
    color: #fff;
    padding: 15px 36px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 6px 25px rgba(168, 28, 51, 0.6);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-hero-primary:hover {
    background: linear-gradient(135deg, var(--accent-crimson-hover) 0%, #851225 100%);
    box-shadow: 0 8px 30px rgba(199, 37, 66, 0.85);
    transform: translateY(-2px);
    color: #fff;
}

.btn-hero-secondary {
    background: rgba(30, 8, 15, 0.85);
    border: 1px solid var(--border-ruby);
    border-radius: 8px;
    color: var(--gold-primary);
    padding: 15px 32px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.btn-hero-secondary:hover {
    background: rgba(45, 12, 22, 0.95);
    border-color: var(--gold-primary);
    color: #fff;
    box-shadow: 0 0 20px var(--gold-glow);
    transform: translateY(-2px);
}

/* ---------------- Stats Grid ---------------- */
.stats-section {
    background: linear-gradient(180deg, rgba(22, 5, 11, 0.98) 0%, rgba(12, 3, 6, 0.98) 100%);
    border-bottom: 1px solid var(--border-ruby);
    padding: 30px 0;
}

.stat-card {
    background: var(--bordeaux-surface);
    border: 1px solid var(--border-ruby);
    border-radius: 10px;
    padding: 18px 22px;
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: var(--border-ruby-glow);
    transform: translateY(-2px);
}

.stat-icon {
    font-size: 28px;
    color: var(--gold-primary);
    background: rgba(168, 28, 51, 0.3);
    border: 1px solid rgba(168, 28, 51, 0.5);
    width: 54px;
    height: 54px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-info h5 {
    color: var(--gold-primary);
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    font-family: 'Philosopher', serif;
}

.stat-info span {
    color: var(--text-secondary);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ---------------- Features Grid ---------------- */
.features-section {
    padding: 70px 0;
}

.section-head {
    text-align: center;
    margin-bottom: 50px;
}

.section-head h2 {
    font-family: 'Philosopher', serif;
    font-size: 38px;
    color: var(--gold-primary);
    margin-bottom: 8px;
    text-shadow: 0 2px 15px var(--gold-glow);
}

.section-head p {
    color: #d67a8c;
    font-size: 16px;
    max-width: 600px;
    margin: 0 auto;
}

.feature-card {
    background: var(--bordeaux-surface);
    border: 1px solid var(--border-ruby);
    border-radius: 12px;
    padding: 30px 24px;
    box-shadow: var(--card-shadow);
    height: 100%;
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: var(--gold-primary);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.9), 0 0 20px rgba(247, 211, 131, 0.2);
    transform: translateY(-4px);
}

.feature-card i {
    font-size: 34px;
    color: var(--gold-primary);
    margin-bottom: 18px;
    display: inline-block;
}

.feature-card h4 {
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

/* ---------------- Ranking Section ---------------- */
.ranking-section {
    background: #080204;
    border-top: 1px solid var(--border-ruby);
    border-bottom: 1px solid var(--border-ruby);
    padding: 70px 0;
}

.ranking-card {
    background: var(--bordeaux-surface);
    border: 1px solid var(--border-ruby);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--card-shadow);
}

.custom-nav-pills {
    border-bottom: 1px solid var(--border-ruby);
    padding-bottom: 16px;
    margin-bottom: 24px;
    gap: 12px;
}

.custom-nav-pills .nav-link {
    background: rgba(35, 10, 16, 0.8) !important;
    border: 1px solid var(--border-ruby) !important;
    border-radius: 8px !important;
    color: var(--text-primary) !important;
    padding: 9px 22px !important;
}

.custom-nav-pills .nav-link.active {
    background: linear-gradient(135deg, var(--accent-crimson) 0%, #630c1b 100%) !important;
    border-color: #d4455b !important;
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(168, 28, 51, 0.5) !important;
}

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

.ranking-table th {
    color: var(--gold-primary);
    border-bottom: 1px solid var(--border-ruby);
    padding: 12px 14px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ranking-table td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(185, 45, 65, 0.15);
    color: var(--text-primary);
    font-size: 14px;
}

.ranking-table tr:hover td {
    background: rgba(185, 45, 65, 0.15);
    color: #fff;
}

.badge-rank-1 {
    background: linear-gradient(135deg, #ffd700, #b8860b);
    color: #000;
    font-weight: 800;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.badge-rank-2 {
    background: linear-gradient(135deg, #e0e0e0, #8a8a8a);
    color: #000;
    font-weight: 800;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.badge-rank-3 {
    background: linear-gradient(135deg, #cd7f32, #8b4513);
    color: #fff;
    font-weight: 800;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ---------------- Generic Form Pages (Login, Register) ---------------- */
.auth-page {
    padding: 80px 0;
    min-height: calc(100vh - 250px);
    display: flex;
    align-items: center;
}

.auth-card {
    background: var(--bordeaux-surface);
    border: 1px solid var(--border-ruby);
    border-radius: 14px;
    box-shadow: var(--card-shadow);
    padding: 40px;
    max-width: 500px;
    margin: 0 auto;
}

.auth-card h2 {
    font-family: 'Philosopher', serif;
    color: var(--gold-primary);
    font-size: 32px;
    margin-bottom: 24px;
    text-align: center;
}

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

.form-group label {
    color: var(--text-secondary);
    font-size: 13px;
    text-transform: uppercase;
    margin-bottom: 6px;
    display: block;
    font-weight: 600;
}

.form-input {
    width: 100%;
    background: rgba(16, 4, 8, 0.85);
    border: 1px solid var(--border-ruby);
    border-radius: 8px;
    padding: 12px 16px;
    color: #fff;
    font-size: 15px;
    transition: all 0.25s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--gold-primary);
    box-shadow: 0 0 15px var(--gold-glow);
    background: rgba(24, 6, 12, 0.95);
}

.btn-auth-submit {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-crimson) 0%, #630c1b 100%);
    border: 1px solid #d4455b;
    border-radius: 8px;
    color: #fff;
    padding: 14px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(168, 28, 51, 0.5);
    transition: all 0.25s ease;
}

.btn-auth-submit:hover {
    background: linear-gradient(135deg, var(--accent-crimson-hover) 0%, #851225 100%);
    box-shadow: 0 6px 25px rgba(199, 37, 66, 0.75);
    transform: translateY(-1px);
}

/* ---------------- Footer ---------------- */
.footer-main {
    background: #050102;
    border-top: 1px solid var(--border-ruby);
    color: var(--text-secondary);
    padding: 40px 0 30px;
    font-size: 14px;
}

.footer-main a {
    color: #d67a8c;
}

.footer-main a:hover {
    color: var(--gold-primary);
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 36px;
    }
    .hero-banner {
        min-height: auto;
        padding: 50px 0;
    }
}

/* ==========================================================================
   LEGACY BACKGROUND OVERRIDE (NO MORE WHITE / TEMPLE BACKGROUNDS)
   ========================================================================== */
.page, .panel, .panel-ranking, .main-content-wrap {
    background-image: none !important;
    background-color: transparent !important;
}

.page-container, .page, .auth-page {
    background-image: linear-gradient(180deg, rgba(12, 3, 6, 0.35) 0%, rgba(12, 3, 6, 0.75) 100%), url('../images/avelia2-payments-bg.png') !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
    min-height: calc(100vh - 200px);
}

@media (min-width: 992px) {
    .auth-page .auth-card {
        margin-left: 0 !important;
    }
}

.download-header-spacer {
    padding-top: 240px;
}

@media (max-width: 991px) {
    .download-header-spacer {
        padding-top: 170px;
    }
}

@media (max-width: 576px) {
    .download-header-spacer {
        padding-top: 110px;
    }
}
