/* attest.ink - Professional Pixel Art Aesthetic */

@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

/* Default to light mode */
:root {
    --pixel-primary: #2563eb;
    --pixel-secondary: #dc2626;
    --pixel-accent: #f59e0b;
    --pixel-purple: #9333ea;
    --bg-main: #ffffff;
    --bg-secondary: #f3f4f6;
    --bg-panel: #f9fafb;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --border-color: #e5e7eb;
    --border-dark: #d1d5db;
    --shadow: rgba(0, 0, 0, 0.1);
    --max-width: 800px;
}

/* Dark mode */
[data-theme="dark"] {
    --pixel-primary: #60a5fa;
    --pixel-secondary: #f87171;
    --pixel-accent: #fbbf24;
    --pixel-purple: #a78bfa;
    --bg-main: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-panel: #2a2a2a;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    --border-color: #374151;
    --border-dark: #4b5563;
    --shadow: rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

body {
    font-family: 'VT323', monospace;
    font-size: 20px;
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.4;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
    /* Ensure proper layout flow */
    display: flex;
    flex-direction: column;
}

/* CRT Effect - subtle scanlines for dark mode only */
[data-theme="dark"] body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.05),
        rgba(0, 0, 0, 0.05) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 1000;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 16px;
    position: relative;
    /* Ensure container grows to push footer down */
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    background: var(--bg-panel);
    border: 2px solid var(--border-color);
    padding: 8px 16px;
    cursor: pointer;
    font-size: 20px;
    font-family: 'VT323', monospace;
    font-weight: bold;
    transition: all 0.2s;
    min-width: 50px;
    text-align: center;
}

.theme-toggle:hover {
    border-color: var(--pixel-primary);
    transform: scale(1.1);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: normal;
    text-transform: uppercase;
    margin: 16px 0;
}

h1 {
    font-size: 48px;
    color: var(--pixel-primary);
    letter-spacing: 2px;
}

h2 {
    font-size: 32px;
    color: var(--pixel-accent);
    margin: 32px 0 16px;
}

h3 {
    font-size: 24px;
    color: var(--pixel-secondary);
}

p {
    margin: 16px 0;
    color: var(--text-secondary);
}

a {
    color: var(--pixel-primary);
    text-decoration: none;
    position: relative;
    display: inline-block;
}

a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--pixel-primary);
    transform: scaleX(0);
    transition: transform 0.2s;
}

a:hover::after {
    transform: scaleX(1);
}

a:hover {
    color: var(--pixel-accent);
}


/* Navigation */
nav {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    margin: 16px 0;
    position: relative;
}


nav::before,
nav::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--pixel-accent);
}

nav::before {
    top: -5px;
    left: -5px;
}

nav::after {
    bottom: -5px;
    right: -5px;
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    flex-wrap: wrap;
    gap: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 28px;
    color: var(--pixel-primary);
}

.logo img {
    width: 40px;
    height: 40px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 0;
    margin: 0;
}

nav a {
    display: block;
    padding: 8px 16px;
    color: var(--text-primary);
    border-left: 2px solid var(--border-color);
    transition: all 0.1s;
}

nav li:first-child a {
    border-left: none;
}

/* Logo should never have border */
.logo {
    border: none !important;
}

/* Dropdown toggle should also have border on desktop */
.dropdown-toggle {
    border-left: 2px solid var(--border-color);
}

nav a:hover,
nav a.active {
    background: var(--pixel-primary);
    color: var(--bg-main);
}

nav a::after {
    display: none;
}

/* Dropdown Navigation */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    /* Better touch interaction */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.dropdown-toggle:hover {
    background: var(--pixel-primary);
    color: var(--bg-main);
}

.dropdown-toggle::after {
    content: '▼';
    font-size: 10px;
    opacity: 0.7;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 150px;
    background: var(--bg-panel);
    border: 2px solid var(--border-color);
    z-index: 1000;
    margin-top: -2px;
}

