/* ============================================================================
   LOREBENCH ATLAS THEME
   ============================================================================
   Old-world cartography and explorer journal aesthetic
   Aged parchment, coffee stains, ink splatters, wax seals
   Insanely good for Maps, Planets, Star Charts
   ============================================================================ */

:root[data-theme="atlas"] {
    /* FONTS */
    --lb-font-display: 'Pirata One', cursive;
    --lb-font-heading: 'Cinzel', serif;
    --lb-font-body: 'IM Fell English', serif;

    /* PRIMARY ACCENT COLOR (aged gold/brass) */
    --lb-accent-primary: #8b6914;
    --lb-accent-primary-light: #b8860b;
    --lb-accent-primary-dark: #5c4510;
    --lb-accent-primary-darker: #3d2914;

    /* SECONDARY ACCENT (blood red for emphasis) */
    --lb-accent-secondary: #8b1a1a;
    --lb-accent-secondary-light: #a52020;
    --lb-accent-secondary-dark: #5c1010;

    /* BACKGROUND COLORS (warm parchment) */
    --lb-bg-base: #e8d5a3;
    --lb-bg-elevated: #f4e4bc;
    --lb-bg-elevated-1: #f2e2b6;
    --lb-bg-elevated-2: #f6e8c4;
    --lb-bg-elevated-3: #f8ecd0;
    --lb-bg-input: #faf0d8;
    --lb-bg-hover: #dcc690;
    --bg-tertiary: #e5d4a1;
    --bg-primary: #f4e4bc;

    /* BORDER COLORS */
    --lb-border-subtle: #c4a870;
    --lb-border-default: #8b6914;
    --lb-border-strong: #5c4510;
    --lb-border-focus: var(--lb-accent-primary);

    /* TEXT COLORS (dark ink) */
    --lb-text-primary: #2a1f17;
    --lb-text-secondary: #3d2914;
    --lb-text-muted: #6b5530;
    --lb-text-subtle: #8b7550;
    --lb-text-inverse: #f4e4bc;

    /* STATE COLORS */
    --lb-success: #2e5a28;
    --lb-error: #8b1a1a;
    --lb-error-bg: #f5d8d8;
    --lb-error-border: #a54040;
    --lb-warning: #b8860b;
    --lb-info: #1a4a6a;

    /* COMPONENT-SPECIFIC */
    --lb-card-bg: var(--lb-bg-elevated);
    --lb-card-border: var(--lb-border-default);
    --lb-card-header-bg: linear-gradient(135deg, var(--lb-bg-elevated-2) 0%, var(--lb-bg-elevated) 100%);

    /* INTERACTIVE ELEMENTS */
    --lb-button-primary-bg: #5c4510;
    --lb-button-primary-hover: #6b5520;
    --lb-button-primary-text: #f4e4bc;
    --lb-button-secondary-bg: transparent;
    --lb-button-secondary-hover: rgba(139, 105, 20, 0.15);
    --lb-button-secondary-text: #3d2914;

    /* RATING SYSTEM */
    --lb-rating-fill: #8b6914;
    --lb-rating-empty: #c4a870;
    --lb-rating-hover: #b8860b;

    /* SHADOWS */
    --lb-shadow-sm: 0 1px 3px rgba(42, 31, 23, 0.15);
    --lb-shadow-md: 0 4px 10px rgba(42, 31, 23, 0.2);
    --lb-shadow-lg: 0 8px 25px rgba(42, 31, 23, 0.25);

    /* ========================================================================
       BACKWARDS COMPATIBILITY MAPPINGS
       ======================================================================== */
    --primary-color: var(--lb-accent-primary);
    --primary-hover: var(--lb-accent-primary-light);
    --bg-secondary: var(--lb-bg-elevated-2);
    --bg-card: var(--lb-bg-elevated);
    --bg-hover: var(--lb-bg-hover);
    --border-color: var(--lb-border-default);
    --text-primary: var(--lb-text-primary);
    --text-secondary: var(--lb-text-secondary);
    --text-muted: var(--lb-text-muted);

    /* UX Component Mappings */
    --ux-bg: var(--lb-bg-base);
    --ux-text: var(--lb-text-primary);
}

