/* ==========================================
   1. COLOR VARIABLES (NEON CYBERPUNK EDITION)
   ========================================== */
:root {
    --md-bg: #FEF7FF;
    --md-surface: #F3EDF7;
    --md-surface-variant: #E7E0EC;
    --md-text: #1D1B20;
    --md-text-variant: #49454F;
    --md-primary: #6750A4;
    --md-on-primary: #FFFFFF;
    --md-primary-container: #EADDFF;
    --md-on-primary-container: #21005D;
    --md-outline: #79747E;
    --radius-card: 24px;
    --radius-pill: 50px;
    --bg-pattern: rgba(103, 80, 164, 0.08); 
}

/* DEEP DARK MODE with High-Contrast Neon Colors (Gaming/Hacker feel) */
body.dark-mode {
    --md-bg: #0A0A0C; /* DEEP PURE BLACK (High contrast start) */
    --md-surface: #121216; /* Dark slate (Melting with black) */
    --md-surface-variant: #212129; /* Darker variant */
    --md-text: #E6E0E9;
    --md-text-variant: #CAC4D0;
    
    /* NEON GLOW COLORS */
    --md-primary: #BC9CFF; /* Bright glowing neon purple */
    --md-on-primary: #0A0A0C; /* Deep black on bright colors */
    --md-primary-container: #21005D; /* Keep the Material base container */
    --md-on-primary-container: #BC9CFF; /* Neon purple on deep background */
    --md-outline: #938F99;
    
    /* Glowing Cyberpunk Dot Matrix color for Dark Mode */
    --bg-pattern: rgba(188, 156, 255, 0.08); 
}

/* ==========================================
   2. BASE STYLES (BODY)
   ========================================== */
body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--md-bg);
    
    /* Cyberpunk Dot Matrix Background with Parallax Effect */
    background-image: radial-gradient(var(--bg-pattern) 1.5px, transparent 1.5px);
    background-size: 25px 25px;
    background-attachment: fixed;
    
    color: var(--md-text);
    margin: 0;
    padding: 0;
    transition: background-color 0.3s, color 0.3s;
}

/* ==========================================
   3. HEADER & COSMIC CARD (GLITCH EDITION)
   ========================================== */
