/* ============================================
   DDTank B.Malaysia — Fresh 2025 Design
   ============================================ */

:root {
    --primary: #6C5CE7;
    --primary-light: #a29bfe;
    --primary-dark: #5241cc;
    --accent: #00cec9;
    --accent2: #fd79a8;
    --dark: #0f0f23;
    --dark2: #1a1a2e;
    --surface: #16162a;
    --bg: #f0f1f7;
    --card: #ffffff;
    --text: #1a1a2e;
    --text2: #6c6c80;
    --border: #e8e8ef;
    --grad: linear-gradient(135deg, #6C5CE7 0%, #a29bfe 100%);
    --grad-dark: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #2d2b55 100%);
    --shadow: 0 2px 16px rgba(108, 92, 231, 0.08);
    --shadow-lg: 0 8px 32px rgba(108, 92, 231, 0.12);
    --radius: 16px;
    --radius-sm: 10px;
}

/* --- Base --- */
body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    padding-top: 72px;
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

a { transition: .2s; }

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
    background: rgba(15, 15, 35, 0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(108, 92, 231, 0.15);
    padding: 0 0;
    min-height: 72px;
}

.navbar .container { max-width: 1200px; }

.navbar-brand {
    font-weight: 800;
    font-size: 22px;
    color: #fff !important;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.5px;
}

.navbar-brand i { color: var(--primary-light); font-size: 24px; }

.navbar-nav .nav-link {
    color: rgba(255,255,255,0.7) !important;
    font-weight: 500;
    font-size: 14px;
    padding: 24px 16px !important;
    transition: .2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.navbar-nav .nav-link:hover { color: #fff !important; }

.btn-register {
    background: var(--grad) !important;
    color: #fff !important;
    border-radius: 50px !important;
    padding: 10px 20px !important;
    margin: 16px 0 16px 8px;
    font-weight: 600 !important;
    font-size: 13px !important;
    box-shadow: 0 4px 16px rgba(108, 92, 231, 0.3);
}

.btn-register:hover {
    box-shadow: 0 6px 24px rgba(108, 92, 231, 0.5) !important;
    transform: translateY(-1px);
}

.navbar-toggler {
    border: 2px solid rgba(108, 92, 231, 0.4);
    padding: 6px 10px;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28162, 155, 254, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ============================================
   HERO
   ============================================ */
.hero {
    background: var(--grad-dark);
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(108,92,231,0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0,206,201,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(108,92,231,0.2);
    border: 1px solid rgba(108,92,231,0.3);
    color: var(--primary-light);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
}

.hero h1 {
    font-size: 48px;
    font-weight: 900;
    color: #fff;
    letter-spacing: -1px;
    line-height: 1.1;
    margin-bottom: 16px;
}

.hero h1 span {
    background: var(--grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    color: rgba(255,255,255,0.6);
    font-size: 18px;
    max-width: 500px;
    line-height: 1.6;
}

/* Hero icon display */
.hero-icon-display {
    position: relative;
    width: 280px;
    height: 280px;
    margin: 0 auto;
}

.hero-ring {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(108,92,231,0.1);
    border: 2px solid rgba(108,92,231,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: hero-pulse 3s ease-in-out infinite;
}

.hero-ring i {
    font-size: 64px;
    background: var(--grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes hero-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(108,92,231,0.2); }
    50% { box-shadow: 0 0 0 20px rgba(108,92,231,0); }
}

.hero-floating-icons { position: absolute; inset: 0; }

.float-icon {
    position: absolute;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    border: 1px solid rgba(255,255,255,0.1);
}

.fi-1 { top: 10%; left: 5%; animation: float-y 4s ease-in-out infinite; }
.fi-2 { top: 5%; right: 10%; animation: float-y 5s ease-in-out infinite 0.5s; }
.fi-3 { bottom: 15%; left: 10%; animation: float-y 4.5s ease-in-out infinite 1s; }
.fi-4 { bottom: 10%; right: 5%; animation: float-y 3.5s ease-in-out infinite 1.5s; }

@keyframes float-y {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* Hero particles */
.hero-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.15;
}

.p1 { width: 6px; height: 6px; background: var(--primary-light); top: 20%; left: 15%; animation: drift 8s linear infinite; }
.p2 { width: 4px; height: 4px; background: var(--accent); top: 60%; left: 80%; animation: drift 12s linear infinite 2s; }
.p3 { width: 8px; height: 8px; background: var(--accent2); top: 40%; left: 50%; animation: drift 10s linear infinite 4s; }
.p4 { width: 3px; height: 3px; background: #fff; top: 75%; left: 25%; animation: drift 9s linear infinite 1s; }
.p5 { width: 5px; height: 5px; background: var(--primary-light); top: 30%; left: 70%; animation: drift 11s linear infinite 3s; }

@keyframes drift {
    0% { transform: translateY(0) translateX(0); opacity: 0; }
    20% { opacity: 0.15; }
    80% { opacity: 0.15; }
    100% { transform: translateY(-100px) translateX(30px); opacity: 0; }
}

.btn-hero {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--grad);
    color: #fff;
    border: none;
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(108,92,231,0.4);
    transition: .3s;
}

.btn-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(108,92,231,0.5);
    color: #fff;
}

.btn-hero-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.2);
    padding: 12px 28px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: .3s;
}

.btn-hero-outline:hover {
    border-color: var(--primary-light);
    color: var(--primary-light);
}

/* ============================================
   SECTION
   ============================================ */
.section {
    padding: 64px 0;
}

.section-heading {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}

.section-heading span { color: var(--primary); }
.section-sub { color: var(--text2); font-size: 15px; margin-bottom: 40px; }

.section-dark {
    background: var(--grad-dark);
    color: #fff;
    padding: 64px 0;
}

.section-dark .section-heading { color: #fff; }
.section-dark .section-sub { color: rgba(255,255,255,0.5); }

/* ============================================
   CARDS
   ============================================ */
.card-v {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: .3s;
    height: 100%;
}

.card-v:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-v .card-v-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 16px;
}

.card-v .card-v-body { padding: 24px; }

.icon-box {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff;
    flex-shrink: 0;
}

.icon-box.purple { background: var(--grad); }
.icon-box.teal { background: linear-gradient(135deg, #00cec9, #55efc4); }
.icon-box.pink { background: linear-gradient(135deg, #fd79a8, #e84393); }
.icon-box.gold { background: linear-gradient(135deg, #ffeaa7, #fdcb6e); color: #333; }

/* ============================================
   NEWS LIST
   ============================================ */
.news-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    transition: .15s;
}

.news-item:last-child { border-bottom: none; }
.news-item:hover { color: var(--primary); }

.news-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.news-badge.notice { background: #f0eeff; color: var(--primary); }
.news-badge.news { background: #e0faf9; color: #00b5b0; }
.news-badge.event { background: #ffeef4; color: #e84393; }

.news-title { font-weight: 500; font-size: 14px; flex: 1; }
.news-date { font-size: 12px; color: var(--text2); white-space: nowrap; }

/* ============================================
   LEADERBOARD
   ============================================ */
.lb-row {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
    transition: .15s;
}

/* Dark variant */
.section-dark .lb-row { background: rgba(255,255,255,0.04); }
.section-dark .lb-row:hover { background: rgba(255,255,255,0.08); }

/* Light variant (cards) */
.card-v .lb-row { background: var(--bg); }
.card-v .lb-row:hover { background: #ededf7; }

.lb-medal {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
    margin-right: 12px;
    flex-shrink: 0;
}

.lb-medal.gold { background: linear-gradient(135deg, #ffeaa7, #fdcb6e); color: #8a6d00; }
.lb-medal.silver { background: linear-gradient(135deg, #dfe6e9, #b2bec3); color: #555; }
.lb-medal.bronze { background: linear-gradient(135deg, #fab1a0, #e17055); color: #6b2c1a; }
.lb-medal.default { background: rgba(108,92,231,0.1); color: var(--primary); }

.section-dark .lb-medal.default { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.5); }

.lb-name {
    flex: 1;
    font-weight: 600;
    font-size: 14px;
}

.lb-power {
    font-size: 13px;
    color: var(--text2);
    font-weight: 500;
}

.section-dark .lb-name { color: #fff; }
.section-dark .lb-power { color: rgba(255,255,255,0.4); }

/* ============================================
   NEWS PAGE CARDS
   ============================================ */
.news-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 16px;
    transition: .3s;
    display: block;
    color: var(--text);
    text-decoration: none;
}

.news-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--text);
    border-color: var(--primary-light);
}

.news-card h5 {
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 8px;
}

.news-card p {
    color: var(--text2);
    font-size: 14px;
    margin-bottom: 12px;
    line-height: 1.6;
}

.news-card .meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--text2);
}

/* ============================================
   CATEGORY FILTERS (pills)
   ============================================ */
.filter-pills {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.filter-pill {
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text2);
    background: var(--card);
    border: 1px solid var(--border);
    text-decoration: none;
    transition: .2s;
}

.filter-pill:hover {
    border-color: var(--primary-light);
    color: var(--primary);
}

.filter-pill.active {
    background: var(--grad);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(108,92,231,0.3);
}

/* ============================================
   RANKING PAGE
   ============================================ */
.ranking-table {
    width: 100%;
}

.ranking-row {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    transition: .2s;
}

.ranking-row:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow);
    border-color: var(--primary-light);
}

.ranking-rank {
    font-weight: 800;
    font-size: 18px;
    width: 48px;
    text-align: center;
    color: var(--primary);
}

.ranking-row:nth-child(1) .ranking-rank { color: #e67e22; }
.ranking-row:nth-child(2) .ranking-rank { color: #95a5a6; }
.ranking-row:nth-child(3) .ranking-rank { color: #e17055; }

.ranking-player {
    flex: 1;
    margin-left: 16px;
}

.ranking-player-name {
    font-weight: 700;
    font-size: 16px;
}

.ranking-player-server {
    font-size: 12px;
    color: var(--text2);
}

.ranking-power {
    font-weight: 700;
    font-size: 16px;
    color: var(--primary);
}

.ranking-power small {
    font-weight: 500;
    font-size: 12px;
    color: var(--text2);
}

/* ============================================
   AUTH PAGES
   ============================================ */
.auth-page {
    min-height: calc(100vh - 72px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
    background: var(--grad-dark);
    position: relative;
    overflow: hidden;
}

.auth-page::before {
    content: '';
    position: absolute;
    top: 20%;
    right: 10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(108,92,231,0.2) 0%, transparent 70%);
    border-radius: 50%;
}

.auth-box {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    padding: 40px;
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
}

.auth-box h2 {
    font-weight: 800;
    font-size: 28px;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.auth-box .subtitle {
    color: var(--text2);
    font-size: 14px;
    margin-bottom: 28px;
}

.auth-box .form-label {
    font-weight: 600;
    font-size: 13px;
    color: var(--text2);
    margin-bottom: 6px;
}

.auth-box .form-control {
    height: 48px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    padding: 8px 16px;
    background: var(--bg);
    transition: .2s;
}

.auth-box .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(108,92,231,0.1);
    background: #fff;
}

.btn-auth {
    width: 100%;
    height: 48px;
    background: var(--grad);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: .3s;
    box-shadow: 0 4px 16px rgba(108,92,231,0.3);
}

.btn-auth:hover {
    box-shadow: 0 6px 24px rgba(108,92,231,0.5);
    transform: translateY(-1px);
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--text2);
}

.auth-footer a { color: var(--primary); font-weight: 600; }

/* ============================================
   NEWS DETAIL PAGE
   ============================================ */
.article-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 16px;
}

.article-page h1 {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
}

.article-page .meta {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
    color: var(--text2);
    font-size: 14px;
}

.article-page .content {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text);
}

/* ============================================
   STATS BAR
   ============================================ */
.stats-bar {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-top: -40px;
    position: relative;
    z-index: 10;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -1px;
}

.stat-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text2);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    background: var(--dark);
    color: rgba(255,255,255,0.6);
    padding: 48px 0 24px;
    margin-top: 60px;
    font-size: 14px;
}

footer h5, footer h6 {
    color: #fff;
    font-weight: 700;
    margin-bottom: 16px;
}

footer h5 {
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

footer h5 i { color: var(--primary-light); }

footer ul li { margin-bottom: 8px; }
footer ul a { color: rgba(255,255,255,0.5); text-decoration: none; }
footer ul a:hover { color: var(--primary-light); }

/* ============================================
   VALIDATION
   ============================================ */
.field-validation-error,
.validation-summary-errors li {
    color: #e74c3c;
    font-size: 13px;
}

.input-validation-error {
    border-color: #e74c3c !important;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
    .navbar-collapse {
        background: rgba(15, 15, 35, 0.98);
        padding: 16px;
        border-radius: 0 0 16px 16px;
        margin-top: 8px;
    }

    .navbar-nav .nav-link { padding: 12px 0 !important; }
    .btn-register { margin: 8px 0 !important; display: inline-block; }

    .hero h1 { font-size: 36px; }
    .hero p { font-size: 16px; }
    .section-heading { font-size: 26px; }
}

@media (max-width: 576px) {
    body { padding-top: 64px; }
    .navbar { min-height: 64px; }
    .hero { padding: 60px 0 40px; }
    .hero h1 { font-size: 28px; }
    .hero p { font-size: 14px; }
    .section { padding: 40px 0; }
    .section-heading { font-size: 22px; }
    .auth-box { padding: 28px 20px; }
    .stats-bar { margin-top: -24px; }
    .stat-number { font-size: 22px; }
}

/* ============================================
   SERVER SELECTION
   ============================================ */
.server-card {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    transition: .3s;
}

.server-card:hover {
    transform: translateY(-4px);
    background: rgba(255,255,255,0.1);
    border-color: var(--primary-light);
    box-shadow: 0 8px 32px rgba(108,92,231,0.2);
}

.server-card-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--primary-light);
    margin-bottom: 16px;
}

.server-card h3 {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
}

.server-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    color: rgba(255,255,255,0.6);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.online {
    background: #00b894;
    box-shadow: 0 0 8px rgba(0,184,148,0.6);
}

.status-dot.offline {
    background: #e74c3c;
}

/* ============================================
   GAME FRAME
   ============================================ */
.game-frame-container {
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    border: 2px solid rgba(108,92,231,0.3);
    min-height: 600px;
}

.game-frame-container object,
.game-frame-container iframe {
    display: block;
    width: 100%;
    min-height: 600px;
    border: none;
}

/* ============================================
   ADMIN PANEL
   ============================================ */
.admin-page {
    min-height: calc(100vh - 72px);
    padding-top: 20px;
}

.admin-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
}

.table-admin {
    margin-bottom: 0;
}

.table-admin thead th {
    background: var(--bg);
    border-bottom: 2px solid var(--border);
    color: var(--text2);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px;
}

.table-admin tbody td {
    padding: 14px 16px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.table-admin tbody tr:hover {
    background: rgba(108, 92, 231, 0.03);
}

.badge-cat {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-notice { background: rgba(108, 92, 231, 0.12); color: var(--primary); }
.badge-news { background: rgba(0, 206, 201, 0.12); color: var(--accent); }
.badge-event { background: rgba(253, 121, 168, 0.12); color: var(--accent2); }

.admin-card .form-control,
.admin-card .form-select {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 14px;
}

.admin-card .form-control:focus,
.admin-card .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.admin-card .form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text2);
    margin-bottom: 6px;
}

.admin-card textarea.form-control {
    resize: vertical;
    min-height: 120px;
}