/* ============================================================================
   PARCHMENT BASE WITH COFFEE STAINS & NOISE
   ============================================================================ */

:root[data-theme="atlas"] body {
    background-color: #d8c590;
    background-image:
        /* Edge darkening/vignette */
        radial-gradient(ellipse at center, transparent 50%, rgba(42, 31, 23, 0.15) 100%),

        /* Coffee ring stain 1 - large */
        radial-gradient(ellipse 180px 160px at 85% 20%,
            transparent 45%,
            rgba(101, 67, 33, 0.12) 50%,
            rgba(101, 67, 33, 0.2) 55%,
            rgba(101, 67, 33, 0.08) 65%,
            transparent 75%),

        /* Coffee ring stain 2 - small */
        radial-gradient(ellipse 70px 65px at 12% 75%,
            transparent 50%,
            rgba(80, 50, 25, 0.25) 55%,
            rgba(80, 50, 25, 0.12) 65%,
            transparent 72%),

        /* Water stain - bottom right */
        radial-gradient(ellipse 140px 100px at 80% 85%,
            rgba(90, 60, 30, 0.1) 0%,
            rgba(90, 60, 30, 0.15) 40%,
            transparent 60%),

        /* Age spots */
        radial-gradient(circle at 25% 35%, rgba(139, 90, 43, 0.12) 0%, transparent 6%),
        radial-gradient(circle at 65% 55%, rgba(139, 90, 43, 0.08) 0%, transparent 4%),
        radial-gradient(circle at 45% 78%, rgba(139, 90, 43, 0.1) 0%, transparent 5%),

        /* Perlin noise texture */
        url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' seed='15'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E"),

        /* Base parchment gradient */
        linear-gradient(135deg,
            #f4e4bc 0%,
            #e8d5a3 20%,
            #f2e2b6 40%,
            #dcc690 60%,
            #e5d4a1 80%,
            #f0dfa8 100%);
}

/* Ink splatters overlay */
:root[data-theme="atlas"] body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        /* Ink splatter top-left */
        radial-gradient(ellipse 25px 20px at 8% 12%, rgba(42, 31, 23, 0.12) 0%, transparent 70%),
        radial-gradient(ellipse 12px 15px at 6% 10%, rgba(42, 31, 23, 0.15) 0%, transparent 70%),
        radial-gradient(circle 5px at 10% 14%, rgba(42, 31, 23, 0.1) 0%, transparent 70%),

        /* Ink splatter bottom-right */
        radial-gradient(ellipse 20px 30px at 92% 88%, rgba(42, 31, 23, 0.1) 0%, transparent 70%),
        radial-gradient(ellipse 15px 12px at 94% 85%, rgba(42, 31, 23, 0.12) 0%, transparent 70%),

        /* Foxing spots */
        radial-gradient(circle 2px at 18% 22%, rgba(101, 67, 33, 0.2) 0%, transparent 100%),
        radial-gradient(circle 3px at 72% 15%, rgba(101, 67, 33, 0.15) 0%, transparent 100%),
        radial-gradient(circle 2px at 35% 68%, rgba(101, 67, 33, 0.18) 0%, transparent 100%),
        radial-gradient(circle 2px at 88% 45%, rgba(101, 67, 33, 0.14) 0%, transparent 100%),
        radial-gradient(circle 3px at 55% 92%, rgba(101, 67, 33, 0.16) 0%, transparent 100%);
}