header {
    background-color: transparent;
    text-align: center;
    padding: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Main Card Container with Cosmic Gradient & Parallax */
.header-card-gradient {
    background: linear-gradient(to right, #6750A4, #00c6ff, #ff007f, #6750A4);
    background-size: 300% 100%;
    background-attachment: fixed;
    animation: gradientWalk 6s infinite linear;
    color: #FFFFFF;
    max-width: 800px;
    width: 100%;
    margin: 0 auto 15px;
    padding: 50px 30px; 
    border-radius: var(--radius-card);
    box-shadow: 0 10px 30px rgba(103, 80, 164, 0.3);
    transition: box-shadow 0.3s;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

body.dark-mode .header-card-gradient {
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

@keyframes gradientWalk {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

/* Main Title Container Styling */
.header-main-title {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 10px;
    flex-wrap: nowrap;
}

/* H1 Title (Solid White, Enlarged, and Ready for Glitch) */
.header-h1-solid {
    margin: 0;
    font-size: 3.8rem;
    font-weight: 700;
    color: #FFFFFF;
    -webkit-text-fill-color: initial;
    background: none;
    letter-spacing: 2px;
    position: relative; /* REQUIRED FOR GLITCH */
    cursor: crosshair; /* Hacker style mouse cursor on hover */
    display: inline-block;
}

/* ==========================================
   THE CYBERPUNK GLITCH EFFECT (TRIGGERED ON HOVER)
   ========================================== */
/* Pseudo-element 1: The Cyan Layer (Becomes magenta on glitch-hover) */
.header-h1-solid::before {
    content: attr(data-text); 
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    left: -2px; 
    text-shadow: 2px 0 #00c6ff, -2px 0 #ff007f; 
    color: #FFFFFF;
    background: none;
    clip-path: rect(44px, 450px, 56px, 0);
    opacity: 0; 
    transition: opacity 0.2s;
}

/* Pseudo-element 2: The Magenta Layer */
.header-h1-solid::after {
    content: attr(data-text); 
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    left: 2px;
    text-shadow: -2px 0 #ff007f, 2px 0 #00c6ff;
    color: #FFFFFF;
    background: none;
    clip-path: rect(44px, 450px, 56px, 0);
    opacity: 0; 
    transition: opacity 0.2s;
}

/* ACTIVATE GLITCH ON HOVER */
.header-h1-solid:hover::before {
    opacity: 1;
    animation: glitch-anim 0.3s infinite linear alternate-reverse;
}

.header-h1-solid:hover::after {
    opacity: 1;
    animation: glitch-anim-2 0.4s infinite linear alternate-reverse;
}

/* The glitch animations (Randomly clipping and shifting the text) */
@keyframes glitch-anim {
    0% { clip-path: inset(80% 0 0 0); }
    10% { clip-path: inset(10% 0 85% 0); }
    20% { clip-path: inset(55% 0 20% 0); }
    30% { clip-path: inset(15% 0 10% 0); }
    40% { clip-path: inset(90% 0 5% 0); }
    50% { clip-path: inset(35% 0 35% 0); }
    60% { clip-path: inset(0 0 70% 0); }
    70% { clip-path: inset(60% 0 5% 0); }
    80% { clip-path: inset(20% 0 60% 0); }
    90% { clip-path: inset(85% 0 5% 0); }
    100% { clip-path: inset(5% 0 90% 0); }
}

@keyframes glitch-anim-2 {
    0% { clip-path: inset(10% 0 85% 0); }
    10% { clip-path: inset(80% 0 0 0); }
    20% { clip-path: inset(15% 0 10% 0); }
    30% { clip-path: inset(55% 0 20% 0); }
    40% { clip-path: inset(35% 0 35% 0); }
    50% { clip-path: inset(90% 0 5% 0); }
    60% { clip-path: inset(60% 0 5% 0); }
    70% { clip-path: inset(0 0 70% 0); }
    80% { clip-path: inset(85% 0 5% 0); }
    90% { clip-path: inset(20% 0 60% 0); }
    100% { clip-path: inset(5% 0 90% 0); }
}

/* ==========================================
   LANGUAGE SWITCHER BUTTON
   ========================================== */
.btn-lang, .btn-clear {
    position: absolute;
    top: 25px;
    background-color: transparent;
    color: var(--md-text-variant);
    border: 1px solid var(--md-outline);
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    /* Smooth micro-animation */
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    z-index: 100;
}

/* Position specifics */
.btn-lang { right: 25px; }
.btn-clear { left: 25px; }

.btn-lang:hover, .btn-clear:hover {
    background-color: var(--md-primary-container);
    color: var(--md-on-primary-container);
    border-color: transparent;
    transform: translateY(-2px);
}

/* Neon glow in Dark Mode */
/* Neon glow in Dark Mode */
body.dark-mode .btn-lang:hover, 
body.dark-mode .btn-clear:hover {
    box-shadow: 0 4px 12px rgba(188, 156, 255, 0.3);
}

/* Auto-adjust position on small phone screens */
@media (max-width: 600px) {
    .btn-lang, .btn-clear {
        top: 15px;
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    .btn-lang { right: 15px; }
    .btn-clear { left: 15px; }
}

/* Logos & Subtitle */
.logo {
    width: 80px;
    height: auto;
    animation: floatAnim 3s ease-in-out infinite;
}

.custom-title-logo {
    height: 4.5rem;
    width: auto;
    vertical-align: middle;
    animation: floatAnim 3s ease-in-out infinite;
    animation-delay: 1.5s; 
}

@keyframes floatAnim {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-12px); } 
    100% { transform: translateY(0px); }
}

.subtitle {
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
    min-height: 24px;
    font-family: 'Roboto', sans-serif;
    font-size: 0.90rem; 
    line-height: 1.5;
    font-weight: 400;
}

.cursor {
    color: #FFFFFF;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Responsive adjustments for mobile screens */
@media (max-width: 600px) {
    .header-main-title { gap: 10px; }
    .header-h1-solid { font-size: 2.2rem; }
    .logo { width: 50px; }
    .custom-title-logo { height: 3rem; }
}

/* ==========================================
   4. ACTION & DONATION BUTTONS
   ========================================== */
.header-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.btn-action {
    background-color: var(--md-surface-variant);
    color: var(--md-text);
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    /* Smooth micro-animation curve */
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); 
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Icon default transition */
.btn-action i {
    transition: transform 0.3s ease; 
}

/* Lift up effect & shadow on hover */
.btn-action:hover {
    transform: translateY(-3px); 
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    filter: brightness(1.05);
}

/* Icon playful tilt on hover */
.btn-action:hover i {
    transform: scale(1.15) rotate(-5deg); 
}

.btn-action:active {
    transform: scale(0.92) translateY(2px) !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2) !important;
}

@keyframes themeSpin {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.4); }
    100% { transform: rotate(360deg) scale(1); }
}

.icon-spin {
    display: inline-block;
    animation: themeSpin 0.5s ease-in-out;
}

/* Neon glow for buttons in Dark Mode */
body.dark-mode .btn-action:hover {
    box-shadow: 0 6px 15px rgba(188, 156, 255, 0.25); 
}

.btn-donate {
    background-color: #FFD54F;
    color: #4E342E;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
    animation: heartbeat 2s infinite;
}

.btn-donate:hover {
    background-color: #FFCA28;
    color: #3E2723;
    animation: none;
    transform: scale(1.05);
}

body.dark-mode .btn-donate {
    background-color: #F6B26B;
    color: #121212;
}

@keyframes heartbeat {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 213, 79, 0.7); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(255, 213, 79, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 213, 79, 0); }
}

