/* =============================================================================
   MDM NEWS — DESIGN SYSTEM & STYLESHEET
   Themes: Dark Cyberpunk (Default) & Light Mode (Yellow MDM Monkey)
   ============================================================================= */

:root {
    /* DARK THEME (DEFAULT) */
    --bg-primary: #08090e;
    --bg-surface: #0f121d;
    --bg-card: rgba(18, 22, 36, 0.8);
    --bg-card-hover: rgba(25, 30, 50, 0.9);
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(0, 240, 255, 0.3);
    
    --text-primary: #f0f3fe;
    --text-secondary: #949ebd;
    --text-muted: #626b85;
    
    --accent-cyan: #00f0ff;
    --accent-pink: #ff007f;
    --accent-purple: #8b5cf6;
    --accent-amber: #f59e0b;
    --accent-green: #10b981;
    
    --gradient-brand: linear-gradient(135deg, #00f0ff 0%, #7928ca 50%, #ff007f 100%);
    --gradient-hero: linear-gradient(135deg, rgba(0,240,255,0.12) 0%, rgba(121,40,202,0.15) 50%, rgba(255,0,127,0.1) 100%);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    --shadow-sm: 0 4px 12px rgba(0,0,0,0.3);
    --shadow-glow: 0 0 25px rgba(0, 240, 255, 0.15);
}

/* LIGHT THEME OVERRIDES */
body.theme-light {
    --bg-primary: #f4f6fc;
    --bg-surface: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-card-hover: rgba(255, 255, 255, 1);
    
    --border-color: rgba(0, 0, 0, 0.09);
    --border-glow: rgba(245, 158, 11, 0.3);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --accent-cyan: #0284c7;
    --accent-pink: #e11d48;
    --accent-purple: #7c3aed;
    --accent-amber: #f59e0b;
    --accent-green: #059669;
    
    --gradient-brand: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%);
    --gradient-hero: linear-gradient(135deg, rgba(245,158,11,0.08) 0%, rgba(217,119,6,0.1) 100%);
}

body.theme-light .dark-logo-brand { display: none !important; }
body.theme-light .light-logo-brand { display: flex !important; }
body.theme-dark .dark-logo-brand { display: flex !important; }
body.theme-dark .light-logo-brand { display: none !important; }

body.theme-light .site-header,
body.theme-light .category-nav {
    background: rgba(255, 255, 255, 0.9);
}

body.theme-light .site-footer {
    background: #e2e8f0;
    color: #475569;
}
body.theme-light .footer-brand,
body.theme-light .footer-links h4 {
    color: #0f172a;
}
body.theme-light .modal-card {
    background: #ffffff;
    color: #0f172a;
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* BACKGROUND NEON GLOWS */
.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: -1;
    opacity: 0.35;
}
.bg-glow-1 { top: -100px; left: -100px; width: 500px; height: 500px; background: radial-gradient(circle, var(--accent-cyan), transparent); }
.bg-glow-2 { top: 40%; right: -150px; width: 600px; height: 600px; background: radial-gradient(circle, var(--accent-purple), transparent); }
.bg-glow-3 { bottom: -100px; left: 20%; width: 550px; height: 550px; background: radial-gradient(circle, var(--accent-pink), transparent); }

/* GLASS PANEL UTILITY */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* HEADER */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(8, 9, 14, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 0.85rem 1.5rem;
}
.header-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

/* LOGO */
.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}
.logo-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: var(--gradient-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #fff;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
}
.monkey-logo-img {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.5);
}

.brand-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}
.brand-title .highlight {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.brand-title .highlight-amber {
    color: var(--accent-amber);
}
.brand-sub {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--accent-cyan);
    margin-top: -3px;
}
body.theme-light .brand-sub {
    color: var(--accent-amber);
}

/* THEME TOGGLE BUTTON */
.theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.95rem;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}
.theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent-cyan);
}

/* LIVE BADGE */
.live-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-full);
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-green);
    letter-spacing: 1px;
}
.live-badge .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--accent-green);
    box-shadow: 0 0 8px var(--accent-green);
    animation: pulse 1.8s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.2); }
}

/* SEARCH BOX */
.search-box {
    position: relative;
    flex: 1;
    max-width: 420px;
}
.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
}
.search-box input {
    width: 100%;
    padding: 0.65rem 2.5rem 0.65rem 2.5rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: 0.88rem;
    outline: none;
    transition: all 0.3s ease;
}
.search-box input:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
}
.clear-search-btn {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}

/* DISCORD BUTTON */
.discord-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.1rem;
    border-radius: var(--radius-full);
    background: #5865f2;
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.discord-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.4);
}

/* CATEGORY NAV */
.category-nav {
    background: rgba(12, 14, 22, 0.6);
    border-bottom: 1px solid var(--border-color);
    padding: 0.65rem 1.5rem;
    position: sticky;
    top: 65px;
    z-index: 90;
    backdrop-filter: blur(12px);
}
.category-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    overflow-x: auto;
    scrollbar-width: none;
}
.category-container::-webkit-scrollbar { display: none; }

.cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 1.1rem;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.25s ease;
}
.cat-pill:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.15);
}
.cat-pill.active {
    background: var(--gradient-brand);
    color: #fff;
    border-color: transparent;
    font-weight: 700;
    box-shadow: 0 2px 12px rgba(0, 240, 255, 0.3);
}