/* Compass rose watermark */
:root[data-theme="atlas"] body::after {
    content: "";
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 100px;
    height: 100px;
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='45' fill='none' stroke='%235c4510' stroke-width='2'/%3E%3Ccircle cx='50' cy='50' r='35' fill='none' stroke='%235c4510' stroke-width='1'/%3E%3Cpath d='M50,5 L55,45 L50,50 L45,45 Z' fill='%238b1a1a'/%3E%3Cpath d='M50,95 L55,55 L50,50 L45,55 Z' fill='%235c4510'/%3E%3Cpath d='M5,50 L45,45 L50,50 L45,55 Z' fill='%235c4510'/%3E%3Cpath d='M95,50 L55,45 L50,50 L55,55 Z' fill='%235c4510'/%3E%3Ccircle cx='50' cy='50' r='8' fill='%238b6914'/%3E%3Ctext x='50' y='18' text-anchor='middle' font-size='8' fill='%235c4510'%3EN%3C/text%3E%3Ctext x='50' y='92' text-anchor='middle' font-size='8' fill='%235c4510'%3ES%3C/text%3E%3Ctext x='12' y='53' text-anchor='middle' font-size='8' fill='%235c4510'%3EW%3C/text%3E%3Ctext x='88' y='53' text-anchor='middle' font-size='8' fill='%235c4510'%3EE%3C/text%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

/* ============================================================================
   CARDS - ORNATE MAP STYLE
   ============================================================================ */

:root[data-theme="atlas"] .card,
:root[data-theme="atlas"] .lb-card {
    position: relative;
    background: var(--lb-bg-elevated);
    border: 2px solid var(--lb-border-default);
    border-radius: 6px;
    box-shadow:
        0 0 0 3px var(--lb-border-strong),
        var(--lb-shadow-md),
        inset 0 0 60px rgba(139, 90, 43, 0.08);
}

/* Corner flourishes */
:root[data-theme="atlas"] .card::before,
:root[data-theme="atlas"] .lb-card::before {
    content: "";
    position: absolute;
    top: 6px;
    left: 6px;
    width: 20px;
    height: 20px;
    border-left: 2px solid var(--lb-border-strong);
    border-top: 2px solid var(--lb-border-strong);
    pointer-events: none;
}

:root[data-theme="atlas"] .card::after,
:root[data-theme="atlas"] .lb-card::after {
    content: "";
    position: absolute;
    bottom: 6px;
    right: 6px;
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--lb-border-strong);
    border-bottom: 2px solid var(--lb-border-strong);
    pointer-events: none;
}

/* ============================================================================
   COMPONENT OVERRIDES
   ============================================================================ */

/* Card headers */
:root[data-theme="atlas"] .card-header,
:root[data-theme="atlas"] .lb-card-header {
    border-bottom: 2px solid var(--lb-border-default);
    background: linear-gradient(180deg, var(--lb-bg-elevated-2) 0%, var(--lb-bg-elevated) 100%);
}

/* Input fields */
:root[data-theme="atlas"] input,
:root[data-theme="atlas"] textarea,
:root[data-theme="atlas"] select {
    border: 1px solid var(--lb-border-subtle);
    background: var(--lb-bg-input);
    color: var(--lb-text-primary);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
}

:root[data-theme="atlas"] input:focus,
:root[data-theme="atlas"] textarea:focus,
:root[data-theme="atlas"] select:focus {
    border-color: var(--lb-border-default);
    box-shadow:
        inset 0 1px 3px rgba(0, 0, 0, 0.08),
        0 0 0 2px rgba(139, 105, 20, 0.2);
    outline: none;
}

:root[data-theme="atlas"] input::placeholder,
:root[data-theme="atlas"] textarea::placeholder {
    color: var(--lb-text-muted);
    font-style: italic;
}

