/* ============================================
   DPG RETRO MOTD THEME
   Matching dpg_retro sourcebans theme
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&family=Rajdhani:wght@300;400;500;600;700&display=swap');

/* --- CSS Variables --- */
:root {
    --neon-cyan: #00d4ff;
    --neon-blue: #0066ff;
    --neon-purple: #8000ff;
    --neon-pink: #ff0080;
    --bg-primary: #0a0a12;
    --bg-secondary: #0d0d18;
    --bg-tertiary: #12121f;
    --bg-card: rgba(13, 13, 24, 0.85);
    --bg-hover: rgba(0, 212, 255, 0.1);
    --text-primary: #e0e6ed;
    --text-secondary: #8892a0;
    --text-accent: #00d4ff;
    --text-muted: #5a6270;
    --border-color: rgba(0, 212, 255, 0.2);
    --border-glow: rgba(0, 212, 255, 0.4);
    --status-active: #00ff88;
    --status-banned: #ff4444;
    --status-warning: #ffaa00;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    width: 100%;
    font-family: 'Rajdhani', 'Verdana', Arial, sans-serif;
    font-size: 15px;
    font-weight: 400;
    color: var(--text-primary);
    background: var(--bg-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

body {
    background-image:
        linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px),
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 0, 0, 0.03) 2px, rgba(0, 0, 0, 0.03) 4px);
    background-size: 50px 50px, 50px 50px, 100% 4px;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--neon-cyan), var(--neon-blue));
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--neon-blue), var(--neon-cyan));
}

/* --- Floating Particles --- */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--neon-cyan);
    border-radius: 50%;
    opacity: 0.3;
    animation: floatParticle 20s infinite ease-in-out;
}
.particle:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; animation-duration: 22s; }
.particle:nth-child(2) { left: 25%; top: 60%; animation-delay: -3s; animation-duration: 18s; }
.particle:nth-child(3) { left: 45%; top: 35%; animation-delay: -7s; animation-duration: 25s; }
.particle:nth-child(4) { left: 65%; top: 75%; animation-delay: -11s; animation-duration: 20s; }
.particle:nth-child(5) { left: 80%; top: 15%; animation-delay: -5s; animation-duration: 23s; }
.particle:nth-child(6) { left: 90%; top: 50%; animation-delay: -9s; animation-duration: 19s; }
.particle:nth-child(7) { left: 15%; top: 85%; animation-delay: -13s; animation-duration: 21s; }
.particle:nth-child(8) { left: 55%; top: 10%; animation-delay: -2s; animation-duration: 24s; }

@keyframes floatParticle {
    0%, 100% { transform: translate(0, 0); opacity: 0.2; }
    25% { transform: translate(30px, -40px); opacity: 0.5; }
    50% { transform: translate(-20px, -80px); opacity: 0.3; }
    75% { transform: translate(40px, -30px); opacity: 0.4; }
}

/* --- Main Layout --- */
.motd-wrapper {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 30px 20px 40px;
}

/* --- Header --- */
.motd-header {
    text-align: center;
    padding: 40px 30px 30px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease;
}
.motd-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-blue), var(--neon-purple));
}
.motd-header .logo {
    max-width: 280px;
    width: 60%;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.3));
}
.motd-header h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
}
.motd-header h1 .player-name {
    color: var(--neon-cyan);
    text-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
}
.motd-header .tagline {
    font-family: 'Rajdhani', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 15px;
}
.motd-header .notice {
    display: inline-block;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px 16px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--neon-cyan);
    letter-spacing: 0.5px;
}

/* --- Section Panels --- */
.motd-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
    animation: fadeInUp 0.6s ease;
}
.motd-section:nth-child(2) { animation-delay: 0.1s; }
.motd-section:nth-child(3) { animation-delay: 0.15s; }
.motd-section:nth-child(4) { animation-delay: 0.2s; }
.motd-section:nth-child(5) { animation-delay: 0.25s; }

.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
    border-bottom: 1px solid var(--border-color);
    cursor: default;
}
.section-header .section-icon {
    font-size: 16px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.15), rgba(0, 102, 255, 0.15));
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--neon-cyan);
}
.section-header h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--neon-cyan);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0;
}
.section-header .updated-tag {
    margin-left: auto;
    font-family: 'Rajdhani', sans-serif;
    font-size: 11px;
    font-weight: 500;
    color: var(--status-active);
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 3px;
    padding: 2px 8px;
    letter-spacing: 0.5px;
}
/* NEW Badge */
.new-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ff4444, #cc0000);
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 2px 6px;
    border-radius: 3px;
    margin-right: 6px;
    vertical-align: middle;
    box-shadow: 0 0 8px rgba(255, 68, 68, 0.4);
    animation: badgePulse 2s ease-in-out infinite;
}
@keyframes badgePulse {
    0%, 100% { box-shadow: 0 0 8px rgba(255, 68, 68, 0.4); }
    50% { box-shadow: 0 0 14px rgba(255, 68, 68, 0.7); }
}

.section-body {
    padding: 20px;
}

/* --- Quick Links Grid --- */
.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}
.link-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 500;
    font-size: 14px;
}
.link-card:hover {
    border-color: var(--border-glow);
    background: var(--bg-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.15);
    color: #fff;
}
.link-card .link-icon {
    font-size: 16px;
    color: var(--neon-cyan);
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}
.link-card .link-label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.link-card .link-url {
    font-size: 13px;
}