/* Touch-friendly dropdown activation */
@media (hover: none) and (pointer: coarse) {
    .dropdown-toggle {
        position: relative;
    }
    
    .dropdown-toggle::before {
        content: '';
        position: absolute;
        top: -10px;
        left: -10px;
        right: -10px;
        bottom: -10px;
    }
}

.dropdown:hover .dropdown-menu,
.dropdown-menu:hover {
    display: block;
}

/* Mobile dropdown toggle */
@media (max-width: 768px) {
    .dropdown.active .dropdown-menu {
        display: block;
    }
}

.dropdown-menu a {
    display: block;
    padding: 8px 16px;
    color: var(--text-primary);
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

.dropdown-menu a:hover {
    background: var(--pixel-primary);
    color: var(--bg-main);
}

/* Main Content */
main {
    padding: 32px 0;
    /* Make main grow to push footer down */
    flex: 1;
}

/* Pixel Panels */
.section,
.terminal {
    background: var(--bg-panel);
    border: 2px solid var(--border-color);
    padding: 24px;
    margin: 24px 0;
    position: relative;
}

.section::before {
    content: '▪▪▪';
    position: absolute;
    top: -12px;
    left: 16px;
    background: var(--bg-panel);
    color: var(--pixel-accent);
    padding: 0 8px;
    font-size: 16px;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 48px 0;
    margin-bottom: 32px;
}

.hero h1 {
    font-size: clamp(40px, 8vw, 64px);
    margin-bottom: 24px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.hero p {
    font-size: 24px;
    color: var(--text-secondary);
}

/* Pixel Art Elements */
.pixel-box {
    position: relative;
    display: inline-block;
    padding: 16px 24px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    margin: 16px 8px;
}

.pixel-box::before,
.pixel-box::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--pixel-accent);
}

.pixel-box::before {
    top: -3px;
    left: -3px;
}

.pixel-box::after {
    bottom: -3px;
    right: -3px;
}

/* Forms */
.form-group {
    margin-bottom: 24px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: var(--pixel-accent);
    font-size: 20px;
}

input[type="text"],
input[type="url"],
input[type="email"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 8px;
    background: var(--bg-main);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    font-family: 'VT323', monospace;
    font-size: 20px;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--pixel-primary);
    box-shadow: 0 0 0 2px var(--pixel-primary);
}

/* BUTTONS - Complete redesign for consistency */

/* Base button styles - applies to ALL buttons and button-like links */
button:not(.theme-toggle),
.btn,
a.btn {
    /* Layout */
    display: inline-block;
    padding: 12px 24px;
    margin: 4px;
    
    /* Typography */
    font-family: 'VT323', monospace;
    font-size: 20px;
    text-transform: uppercase;
    text-decoration: none;
    text-align: center;
    
    /* Visual */
    border: 2px solid var(--pixel-primary);
    background-color: var(--pixel-primary);
    color: #ffffff;
    
    /* Interaction */
    cursor: pointer;
    transition: all 0.1s ease;
    
    /* Shadow effect */
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.3);
}

/* Primary button hover state */
button:not(.theme-toggle):hover,
.btn:not(.btn-secondary):hover,
a.btn:not(.btn-secondary):hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
    background-color: var(--pixel-primary);
    color: #ffffff;
}

/* Primary button active state */
button:not(.theme-toggle):active,
.btn:not(.btn-secondary):active,
a.btn:not(.btn-secondary):active {
    transform: translate(4px, 4px);
    box-shadow: none;
}

/* Secondary button variant */
.btn-secondary,
a.btn-secondary,
button.btn-secondary {
    border: 2px solid var(--pixel-secondary);
    background-color: var(--bg-main);
    color: var(--pixel-secondary);
    box-shadow: 4px 4px 0 var(--pixel-secondary);
}