/* Primary buttons - leather/explorer style */
:root[data-theme="atlas"] .btn-primary,
:root[data-theme="atlas"] button[type="submit"] {
    background: linear-gradient(180deg, #5c4510 0%, #3d2914 100%) !important;
    color: var(--lb-text-inverse) !important;
    border: 2px solid #2a1f17 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        3px 4px 8px rgba(0, 0, 0, 0.2);
}

:root[data-theme="atlas"] .btn-primary:hover,
:root[data-theme="atlas"] button[type="submit"]:hover {
    background: linear-gradient(180deg, #6b5520 0%, #4d3924 100%) !important;
}

/* Danger/action buttons - wax seal red */
:root[data-theme="atlas"] .btn-danger,
:root[data-theme="atlas"] .btn-warning {
    background: linear-gradient(180deg, #8b1a1a 0%, #5c1010 100%) !important;
    color: var(--lb-text-inverse) !important;
    border: 2px solid #3d0a0a !important;
}

:root[data-theme="atlas"] .btn-danger:hover,
:root[data-theme="atlas"] .btn-warning:hover {
    background: linear-gradient(180deg, #a52020 0%, #6c1515 100%) !important;
}

/* Secondary buttons */
:root[data-theme="atlas"] .btn-secondary {
    background: rgba(139, 105, 20, 0.1) !important;
    color: var(--lb-text-primary) !important;
    border: 1px solid var(--lb-border-default) !important;
}

:root[data-theme="atlas"] .btn-secondary:hover {
    background: rgba(139, 105, 20, 0.2) !important;
}

/* Links */
:root[data-theme="atlas"] a {
    color: var(--lb-text-secondary);
    text-decoration: none;
    border-bottom: 1px dotted var(--lb-border-subtle);
}

:root[data-theme="atlas"] a:hover {
    color: var(--lb-accent-secondary);
    border-bottom-style: solid;
    border-bottom-color: var(--lb-accent-secondary);
}

/* Tables */
:root[data-theme="atlas"] table {
    border: 2px solid var(--lb-border-default);
    box-shadow: var(--lb-shadow-sm);
}

:root[data-theme="atlas"] th,
:root[data-theme="atlas"] td {
    border: 1px solid var(--lb-border-subtle);
}

:root[data-theme="atlas"] th {
    background: var(--lb-bg-hover);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.8em;
    color: var(--lb-text-secondary);
}

/* Scrollbar */
:root[data-theme="atlas"] ::-webkit-scrollbar {
    width: 14px;
    height: 14px;
}

:root[data-theme="atlas"] ::-webkit-scrollbar-track {
    background: var(--lb-bg-hover);
    border-left: 1px solid var(--lb-border-subtle);
}

:root[data-theme="atlas"] ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #8b6914 0%, #5c4510 100%);
    border: 2px solid var(--lb-border-strong);
    border-radius: 2px;
}

:root[data-theme="atlas"] ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #9b7924 0%, #6c5520 100%);
}

/* Code blocks */
:root[data-theme="atlas"] code,
:root[data-theme="atlas"] pre {
    background: rgba(139, 90, 43, 0.08);
    border: 1px solid var(--lb-border-subtle);
    font-family: 'Courier New', Courier, monospace;
    color: var(--lb-text-primary);
}

/* Headings */
:root[data-theme="atlas"] h1,
:root[data-theme="atlas"] h2,
:root[data-theme="atlas"] h3,
:root[data-theme="atlas"] h4,
:root[data-theme="atlas"] h5,
:root[data-theme="atlas"] h6 {
    font-weight: 600;
    color: var(--lb-text-primary);
    letter-spacing: 0.02em;
}

/* Horizontal rules - decorative */
:root[data-theme="atlas"] hr {
    border: none;
    height: 3px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--lb-border-subtle) 10%,
        var(--lb-border-default) 50%,
        var(--lb-border-subtle) 90%,
        transparent 100%);
    margin: 2rem 0;
    position: relative;
}

/* Selection */
:root[data-theme="atlas"] ::selection {
    background: rgba(139, 105, 20, 0.3);
    color: var(--lb-text-primary);
}

/* Blockquotes - journal entry style */
:root[data-theme="atlas"] blockquote {
    border-left: 4px solid var(--lb-accent-secondary);
    background: rgba(139, 90, 43, 0.06);
    padding: 1rem 1.5rem;
    margin: 1rem 0;
    font-style: italic;
    color: var(--lb-text-secondary);
}