/* ==========================================
   5. BANNER & SEARCH
   ========================================== */
.disclaimer-banner {
    max-width: 650px;
    margin: 30px auto 0;
    padding: 12px 20px;
    background-color: #F9DEDC;
    color: #410E0B;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.disclaimer-banner p {
    margin: 0;
}

body.dark-mode .disclaimer-banner {
    background-color: #8C1D18;
    color: #F9DEDC;
}

.search-container {
    text-align: center;
    margin: 30px auto 20px;
    padding: 0 20px;
    max-width: 650px;
}

.search-box-cyber {
    position: relative;
    width: 100%;
    margin-bottom: 25px;
}

.search-container input {
    width: 100%;
    padding: 20px 25px 20px 60px;
    font-size: 1.05rem;
    letter-spacing: 0.5px;
    background-color: var(--md-surface-variant);
    color: var(--md-text);
    border: 2px solid rgba(188, 156, 255, 0.1);
    border-radius: var(--radius-pill);
    outline: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-sizing: border-box;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.search-box-cyber i {
    position: absolute;
    left: 25px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: var(--md-outline);
    transition: all 0.3s ease;
    pointer-events: none;
}

.search-box-cyber:hover input {
    border-color: rgba(188, 156, 255, 0.4);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.search-box-cyber input:focus {
    background-color: var(--md-surface);
    border-color: var(--md-primary);
    box-shadow: 0 0 25px rgba(188, 156, 255, 0.3), inset 0 0 10px rgba(188, 156, 255, 0.1);
    transform: scale(1.03);
}

.search-box-cyber input:focus + i {
    color: var(--md-primary);
    text-shadow: 0 0 15px var(--md-primary);
    transform: translateY(-50%) scale(1.1);
}

body.dark-mode .search-container input {
    background-color: rgba(18, 18, 22, 0.8);
    color: #00c6ff;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.15rem;
}

body.dark-mode .search-box-cyber input:focus {
    border-color: #00c6ff;
    box-shadow: 0 0 30px rgba(0, 198, 255, 0.3), inset 0 0 15px rgba(0, 198, 255, 0.2);
}

body.dark-mode .search-box-cyber input:focus + i {
    color: #00c6ff;
    text-shadow: 0 0 15px #00c6ff;
}

.filter-sort-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-filter {
    padding: 10px 20px;
    background-color: transparent;
    color: var(--md-text-variant);
    border: 1px solid var(--md-outline);
    border-radius: var(--radius-pill);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    /* Smooth micro-animation curve */
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn-filter.active, .btn-filter:hover {
    background-color: var(--md-primary-container);
    color: var(--md-on-primary-container);
    border-color: transparent;
    /* Lift effect */
    transform: translateY(-2px); 
}

/* Neon glow for active/hovered filters in Dark Mode */
body.dark-mode .btn-filter.active, body.dark-mode .btn-filter:hover {
    box-shadow: 0 4px 12px rgba(188, 156, 255, 0.3); 
}

.sort-dropdown {
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    background-color: var(--md-surface);
    color: var(--md-text);
    border: 1px solid var(--md-outline);
    outline: none;
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
}

/* ==========================================
   6. ROM & KERNEL CARDS
   ========================================== */
.container {
    max-width: 1000px;
    margin: 10px auto 25px; 
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;

    align-items: start; 
}

/* ==========================================
   CARD WITH EDGE LASER EFFECT (CYBERPUNK)
   ========================================== */
.card {
    background-color: transparent;
    border-radius: var(--radius-card);
    padding: 24px;
    border: none;
    /* Bouncy spring transition for depth */
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
    position: relative;
    overflow: hidden; 
    z-index: 1; 
}

/* Lift higher and slightly scale up on hover */
.card:hover {
    transform: translateY(-8px) scale(1.02);
}

.card::after {
    content: '';
    position: absolute;
    inset: 3px; 
    background-color: var(--md-surface); 
    border-radius: calc(var(--radius-card) - 3px);
    z-index: -1; 
    transition: background-color 0.3s;
}

.card:hover::after {
    background-color: var(--md-surface-variant);
}

.card::before {
    content: '';
    position: absolute;
    width: 200%; 
    height: 200%;
    top: -50%;
    left: -50%;
    background: conic-gradient(from 0deg, transparent 70%, #00c6ff 80%, var(--md-primary) 100%);
    animation: spinLaser 3s linear infinite; 
    z-index: -2; 
    opacity: 0; 
    transition: opacity 0.4s ease;
}

.card:hover::before {
    opacity: 1;
}

@keyframes spinLaser {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.card h2 {
    margin-top: 5px;
    color: var(--md-text);
    font-size: 1.4rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

/* Badge Base */
.badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 10px;
}

/* Light Mode Badges */
.badge-rom { background-color: #C4EED0; color: #072711; }
.badge-kernel { background-color: #FFDCC3; color: #2E1500; }

/* Glowing Neon Badges for Dark Mode */
body.dark-mode .badge-rom { 
    background-color: #00FF33; 
    color: #0A0A0C; 
    box-shadow: 0 0 10px rgba(0, 255, 51, 0.4); 
}
body.dark-mode .badge-kernel { 
    background-color: #FF9900; 
    color: #0A0A0C; 
    box-shadow: 0 0 10px rgba(255, 153, 0, 0.4); 
}

.spec-container {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.spec-badge {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.spec-green { background-color: #C4EED0; color: #072711; }
.spec-red { background-color: #F9DEDC; color: #410E0B; }
.spec-grey { background-color: #E0E0E0; color: #424242; }

body.dark-mode .spec-green { background-color: #0F5223; color: #C4EED0; }
body.dark-mode .spec-red { background-color: #8C1D18; color: #F9DEDC; }
body.dark-mode .spec-grey { background-color: #424242; color: #E0E0E0; }

.detail-item {
    display: flex;
    justify-content: space-between;
    margin: 12px 0;
    font-size: 0.95rem;
    color: var(--md-text-variant);
}

.detail-item strong {
    color: var(--md-text);
    text-align: right;
    max-width: 65%;
    word-wrap: break-word;
}

.action-text {
    color: var(--md-primary);
    cursor: pointer;
    font-weight: bold;
    transition: color 0.3s;
    user-select: none;
}

.action-text:hover {
    text-decoration: underline;
}

.changelog-content {
    display: none;
    background-color: var(--md-surface-variant);
    padding: 15px;
    border-radius: 16px;
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--md-text-variant);
    animation: fadeIn 0.3s ease-in-out;
}

.changelog-content ul {
    margin: 0;
    padding-left: 20px;
}

.changelog-content li {
    margin-bottom: 5px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.card-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

.btn-download {
    flex: 2;
    text-align: center;
    background-color: var(--md-primary);
    color: var(--md-on-primary);
    text-decoration: none;
    padding: 12px 15px;
    border-radius: var(--radius-pill);
    font-weight: 500;
    transition: opacity 0.2s;
}

.btn-download:hover {
    opacity: 0.9;
}

.btn-share {
    flex: 1;
    background-color: transparent;
    color: var(--md-primary);
    border: 1px solid var(--md-outline);
    border-radius: var(--radius-pill);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-share:hover {
    background-color: var(--md-surface-variant);
}

.no-results {
    text-align: center;
    padding: 50px 20px;
    color: var(--md-text-variant);
    font-size: 1.2rem;
    grid-column: 1 / -1;
}

/* ==========================================
   7. SKELETON LOADING & SPINNER
   ========================================== */
.skeleton-card {
    background-color: var(--md-surface);
    border-radius: var(--radius-card);
    padding: 24px;
    height: 250px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.skeleton-line {
    background: linear-gradient(90deg, var(--md-surface-variant) 25%, var(--md-surface) 50%, var(--md-surface-variant) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
    border-radius: 8px;
}

.skeleton-badge { width: 60px; height: 24px; border-radius: 8px; }
.skeleton-title { width: 70%; height: 30px; }
.skeleton-text { width: 100%; height: 16px; }
.skeleton-text.short { width: 50%; }

@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.load-more-container {
    text-align: center;
    margin-bottom: 20px;
}

.load-more-container .btn-action i {
    transition: transform 0.4s ease;
}

.load-more-container .btn-action:hover i {
    transform: rotate(180deg);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--md-surface-variant);
    border-top: 4px solid var(--md-primary);
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================
   8. NOTIFICATIONS & MODAL POPUP
   ========================================== */
.toast {
    visibility: hidden;
    min-width: 250px;
    background-color: #323232;
    color: #fff;
    text-align: center;
    border-radius: var(--radius-pill);
    padding: 16px;
    position: fixed;
    z-index: 2000;
    left: 50%;
    bottom: 30px;
    font-size: 0.95rem;
    transform: translateX(-50%);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.toast.show {
    visibility: visible;
    animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

@keyframes fadein {
    from { bottom: 0; opacity: 0; }
    to { bottom: 30px; opacity: 1; }
}

@keyframes fadeout {
    from { bottom: 30px; opacity: 1; }
    to { bottom: 0; opacity: 0; }
}

.modal-overlay {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: var(--md-surface);
    margin: 15% auto;
    padding: 24px;
    border-radius: var(--radius-card);
    width: 80%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--md-outline);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--md-text);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--md-text-variant);
    cursor: pointer;
}

.modal-body p {
    margin-top: 0;
    color: #B3261E;
}

body.dark-mode .modal-body p {
    color: #F2B8B5;
}

.modal-body ol {
    padding-left: 20px;
    color: var(--md-text);
}

.modal-body li {
    margin-bottom: 10px;
}

/* Developer Profile Modal */
.text-center {
    text-align: center;
}

.dev-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid var(--md-primary);
    margin-bottom: 15px;
    object-fit: cover;
    padding: 5px;
}

.dev-name {
    margin: 0;
    color: var(--md-text);
    font-size: 1.6rem;
}

.dev-role {
    color: var(--md-primary);
    font-weight: bold;
    margin-top: 5px;
    font-size: 0.95rem;
}

.dev-bio {
    color: var(--md-text-variant);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 15px 0;
}

.dev-skills {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.skill-badge {
    background-color: var(--md-primary-container);
    color: var(--md-on-primary-container);
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: bold;
}

/* ==========================================
   9. ADS & TELEGRAM COMMENTS
   ========================================== */
.ad-container {
    text-align: center;
    margin: 15px auto; 
    max-width: 800px;
    padding: 10px;
    background-color: transparent;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ad-label {
    display: block;
    font-size: 0.7rem;
    color: var(--md-outline);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.ad-container iframe,
.ad-container img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.comments-container {
    max-width: 800px;
    margin: 20px auto 40px; 
    padding: 30px;
    background-color: var(--md-surface);
    border-radius: var(--radius-card);
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.comments-container h2 {
    color: var(--md-text);
    font-size: 1.8rem;
    margin-top: 0;
    margin-bottom: 10px;
}

.comments-container p {
    color: var(--md-text-variant);
    margin-bottom: 30px;
}

/* ==========================================
   10. FOOTER & FLOATING ACTION BUTTONS (FAB)
   ========================================== */
footer {
    background-color: transparent;
    color: var(--md-text-variant);
    text-align: center;
    padding: 40px 20px;
    margin-top: 50px;
}

.social-links {
    margin-top: 20px;
}

.social-links a {
    text-decoration: none;
    margin: 0 15px;
    font-size: 1.1rem;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--md-text-variant);
    transition: color 0.3s, transform 0.3s;
}

.social-links a:hover {
    transform: scale(1.1);
}

.icon-about { color: var(--md-primary); }
.icon-telegram { color: #24A1DE; }
.icon-github { color: #24292e; }
body.dark-mode .icon-github { color: #ffffff; }

#btnScrollTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--md-primary-container);
    color: var(--md-on-primary-container);
    border: none;
    border-radius: 16px;
    width: 56px;
    height: 56px;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
    z-index: 1000;
}

#btnScrollTop.show {
    opacity: 1;
    pointer-events: auto;
}

#btnScrollTop:hover {
    filter: brightness(0.95);
    transform: translateY(-3px);
}

.fab-community {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background-color: var(--md-primary);
    color: var(--md-on-primary);
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    text-decoration: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
    z-index: 1000;
}

.fab-community:hover {
    transform: translateY(-5px) scale(1.05);
    filter: brightness(1.1);
}

/* ==========================================
   11. CYBER-MATRIX SCANLINES (SUPER LIGHTWEIGHT)
   ========================================== */

/* 1. Base Kartu: Border neon yang halus */
.card.cyber-matrix {
    background-color: transparent !important;
    border: 1px solid rgba(188, 156, 255, 0.1);
}

/* 2. Permukaan Dalam: Pola Garis CRT/Terminal (Sangat Ringan) */
.card.cyber-matrix::after {
    content: '';
    position: absolute;
    inset: 3px; 
    background-color: var(--md-surface);
    
    /* DITINGKATKAN: Opacity dinaikkan dari 3% menjadi 15% (0.15) agar garis lebih tegas */
    background-image: repeating-linear-gradient(
        transparent 0px,
        transparent 2px,
        rgba(188, 156, 255, 0.15) 3px,
        rgba(188, 156, 255, 0.15) 4px
    );
    border-radius: calc(var(--radius-card) - 3px);
    z-index: -1;
    transition: background-color 0.3s ease, background-image 0.3s ease;
}

/* 3. Reaksi saat di-hover: Scanline berubah warna jadi Cyan */
.card.cyber-matrix:hover::after {
    background-color: var(--md-surface-variant);
    
    /* DITINGKATKAN: Opacity Cyan dinaikkan menjadi 25% (0.25) agar menyala terang saat disentuh */
    background-image: repeating-linear-gradient(
        transparent 0px,
        transparent 2px,
        rgba(0, 198, 255, 0.25) 3px,
        rgba(0, 198, 255, 0.25) 4px
    );
}