/* Secondary button hover */
.btn-secondary:hover,
a.btn-secondary:hover,
button.btn-secondary:hover {
    background-color: var(--pixel-secondary);
    color: #ffffff;
    border-color: var(--pixel-secondary);
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 var(--pixel-secondary);
}

/* Secondary button active */
.btn-secondary:active,
a.btn-secondary:active,
button.btn-secondary:active {
    transform: translate(4px, 4px);
    box-shadow: none;
}

/* Special case: wallet button */
#connect-wallet {
    border: 2px solid var(--pixel-primary);
    background-color: var(--bg-main);
    color: var(--text-primary);
}

#connect-wallet:hover {
    background-color: var(--pixel-primary);
    color: #ffffff;
}

#connect-wallet:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Remove any conflicting link styles for buttons */
a.btn::after {
    display: none;
}

/* Wallet status text */
#wallet-status {
    color: var(--text-secondary);
    margin-top: 10px;
}

/* Code blocks */
pre {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    padding: 16px;
    overflow-x: auto;
    margin: 16px 0;
    color: var(--pixel-primary);
    font-size: 18px;
}

code {
    color: var(--pixel-accent);
    padding: 2px 4px;
}

/* Lists */
ul, ol {
    margin: 16px 0;
    padding-left: 32px;
}

li {
    margin: 8px 0;
    color: var(--text-secondary);
}

li::marker {
    color: var(--pixel-primary);
}

/* Messages */
.message {
    padding: 16px;
    margin: 16px 0;
    border: 2px solid;
    position: relative;
}

.message::before {
    content: '!';
    position: absolute;
    top: -8px;
    left: 16px;
    background: var(--bg-panel);
    padding: 0 8px;
    font-size: 24px;
}

.message-success {
    border-color: var(--pixel-primary);
    color: var(--pixel-primary);
}

.message-error {
    border-color: var(--pixel-secondary);
    color: var(--pixel-secondary);
}

.message-info {
    border-color: var(--pixel-accent);
    color: var(--pixel-accent);
}

/* Status */
.status-valid { color: var(--pixel-primary); }
.status-invalid { color: var(--pixel-secondary); }
.status-pending { color: var(--pixel-accent); }

/* Badge Grid */
.badge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
    margin: 24px 0;
    align-items: center;
    justify-items: center;
}

.ai-badge {
    cursor: pointer;
    transition: all 0.1s;
    filter: none;
    width: 100%;
    max-width: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ai-badge svg {
    width: 100%;
    height: auto;
}

.ai-badge:hover {
    transform: scale(1.1) rotate(-5deg);
}


/* Footer */
footer {
    margin-top: auto; /* Push footer to bottom */
    padding: 32px 0;
    border-top: 2px dashed var(--border-color);
    color: var(--text-muted);
    /* Ensure footer is always visible and properly positioned */
    width: 100%;
    position: relative;
    clear: both;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 32px;
    margin-bottom: 32px;
}

.footer-brand {
    flex: 1;
    min-width: 250px;
}

.footer-brand .logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 24px;
    color: var(--pixel-primary);
    margin-bottom: 8px;
}

.footer-brand .logo img {
    width: 32px;
    height: 32px;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 18px;
    margin: 0;
}

.footer-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    align-items: center;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 18px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--pixel-primary);
}