/* MAIN CONTAINER */
.main-content {
    max-width: 1280px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

/* HERO FEATURED CARD */
.hero-featured {
    margin-bottom: 2.5rem;
}
.hero-card {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    overflow: hidden;
    border: 1px solid rgba(0, 240, 255, 0.25);
    background: var(--gradient-hero);
    transition: box-shadow 0.3s ease;
}
.hero-card:hover {
    box-shadow: var(--shadow-glow);
}
.hero-image-wrapper {
    position: relative;
    min-height: 320px;
    overflow: hidden;
}
.hero-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.hero-card:hover .hero-image-wrapper img {
    transform: scale(1.04);
}
.hero-category-tag {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.35rem 0.85rem;
    background: var(--gradient-brand);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    border-radius: var(--radius-sm);
    letter-spacing: 1px;
}
.hero-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.hero-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}
.hero-source {
    color: var(--accent-cyan);
    font-weight: 600;
}
.hero-title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--text-primary);
}
.hero-summary {
    color: var(--text-secondary);
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 1.5rem;
}
.hero-actions {
    display: flex;
    gap: 0.85rem;
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all 0.25s ease;
}
.btn-primary {
    background: var(--gradient-brand);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 240, 255, 0.25);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 240, 255, 0.4);
}
.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

/* SECTION HEADER */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}
.section-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.highlight-icon {
    color: var(--accent-cyan);
}
.news-count {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* NEWS GRID */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

/* NEWS CARD */
.news-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}
.news-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 240, 255, 0.4);
    box-shadow: var(--shadow-glow);
}
.card-media {
    position: relative;
    height: 190px;
    overflow: hidden;
    background: #111422;
}
.card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.news-card:hover .card-media img {
    transform: scale(1.05);
}
.card-category {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.25rem 0.65rem;
    background: rgba(8, 9, 14, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 240, 255, 0.3);
    color: var(--accent-cyan);
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
}

.card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
}
.card-source {
    color: var(--accent-purple);
    font-weight: 600;
}
.card-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 0.65rem;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-summary {
    font-size: 0.86rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}
.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}
.read-more-link {
    color: var(--accent-cyan);
    font-size: 0.82rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.share-card-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    transition: color 0.2s ease;
}
.share-card-btn:hover {
    color: var(--accent-pink);
}

/* CARD DE RESUMO MDM (MODAL READER) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.modal-card {
    position: relative;
    width: 100%;
    max-width: 750px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    background: var(--bg-surface);
    border: 1px solid rgba(0, 240, 255, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    border-radius: var(--radius-lg);
}
.resumo-badge-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.82rem;
    margin-bottom: 0.85rem;
}
.resumo-box-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 240, 255, 0.1);
    border-left: 4px solid var(--accent-cyan);
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--accent-cyan);
    margin-bottom: 1.25rem;
}

.modal-close-btn {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.modal-close-btn:hover {
    background: var(--accent-pink);
    border-color: transparent;
}
.modal-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
}
.modal-image-wrapper {
    width: 100%;
    max-height: 350px;
    overflow: hidden;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}
.modal-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.modal-body {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}
.modal-body p {
    margin-bottom: 1rem;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
}

/* SKELETON LOADER */
.skeleton-card {
    height: 380px;
    background: linear-gradient(90deg, rgba(18,22,36,0.6) 25%, rgba(30,36,58,0.8) 50%, rgba(18,22,36,0.6) 75%);
    background-size: 200% 100%;
    animation: loadingShimmer 1.5s infinite;
}
@keyframes loadingShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* NO RESULTS */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    margin-bottom: 2.5rem;
}
.no-results-icon {
    font-size: 3.5rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}
.no-results h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

/* PAGINATION */
.pagination-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
}
.page-indicator {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* STATS BANNER */
.stats-banner {
    padding: 2rem;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, rgba(18,22,36,0.9) 0%, rgba(25,18,40,0.8) 100%);
    border: 1px solid rgba(139, 92, 246, 0.2);
}
body.theme-light .stats-banner {
    background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(245,246,252,0.9) 100%);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    text-align: center;
}
.stat-number {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}
.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.status-online {
    color: var(--accent-green);
}

/* TOAST NOTIFICATION */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 0.85rem 1.5rem;
    background: var(--gradient-brand);
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: var(--radius-md);
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    z-index: 2000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
}
.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* FOOTER */
.site-footer {
    background: #05060a;
    border-top: 1px solid var(--border-color);
    padding: 3rem 1.5rem 1.5rem;
    color: var(--text-muted);
}
.footer-container {
    max-width: 1280px;
    margin: 0 auto 2.5rem;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}
.footer-brand {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}
.footer-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    max-width: 450px;
}
.footer-links h4 {
    color: var(--text-primary);
    font-size: 0.95rem;
    margin-bottom: 0.85rem;
}
.footer-links ul {
    list-style: none;
}
.footer-links li {
    margin-bottom: 0.4rem;
}
.footer-links a {
    color: var(--text-secondary);
    font-size: 0.88rem;
    text-decoration: none;
    transition: color 0.2s ease;
}
.footer-links a:hover {
    color: var(--accent-cyan);
}
.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    text-align: center;
    font-size: 0.8rem;
}

/* RESPONSIVE MEDIA QUERIES */
@media (max-width: 1024px) {
    .news-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-card { grid-template-columns: 1fr; }
    .hero-image-wrapper { min-height: 240px; }
}
@media (max-width: 768px) {
    .header-container { flex-wrap: wrap; }
    .search-box { order: 3; max-width: 100%; width: 100%; margin-top: 0.5rem; }
    .news-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; }
    .footer-container { grid-template-columns: 1fr; gap: 2rem; }
}
