:root {
    --bg-main: radial-gradient(circle at top, #111 0%, #000 60%);
    --text-main: #fff;
    --header-bg: #0f0f0f;
    --border-main: #222;
    --tile-bg: #111;
    --tile-border: #2f2f2f;
    --tile-hover-bg: #161616;
    --section-bg: #0b0b0b;
    --muted-text: #aaa;
    --subtext: #8a8a8a;
    --accent: #4da3ff;
    --badge-bg: #0f0f0f;
}

/* LIGHT MODE */
body[data-theme="light"] {
    --bg-main: #f4f6f9;
    --text-main: #111;
    --header-bg: #ffffff;
    --border-main: #ddd;
    --tile-bg: #ffffff;
    --tile-border: #ddd;
    --tile-hover-bg: #f0f4ff;
    --section-bg: #ffffff;
    --muted-text: #555;
    --subtext: #666;
    --accent: #2a6cff;
    --badge-bg: #f1f1f1;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 40px 0;
}

.wrapper {
    width: 92%;
    max-width: 720px;
}

/* HEADER */
.header {
    background: var(--header-bg);
    border: 1px solid var(--border-main);
    border-radius: 14px;
    padding: 25px;
    text-align: center;
    margin-bottom: 15px;
}

.header h1 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.header p {
    font-size: 0.9rem;
    color: var(--muted-text);
    line-height: 1.5;
}

.header-badge-link {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 10px;
    font-size: 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: inherit;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    opacity: 0.75;
    transition: all 0.2s ease;
}

.header-badge-link:hover {
    opacity: 1;
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.12);
}

/* CONTROLS */
.controls {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 10px;
}

.controls button {
    background: var(--tile-bg);
    border: 1px solid var(--tile-border);
    color: var(--muted-text);
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: 0.2s;
}

.controls button:hover {
    border-color: var(--accent);
    color: var(--text-main);
}

/* SECTION */
details.section {
    margin-top: 25px;
    border: 1px solid var(--border-main);
    border-radius: 12px;
    background: var(--section-bg);
    padding: 10px 14px;
}

summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
}

summary::-webkit-details-marker {
    display: none;
}

summary h3 {
    font-size: 0.95rem;
    color: var(--muted-text);
    margin: 10px 0;
    letter-spacing: 0.5px;
}

.summary-icon {
    transition: transform 0.25s ease;
    color: var(--muted-text);
    font-size: 0.9rem;
}

details[open] .summary-icon {
    transform: rotate(90deg);
}

/* ANIMATION */
details .container {
    margin-top: 12px;
    animation: fadeIn 0.2s ease;
}

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

/* GRID */
.container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

/* TILE */
.tile {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 130px;
    background: var(--tile-bg);
    border-radius: 12px;
    padding: 18px;
    text-align: center;
    text-decoration: none;
    border: 1px solid var(--tile-border);
    transition: 0.2s ease;
    cursor: pointer;
    color: var(--text-main);
    position: relative;
}

.tile:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    background: var(--tile-hover-bg);
}

.tile h2 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--accent) !important;
}

.subtext {
    margin-top: 6px;
    font-size: 0.72rem;
    color: var(--subtext);
    line-height: 1.3;
}

/* DISABLED TILE */
.tile.disabled {
    opacity: 0.55;
    cursor: default;
    background: var(--tile-bg);
}

.tile.disabled:hover {
    transform: none;
}

.tile.disabled::after {
    content: "🔒";
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.9rem;
    opacity: 0.75;
}

/* SERIES */
.series-tile summary {
    list-style: none;
    cursor: pointer;
}

.series-tile summary::-webkit-details-marker {
    display: none;
}

.series-links {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.series-link {
    display: block;
    padding: 10px;
    background: var(--tile-bg);
    border: 1px solid var(--tile-border);
    border-radius: 10px;
    color: var(--accent);
    text-decoration: none;
    font-size: 0.85rem;
    transition: 0.2s ease;
}

.series-link:hover {
    border-color: var(--accent);
    background: var(--tile-hover-bg);
    transform: translateY(-2px);
}

/* FOOTER */
.footer {
    margin-top: 40px;
    text-align: center;
    padding: 20px 10px;
    border-top: 1px solid var(--border-main);
}

.footer-badges {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.badge {
    font-size: 0.65rem;
    color: var(--muted-text);
    border: 1px solid var(--tile-border);
    padding: 4px 8px;
    border-radius: 20px;
    background: var(--badge-bg);
}

.footer-text {
    font-size: 0.7rem;
    color: var(--subtext);
    line-height: 1.6;
}

/* FOOTER DONATION BUTTON */
.footer-donation {
    margin-top: 15px;
    font-size: 0.9rem;
    color: var(--muted-text);
    text-align: center;
}

.bitcoin-donate-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #f7931a; /* Bitcoin Yellow */
    color: var(--text-main);
    text-decoration: none;
    font-weight: bold;
    border-radius: 12px;
    font-size: 1rem;
    margin-top: 10px;
    transition: 0.3s ease;
}

.bitcoin-donate-btn:hover {
    background-color: #ffb84d; /* Lighter Yellow on hover */
    transform: translateY(-3px);
}

.bitcoin-logo {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin-right: 10px;
}

/* MOBILE */
@media (max-width: 600px) {
    .container {
        grid-template-columns: 1fr;
    }
}