.footer-links a::after {
    display: none;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.footer-bottom p {
    margin: 0;
    color: var(--text-secondary);
}

.ai-attestation-badge {
    display: inline-flex;
    align-items: center;
    transition: transform 0.2s;
}

.ai-attestation-badge:hover {
    transform: scale(1.05);
}

.ai-attestation-badge::after {
    display: none;
}

/* Details */
details {
    margin: 16px 0;
}

summary {
    cursor: pointer;
    color: var(--pixel-primary);
    font-size: 20px;
}

/* Utility */
.text-center { text-align: center; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.hidden { display: none; }

/* Mobile/Desktop specific content */
.mobile-only { display: none; }
.desktop-only { display: inline; }

@media (max-width: 768px) {
    .mobile-only { display: inline; }
    .desktop-only { display: none; }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: var(--pixel-primary);
    color: #fff;
    border: 2px solid var(--border-color);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    z-index: 999;
    transition: all 0.2s;
    text-decoration: none;
    font-family: Arial, sans-serif;
}

.back-to-top:hover {
    background: var(--pixel-secondary);
    transform: translateY(-2px);
}

.back-to-top:active {
    transform: translateY(0);
}

.back-to-top.show {
    display: flex;
}

/* Arrow is now added via JavaScript innerHTML */

/* Mobile Responsive - Much improved */
@media (max-width: 768px) {
    body {
        font-size: 18px;
    }
    
    /* Back to top button mobile adjustments */
    .back-to-top {
        bottom: 15px;
        right: 15px;
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
    
    /* Adjust spacing for hero buttons on mobile */
    .hero + .text-center {
        margin-top: 0;
        margin-bottom: 24px;
    }
    
    .theme-toggle {
        top: 10px;
        right: 10px;
        padding: 4px;
        font-size: 16px;
        width: 40px; /* Larger touch target */
        height: 40px; /* Larger touch target */
        min-width: unset;
        display: flex;
        align-items: center;
        justify-content: center;
        /* Ensure it doesn't overlap navigation */
        z-index: 1002;
    }
    
    h1 {
        font-size: 32px;
    }
    
    h2 {
        font-size: 24px;
    }
    
    h3 {
        font-size: 20px;
    }
    
    .hero {
        padding: 32px 0 24px 0;
        margin-bottom: 16px;
    }
    
    .hero h1 {
        font-size: 36px;
    }
    
    .hero p {
        font-size: 20px;
    }
    
    .nav-inner {
        flex-direction: column;
        gap: 12px;
        padding: 12px 8px;
        justify-content: center;
        align-items: center;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
        gap: 0;
        margin: 0;
    }
    
    nav li {
        flex: 0 0 auto;
        margin: 0;
    }
    
    nav a,
    .dropdown-toggle {
        padding: 8px 12px;
        font-size: 14px;
        border: none !important; /* Remove all borders on mobile */
        display: block;
        /* Better touch interaction */
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    /* Remove all borders from logo */
    .logo,
    .logo:hover {
        border: none !important;
        background: none !important;
    }
    
    .dropdown-toggle {
        justify-content: space-between;
    }
    
    .dropdown-toggle::after {
        margin-left: 4px;
    }
    
    /* Dropdown menu mobile fixes */
    .dropdown {
        position: relative;
        flex: 0 0 auto;
    }
    
    .dropdown-menu {
        position: absolute;
        top: 100%;
        right: 0;
        left: auto;
        min-width: 150px;
        margin-top: 2px;
        background: var(--bg-panel);
        border: 2px solid var(--border-color);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        z-index: 1000;
    }
    
    .dropdown-menu a {
        padding: 8px 12px;
        font-size: 14px;
        border-bottom: 1px solid var(--border-color);
    }
    
    .dropdown-menu a:last-child {
        border-bottom: none;
    }
    
    .dropdown-toggle {
        display: flex;
        align-items: center;
        padding: 8px 12px;
        font-size: 16px;
        border-left: 1px solid var(--border-color);
        text-decoration: none;
        color: var(--text-primary);
        cursor: pointer;
        /* Better touch interaction */
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    .dropdown-toggle:hover {
        background: var(--pixel-primary);
        color: var(--bg-main);
    }
    
    .dropdown-toggle::after {
        content: '▼';
        font-size: 10px;
        opacity: 0.7;
        margin-left: 4px;
    }
    
    .logo {
        font-size: 22px;
        margin-bottom: 8px;
    }
    
    .logo img {
        width: 32px;
        height: 32px;
    }
    
    button:not(.theme-toggle),
    .btn,
    a.btn {
        font-size: 18px;
        padding: 12px 24px;
        max-width: 300px;
        margin: 8px auto;
        display: block;
    }
    
    /* Better spacing for button containers */
    .text-center .btn {
        margin: 8px auto;
    }
    
    .text-center .btn:first-child {
        margin-top: 0;
    }
    
    .text-center .btn:last-child {
        margin-bottom: 0;
    }
    
    .container {
        padding: 0;
        margin: 0;
        max-width: 100%;
    }
    
    main {
        padding: 16px 8px;
    }
    
    .section,
    .terminal,
    .game-card {
        padding: 16px;
        margin: 16px 8px;
        border-left: none;
        border-right: none;
        border-radius: 0;
    }
    
    .badge-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .pixel-box {
        margin: 8px 0;
        display: block;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    /* URL import mobile fix - Stack input and button */
    .import-url-container {
        flex-direction: column !important;
        align-items: center !important;
    }
    
    .import-url-container input[type="url"] {
        width: 100% !important;
        margin-bottom: 10px;
    }
    
    .import-url-container button {
        width: auto !important;
        max-width: 300px !important;
        margin: 0 auto !important;
        display: block !important;
    }
    
    input[type="text"],
    input[type="url"],
    input[type="email"],
    input[type="password"],
    textarea,
    select {
        font-size: 16px;
        padding: 10px;
    }
    
    pre {
        font-size: 14px;
        padding: 12px;
    }
    
    .level-badge {
        position: static;
        display: inline-block;
        margin-bottom: 8px;
    }
    
    /* Examples page mobile styles */
    .example-container {
        margin: 20px 0;
    }
    
    .example-header {
        padding: 12px 16px;
    }
    
    .example-content {
        padding: 16px;
    }
    
    .blog-title {
        font-size: 28px;
    }
    
    .blog-content {
        font-size: 16px;
    }
    
    .author-bio {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    /* Developers page mobile styles */
    .api-table {
        font-size: 14px;
        display: block;
        overflow-x: auto;
    }
    
    .api-table th,
    .api-table td {
        padding: 8px;
        min-width: 100px;
    }
    
    .code-example {
        font-size: 14px;
        padding: 12px;
    }
    
    .toc {
        padding: 16px;
    }
    
    /* Badge examples mobile */
    .badge-examples {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    /* Stats grid mobile */
    .stats-grid {
        gap: 12px;
    }
    
    .stat-box {
        padding: 12px;
    }
    
    .stat-number {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .badge-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
    
    nav ul {
        gap: 0;
    }
    
    nav a,
    .dropdown-toggle {
        padding: 6px 8px;
        font-size: 13px;
    }
    
    .logo {
        font-size: 20px;
    }
    
    .logo img {
        width: 30px;
        height: 30px;
    }
    
    .logo span {
        display: none;  /* Hide text on very small screens */
    }
    
    /* Footer mobile styles */
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 24px;
    }
    
    .footer-brand {
        min-width: 100%;
    }
    
    .footer-brand .logo {
        justify-content: center;
    }
    
    .footer-links {
        justify-content: center;
        gap: 16px;
        font-size: 16px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
}

/* Dark mode improvements for badges and LaTeX */
[data-theme="dark"] .ai-badge svg {
    filter: brightness(1.2);
}

[data-theme="dark"] .badge-glass {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .badge-glass-primary {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.3), rgba(96, 165, 250, 0.2));
    border-color: rgba(96, 165, 250, 0.4);
}

[data-theme="dark"] #badge-preview {
    background: var(--bg-panel);
    border: 2px solid var(--border-color);
    padding: 20px;
    border-radius: 4px;
}

[data-theme="dark"] #latex-code,
[data-theme="dark"] #latex-extended {
    background: var(--bg-panel);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] #badge-style-preview {
    background: var(--bg-panel);
    border-color: var(--border-dark);
}

/* LaTeX preview in dark mode */
[data-theme="dark"] #badge-preview > div[style*="monospace"] {
    background: var(--bg-panel) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}