/* --- Commands Section --- */
.commands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
}
.cmd-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border: 1px solid rgba(0, 212, 255, 0.08);
    border-radius: 4px;
    transition: all 0.2s ease;
}
.cmd-item:hover {
    border-color: var(--border-color);
    background: var(--bg-hover);
}
.cmd-name {
    font-family: 'Share Tech Mono', 'Consolas', monospace;
    font-size: 12px;
    color: var(--neon-cyan);
    background: rgba(0, 212, 255, 0.08);
    padding: 2px 8px;
    border-radius: 3px;
    white-space: nowrap;
    flex-shrink: 0;
}
.cmd-desc {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Collapsible commands */
.commands-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-secondary);
    font-family: 'Rajdhani', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.commands-toggle:hover {
    color: var(--neon-cyan);
    border-color: var(--border-glow);
    background: var(--bg-hover);
}
.commands-toggle .toggle-arrow {
    transition: transform 0.3s ease;
    font-size: 10px;
}
.commands-toggle.expanded .toggle-arrow {
    transform: rotate(180deg);
}
.commands-extra {
    display: none;
    margin-top: 8px;
}
.commands-extra.show {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
    animation: fadeIn 0.3s ease;
}

/* --- Rules Section --- */
.rule-item {
    padding: 16px 18px;
    background: var(--bg-tertiary);
    border: 1px solid rgba(0, 212, 255, 0.08);
    border-left: 3px solid var(--neon-cyan);
    border-radius: 0 6px 6px 0;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}
.rule-item:hover {
    border-left-color: #fff;
    background: var(--bg-hover);
    box-shadow: 0 2px 12px rgba(0, 212, 255, 0.1);
}
.rule-item:last-child {
    margin-bottom: 0;
}
.rule-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.rule-title .rule-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue));
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 4px;
    flex-shrink: 0;
}
.rule-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    font-weight: 400;
}
.rule-text em {
    color: var(--neon-cyan);
    font-style: normal;
    font-weight: 600;
}

/* --- Sub-section Headers (TTT rules, help page, etc.) --- */
.sub-header {
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px 14px;
    margin: 16px 0 10px;
    border-radius: 4px;
    background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
    border-left: 3px solid var(--neon-cyan);
}
.sub-header.red { border-left-color: var(--status-banned); color: var(--status-banned); }
.sub-header.blue { border-left-color: var(--neon-cyan); color: var(--neon-cyan); }
.sub-header.green { border-left-color: var(--status-active); color: var(--status-active); }
.sub-header.orange { border-left-color: var(--status-warning); color: var(--status-warning); }
.sub-header.muted { border-left-color: var(--text-muted); color: var(--text-secondary); }

/* Nested rule sub-items */
.rule-sublist {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
}
.rule-sublist li {
    position: relative;
    padding: 4px 0 4px 16px;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 400;
    line-height: 1.5;
}
.rule-sublist li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 11px;
    width: 5px;
    height: 5px;
    background: var(--text-muted);
    border-radius: 50%;
}
.rule-sublist.allowed li::before { background: var(--status-active); }
.rule-sublist.denied li::before { background: var(--status-banned); }

/* Info callout box */
.info-callout {
    background: rgba(0, 212, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 12px 16px;
    margin: 10px 0;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}
.info-callout em {
    color: var(--neon-cyan);
    font-style: normal;
    font-weight: 600;
}
.info-callout a {
    color: var(--neon-cyan);
    text-decoration: none;
}
.info-callout a:hover {
    text-decoration: underline;
}

/* Help page info items */
.info-item {
    padding: 14px 18px;
    background: var(--bg-tertiary);
    border: 1px solid rgba(0, 212, 255, 0.08);
    border-radius: 6px;
    margin-bottom: 10px;
}
.info-item:last-child {
    margin-bottom: 0;
}
.info-item h4 {
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: var(--neon-cyan);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}
.info-item h4.warning { color: var(--status-warning); }
.info-item h4.danger { color: var(--status-banned); }
.info-item p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Rarity list */
.rarity-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 6px;
}
.rarity-list li {
    padding: 6px 12px;
    background: var(--bg-secondary);
    border: 1px solid rgba(0, 212, 255, 0.08);
    border-radius: 4px;
    font-size: 13px;
    color: var(--text-secondary);
}
.rarity-list li strong {
    margin-right: 4px;
}

/* Q&A items (content.php) */
.qa-item {
    margin-bottom: 14px;
}
.qa-item:last-child {
    margin-bottom: 0;
}
.qa-question {
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: var(--status-banned);
    margin-bottom: 4px;
}
.qa-answer {
    font-size: 14px;
    color: var(--status-active);
    font-weight: 500;
    padding-left: 14px;
    border-left: 2px solid rgba(0, 255, 136, 0.3);
}

/* --- Notes Section --- */
.notes-list {
    list-style: none;
    padding: 0;
}
.notes-list li {
    position: relative;
    padding: 8px 0 8px 20px;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 400;
    border-bottom: 1px solid rgba(0, 212, 255, 0.05);
}
.notes-list li:last-child {
    border-bottom: none;
}
.notes-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 14px;
    width: 6px;
    height: 6px;
    background: var(--text-muted);
    border-radius: 50%;
}

/* --- Footer --- */
.motd-footer {
    text-align: center;
    padding: 20px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 13px;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}
.motd-footer strong {
    color: var(--neon-cyan);
    font-weight: 600;
}

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* --- Responsive --- */
@media (max-width: 600px) {
    .motd-wrapper {
        padding: 15px 12px 30px;
    }
    .motd-header {
        padding: 25px 18px 22px;
    }
    .motd-header h1 {
        font-size: 15px;
        letter-spacing: 1px;
    }
    .motd-header .logo {
        max-width: 200px;
    }
    .links-grid {
        grid-template-columns: 1fr;
    }
    .commands-grid,
    .commands-extra.show {
        grid-template-columns: 1fr;
    }
    .section-header h2 {
        font-size: 11px;
    }
    .section-body {
        padding: 14px;
    }
}