/* Badges/tags */
:root[data-theme="atlas"] .badge,
:root[data-theme="atlas"] .tag {
    background: linear-gradient(180deg, #8b1a1a 0%, #5c1010 100%);
    color: var(--lb-text-inverse);
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.75em;
}

/* ============================================================================
   TYPOGRAPHY - OLD WORLD FONTS
   ============================================================================ */

/* Base body font - IM Fell English */
:root[data-theme="atlas"] body,
:root[data-theme="atlas"] p,
:root[data-theme="atlas"] span,
:root[data-theme="atlas"] div,
:root[data-theme="atlas"] li,
:root[data-theme="atlas"] td,
:root[data-theme="atlas"] th {
    font-family: 'IM Fell English', serif !important;
}

/* Display/Logo text - Pirata One */
:root[data-theme="atlas"] .logo,
:root[data-theme="atlas"] .brand,
:root[data-theme="atlas"] .site-title,
:root[data-theme="atlas"] .navbar-brand {
    font-family: 'Pirata One', cursive !important;
    letter-spacing: 3px;
}

/* Main headings - Pirata One for h1, Cinzel for others */
:root[data-theme="atlas"] h1 {
    font-family: 'Pirata One', cursive !important;
    letter-spacing: 4px;
    text-shadow: 2px 2px 0 rgba(139, 105, 20, 0.2);
}

:root[data-theme="atlas"] h2,
:root[data-theme="atlas"] h3,
:root[data-theme="atlas"] h4,
:root[data-theme="atlas"] h5,
:root[data-theme="atlas"] h6 {
    font-family: 'Cinzel', serif !important;
    letter-spacing: 1px;
}

/* Navigation and labels - Cinzel */
:root[data-theme="atlas"] nav,
:root[data-theme="atlas"] nav *,
:root[data-theme="atlas"] .nav-item,
:root[data-theme="atlas"] .nav-link,
:root[data-theme="atlas"] .navbar,
:root[data-theme="atlas"] .navbar *,
:root[data-theme="atlas"] label,
:root[data-theme="atlas"] .label {
    font-family: 'Cinzel', serif !important;
    letter-spacing: 1px;
}

/* Buttons - Cinzel */
:root[data-theme="atlas"] button,
:root[data-theme="atlas"] .btn,
:root[data-theme="atlas"] input[type="submit"],
:root[data-theme="atlas"] input[type="button"] {
    font-family: 'Cinzel', serif !important;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.85rem;
}

/* Inputs keep body font */
:root[data-theme="atlas"] input,
:root[data-theme="atlas"] textarea,
:root[data-theme="atlas"] select {
    font-family: 'IM Fell English', serif !important;
}

/* ============================================================================
   SLIGHT SKEW/ROTATION - HAND-PLACED FEEL
   ============================================================================ */

/* Cards get subtle rotation */
:root[data-theme="atlas"] .card:nth-child(odd),
:root[data-theme="atlas"] .lb-card:nth-child(odd) {
    transform: rotate(-0.3deg);
}

:root[data-theme="atlas"] .card:nth-child(even),
:root[data-theme="atlas"] .lb-card:nth-child(even) {
    transform: rotate(0.4deg);
}

/* Stat cards / grid items - varied rotation */
:root[data-theme="atlas"] .stat-card:nth-child(1) { transform: rotate(-1.5deg) translateY(3px); }
:root[data-theme="atlas"] .stat-card:nth-child(2) { transform: rotate(1deg) translateY(-2px); }
:root[data-theme="atlas"] .stat-card:nth-child(3) { transform: rotate(-0.8deg) translateY(5px); }
:root[data-theme="atlas"] .stat-card:nth-child(4) { transform: rotate(1.5deg) translateY(-3px); }
:root[data-theme="atlas"] .stat-card:nth-child(5) { transform: rotate(-0.5deg) translateY(2px); }

/* Headers with slight tilt */
:root[data-theme="atlas"] header,
:root[data-theme="atlas"] .header {
    transform: rotate(-0.3deg);
}

/* Featured sections */
:root[data-theme="atlas"] .featured,
:root[data-theme="atlas"] .featured-section {
    transform: rotate(-0.5deg);
}

/* Buttons with slight tilt */
:root[data-theme="atlas"] .btn-primary,
:root[data-theme="atlas"] button[type="submit"] {
    transform: rotate(-0.8deg);
}

:root[data-theme="atlas"] .btn-primary:hover,
:root[data-theme="atlas"] button[type="submit"]:hover {
    transform: rotate(-0.8deg) scale(1.03);
}

/* User badges */
:root[data-theme="atlas"] .user-badge,
:root[data-theme="atlas"] .avatar-badge {
    transform: rotate(1deg);
}

/* Section headers */
:root[data-theme="atlas"] .section-header,
:root[data-theme="atlas"] .section-title {
    transform: rotate(0.3deg);
}

/* ============================================================================
   HOMEPAGE - ATLAS THEME OVERRIDES
   ============================================================================ */

/* Hero Section - Parchment style */
:root[data-theme="atlas"] .home-page .hero {
    background:
        radial-gradient(ellipse 120px 100px at 85% 20%,
            transparent 45%,
            rgba(101, 67, 33, 0.1) 50%,
            rgba(101, 67, 33, 0.15) 55%,
            transparent 70%),
        linear-gradient(135deg, var(--lb-bg-elevated) 0%, var(--lb-bg-elevated-2) 100%);
    border: 2px solid var(--lb-border-default);
    box-shadow:
        0 0 0 3px var(--lb-border-strong),
        var(--lb-shadow-md),
        inset 0 0 60px rgba(139, 90, 43, 0.08);
    transform: rotate(-0.3deg);
}

:root[data-theme="atlas"] .home-page .hero h1 {
    font-family: 'Pirata One', cursive !important;
    color: var(--lb-text-primary) !important;
    letter-spacing: 4px;
    text-shadow: 2px 2px 0 rgba(139, 105, 20, 0.2);
}

:root[data-theme="atlas"] .home-page .hero-subtitle {
    font-family: 'IM Fell English', serif !important;
    font-style: italic;
    color: var(--lb-text-secondary);
}

/* Stat Cards - Map card style */
:root[data-theme="atlas"] .home-page .stat-card {
    background:
        radial-gradient(ellipse at center, rgba(255,255,255,0.08) 0%, transparent 70%),
        linear-gradient(180deg, var(--lb-bg-elevated-2) 0%, var(--lb-bg-elevated) 100%);
    border: 2px solid var(--lb-border-default);
    box-shadow:
        3px 4px 10px rgba(0,0,0,0.15),
        inset 0 1px 0 rgba(255,255,255,0.2);
}

/* Stat card rotations - scattered paper effect */
:root[data-theme="atlas"] .home-page .quick-stats .stat-card:nth-child(1) { transform: rotate(-1.5deg) translateY(3px); }
:root[data-theme="atlas"] .home-page .quick-stats .stat-card:nth-child(2) { transform: rotate(1deg) translateY(-2px); }
:root[data-theme="atlas"] .home-page .quick-stats .stat-card:nth-child(3) { transform: rotate(-0.8deg) translateY(5px); }
:root[data-theme="atlas"] .home-page .quick-stats .stat-card:nth-child(4) { transform: rotate(1.5deg) translateY(-3px); }
:root[data-theme="atlas"] .home-page .quick-stats .stat-card:nth-child(5) { transform: rotate(-0.5deg) translateY(2px); }

:root[data-theme="atlas"] .home-page .stat-card.clickable:hover {
    border-color: var(--lb-accent-secondary);
    transform: rotate(0deg) translateY(-4px) scale(1.02);
}

/* Universe/Content card rotations - scattered documents */
:root[data-theme="atlas"] .home-page .universe-card:nth-child(odd),
:root[data-theme="atlas"] .home-page .content-card:nth-child(odd) {
    transform: rotate(-0.5deg);
}

:root[data-theme="atlas"] .home-page .universe-card:nth-child(even),
:root[data-theme="atlas"] .home-page .content-card:nth-child(even) {
    transform: rotate(0.5deg);
}

:root[data-theme="atlas"] .home-page .universe-card:hover,
:root[data-theme="atlas"] .home-page .content-card:hover {
    transform: rotate(0deg) translateY(-4px);
}

:root[data-theme="atlas"] .home-page .stat-value {
    font-family: 'Pirata One', cursive !important;
    color: var(--lb-accent-secondary) !important;
    text-shadow: 1px 1px 0 rgba(0,0,0,0.1);
}

:root[data-theme="atlas"] .home-page .stat-label {
    font-family: 'Cinzel', serif !important;
    color: var(--lb-text-secondary);
    letter-spacing: 2px;
}

/* Create Card - Gold accent */
:root[data-theme="atlas"] .home-page .stat-card.create-card {
    background: linear-gradient(180deg, var(--lb-accent-primary) 0%, var(--lb-accent-primary-dark) 100%);
    border-color: var(--lb-accent-primary-darker);
}

:root[data-theme="atlas"] .home-page .stat-card.create-card .stat-value {
    color: var(--lb-text-inverse) !important;
}

:root[data-theme="atlas"] .home-page .stat-card.create-card .stat-label {
    color: var(--lb-bg-elevated);
}

:root[data-theme="atlas"] .home-page .stat-card.create-card:hover {
    background: linear-gradient(180deg, var(--lb-accent-primary-light) 0%, var(--lb-accent-primary) 100%);
    border-color: var(--lb-accent-primary);
}

/* Featured Banner - Journal entry style */
:root[data-theme="atlas"] .home-page .featured-banner {
    background:
        radial-gradient(ellipse 150px 120px at 90% 80%,
            rgba(80, 50, 25, 0.06) 0%,
            transparent 50%),
        linear-gradient(135deg, var(--lb-bg-elevated-2) 0%, var(--lb-bg-elevated) 100%);
    border: 3px double var(--lb-border-default);
    box-shadow:
        5px 6px 15px rgba(0,0,0,0.15),
        inset 0 0 50px rgba(139, 90, 43, 0.08);
    transform: rotate(-0.5deg);
}

:root[data-theme="atlas"] .home-page .featured-tag {
    font-family: 'Cinzel', serif !important;
    background: linear-gradient(180deg, var(--lb-accent-secondary) 0%, var(--lb-accent-secondary-dark) 100%);
    color: var(--lb-text-inverse) !important;
    padding: 6px 16px;
    display: inline-block;
    border-radius: 3px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.75rem;
}

:root[data-theme="atlas"] .home-page .featured-title {
    font-family: 'Pirata One', cursive !important;
    color: var(--lb-text-primary);
    letter-spacing: 2px;
}

:root[data-theme="atlas"] .home-page .featured-desc {
    font-family: 'IM Fell English', serif !important;
    font-style: italic;
    color: var(--lb-text-secondary);
}

:root[data-theme="atlas"] .home-page .featured-banner .btn-primary {
    background: linear-gradient(180deg, var(--lb-accent-primary-dark) 0%, var(--lb-accent-primary-darker) 100%) !important;
    color: var(--lb-text-inverse) !important;
    border: 2px solid var(--lb-accent-primary-darker) !important;
    font-family: 'Cinzel', serif !important;
    letter-spacing: 2px;
}

/* Section Headers */
:root[data-theme="atlas"] .home-page .section-title {
    font-family: 'Pirata One', cursive !important;
    color: var(--lb-text-primary) !important;
    letter-spacing: 2px;
}

:root[data-theme="atlas"] .home-page .section-header {
    border-bottom: 2px solid var(--lb-border-default);
}

:root[data-theme="atlas"] .home-page .nav-btn {
    font-family: 'Cinzel', serif !important;
    letter-spacing: 1px;
}

:root[data-theme="atlas"] .home-page .nav-btn:hover,
:root[data-theme="atlas"] .home-page .nav-btn.active {
    color: var(--lb-accent-secondary);
    background: rgba(139, 26, 26, 0.1);
}

/* Universe Cards */
:root[data-theme="atlas"] .home-page .universe-card {
    background: var(--lb-bg-elevated);
    border: 2px solid var(--lb-border-default);
    box-shadow:
        0 0 0 2px var(--lb-border-strong),
        var(--lb-shadow-md);
}

:root[data-theme="atlas"] .home-page .universe-card:hover {
    border-color: var(--lb-accent-secondary);
}

:root[data-theme="atlas"] .home-page .universe-name {
    font-family: 'Cinzel', serif !important;
    font-weight: 600;
}

:root[data-theme="atlas"] .home-page .universe-desc,
:root[data-theme="atlas"] .home-page .universe-creator {
    font-family: 'IM Fell English', serif !important;
}

:root[data-theme="atlas"] .home-page .stat-num {
    color: var(--lb-accent-primary) !important;
    font-family: 'Cinzel', serif !important;
}

/* Content Cards */
:root[data-theme="atlas"] .home-page .content-card {
    background: var(--lb-bg-elevated);
    border: 2px solid var(--lb-border-default);
    box-shadow: var(--lb-shadow-md);
}

:root[data-theme="atlas"] .home-page .content-card:hover {
    border-color: var(--lb-accent-secondary);
}

:root[data-theme="atlas"] .home-page .content-type {
    font-family: 'Cinzel', serif !important;
    color: var(--lb-accent-secondary) !important;
}

:root[data-theme="atlas"] .home-page .content-title {
    font-family: 'Cinzel', serif !important;
}

:root[data-theme="atlas"] .home-page .content-desc {
    font-family: 'IM Fell English', serif !important;
}

/* Secondary Buttons */
:root[data-theme="atlas"] .home-page .btn-secondary {
    font-family: 'Cinzel', serif !important;
    background: rgba(139, 105, 20, 0.1) !important;
    border: 1px solid var(--lb-border-default) !important;
    color: var(--lb-text-primary) !important;
}

:root[data-theme="atlas"] .home-page .btn-secondary:hover {
    background: rgba(139, 105, 20, 0.2) !important;
    border-color: var(--lb-accent-primary) !important;
}

/* ============================================================================
   TOPBAR / NAVIGATION - ATLAS THEME
   ============================================================================ */

:root[data-theme="atlas"] .ww-topbar {
    background:
        linear-gradient(180deg, var(--lb-bg-elevated-2) 0%, var(--lb-bg-elevated) 100%);
    border-bottom: 2px solid var(--lb-border-default);
}

:root[data-theme="atlas"] .ww-topbar-main {
    border-bottom-color: var(--lb-border-subtle);
}

:root[data-theme="atlas"] .ww-logo {
    font-family: 'Pirata One', cursive !important;
    color: var(--lb-text-primary) !important;
    letter-spacing: 3px;
    font-size: 1.8rem;
}

:root[data-theme="atlas"] .ww-logo:hover {
    color: var(--lb-accent-secondary) !important;
}

:root[data-theme="atlas"] .ww-nav-link {
    font-family: 'Cinzel', serif !important;
    letter-spacing: 1px;
    color: var(--lb-text-secondary);
}

:root[data-theme="atlas"] .ww-nav-link:hover {
    color: var(--lb-accent-secondary);
    background: rgba(139, 26, 26, 0.08);
}

:root[data-theme="atlas"] .ww-nav-signin {
    color: var(--lb-accent-primary);
}

:root[data-theme="atlas"] .ww-nav-signin:hover {
    color: var(--lb-accent-secondary);
    border-color: var(--lb-accent-secondary);
}

/* Create Button - Gold/brass style */
:root[data-theme="atlas"] .ww-btn-create {
    font-family: 'Cinzel', serif !important;
    background: linear-gradient(180deg, var(--lb-accent-secondary) 0%, var(--lb-accent-secondary-dark) 100%) !important;
    color: var(--lb-text-inverse) !important;
    border: 2px solid var(--lb-accent-secondary-dark) !important;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.8rem;
    box-shadow: 2px 3px 6px rgba(0,0,0,0.2);
}

:root[data-theme="atlas"] .ww-btn-create:hover {
    background: linear-gradient(180deg, var(--lb-accent-secondary-light) 0%, var(--lb-accent-secondary) 100%) !important;
    transform: translateY(-1px);
}

/* User badge / dropdown */
:root[data-theme="atlas"] .user-badge,
:root[data-theme="atlas"] .ww-user-badge {
    font-family: 'Cinzel', serif !important;
    background: rgba(139, 105, 20, 0.1);
    border: 1px solid var(--lb-border-default);
    transform: rotate(0.5deg);
}

/* Search bar */
:root[data-theme="atlas"] .ww-search-input {
    font-family: 'IM Fell English', serif !important;
    background: var(--lb-bg-input);
    border: 1px solid var(--lb-border-subtle);
}

:root[data-theme="atlas"] .ww-search-input:focus {
    border-color: var(--lb-border-default);
    box-shadow: 0 0 0 2px rgba(139, 105, 20, 0.15);
}

:root[data-theme="atlas"] .ww-search-input::placeholder {
    font-style: italic;
}
