/* Dungeon Journal Startpage Styles */

/* =============================================
   LOCAL FONTS
   ============================================= */

@font-face {
    font-family: 'Cinzel';
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
    src: url('/static/fonts/cinzel-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Cinzel';
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
    src: url('/static/fonts/cinzel-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* =============================================
   ROOT VARIABLES & RESET
   ============================================= */

:root {
    --color-dark: #100A1F;
    --color-surface: #150D28;
    --color-violet: #7C3AED;
    --color-violet-light: #A78BFA;
    --color-gold: #D4AF37;
    --color-gold-dark: #A68A2F;
    --color-white: #FFFFFF;
    --color-light-gray: #F5F5F5;
    --color-text: #E8E8E8;

    --font-serif: 'Cinzel', serif;
    --font-body: Arial, sans-serif;

    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;

    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 8px rgba(212, 175, 55, 0.2);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-dark);
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* =============================================
   PWA-INSTALL-HINWEIS
   ============================================= */

.pwa-install-hint {
    position: fixed;
    left: clamp(0.75rem, 4vw, 1.25rem);
    right: clamp(0.75rem, 4vw, 1.25rem);
    bottom: clamp(0.75rem, 4vw, 1.25rem);
    z-index: 1300;
    display: grid;
    grid-template-columns: 2.25rem minmax(0, 1fr) auto 2rem;
    gap: 0.75rem;
    align-items: center;
    max-width: 42rem;
    margin: 0 auto;
    padding: 0.85rem;
    border: 1px solid rgba(212, 175, 55, 0.42);
    border-radius: 0.75rem;
    background: rgba(18, 11, 34, 0.96);
    box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(16px);
}

.pwa-install-hint-icon {
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid rgba(212, 175, 55, 0.46);
    border-radius: 0.5rem;
    color: var(--color-gold);
    font-size: 1.25rem;
    font-weight: 800;
}

.pwa-install-hint-copy {
    min-width: 0;
}

.pwa-install-hint-copy strong,
.pwa-install-hint-copy span {
    display: block;
}

.pwa-install-hint-copy strong {
    color: var(--color-gold);
    font-size: 0.98rem;
    line-height: 1.2;
}

.pwa-install-hint-copy span {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.88rem;
    line-height: 1.35;
}

.pwa-install-hint-action,
.pwa-install-hint-close {
    border: 0;
    cursor: pointer;
    font: inherit;
}

.pwa-install-hint-action {
    min-height: 2.25rem;
    padding: 0 0.9rem;
    border-radius: 999px;
    background: var(--color-gold);
    color: #161019;
    font-weight: 800;
}

.pwa-install-hint-close {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.35rem;
    line-height: 1;
}

@media (min-width: 1025px) {
    .pwa-install-hint {
        display: none;
    }
}

@media (max-width: 520px) {
    .pwa-install-hint {
        grid-template-columns: 2.25rem minmax(0, 1fr) 2rem;
    }

    .pwa-install-hint-action {
        grid-column: 2 / 4;
        width: 100%;
    }
}

/* =============================================
   TYPOGRAPHY
   ============================================= */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    color: var(--color-gold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

h1 {
    font-size: 3.5rem;
    line-height: 1.2;
}

h2 {
    font-size: 2.5rem;
    line-height: 1.3;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: var(--spacing-md);
}

a {
    color: var(--color-gold);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-gold-dark);
}

strong {
    font-weight: 600;
    color: var(--color-gold);
}

em {
    font-style: italic;
}

code {
    font-family: 'Courier New', monospace;
    background-color: rgba(212, 175, 55, 0.1);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    color: var(--color-gold);
    font-size: 0.9em;
}

pre {
    background-color: rgba(0, 0, 0, 0.3);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin-bottom: var(--spacing-md);
}

pre code {
    background-color: transparent;
    padding: 0;
}

/* =============================================
   NAVIGATION BAR
   ============================================= */

.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: rgba(16, 10, 31, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
    box-shadow: var(--shadow-md);
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-md) var(--spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.logo-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.logo-link:hover {
    opacity: 0.8;
}

.logo-icon {
    width: 40px;
    height: 40px;
    fill: var(--color-gold);
}

.brand-text {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-gold);
    letter-spacing: 0.05em;
}

.navbar-toggle {
    display: none;
    flex-direction: column;
    gap: var(--spacing-xs);
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-sm);
}

.toggle-line {
    width: 24px;
    height: 2px;
    background-color: var(--color-gold);
    transition: all 0.3s ease;
}

.navbar-menu {
    display: flex;
    gap: var(--spacing-lg);
    align-items: center;
}

.nav-link {
    font-family: var(--font-serif);
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.3s ease;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

.nav-link:hover {
    color: var(--color-gold);
}

.nav-cta {
    padding: var(--spacing-sm) var(--spacing-lg);
    border: 2px solid var(--color-gold);
    border-radius: var(--radius-sm);
}

/* =============================================
   BUTTONS
   ============================================= */

.btn {
    display: inline-block;
    padding: var(--spacing-md) var(--spacing-lg);
    border: 2px solid var(--color-gold);
    border-radius: var(--radius-sm);
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background-color: var(--color-gold);
    color: var(--color-dark);
    border-color: var(--color-gold);
}

.btn-primary:hover {
    background-color: var(--color-gold-dark);
    border-color: var(--color-gold-dark);
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.4);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-gold);
    border-color: var(--color-gold);
}

.btn-secondary:hover {
    background-color: rgba(212, 175, 55, 0.1);
    border-color: var(--color-gold-dark);
    color: var(--color-gold-dark);
}

.btn-large {
    padding: var(--spacing-lg) var(--spacing-3xl);
    font-size: 1.25rem;
}

/* =============================================
   HERO SECTION
   ============================================= */

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.hero {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl);
    position: relative;
    overflow: hidden;
    /* Violette Tönung über dem dunklen Basis-Layer #100A1F — stärker und
       mit zwei radialen Ellipsen oben/unten, damit der violette Schimmer
       analog zur Login-Animation über die ganze Fläche getragen wird. */
    background:
        radial-gradient(ellipse at 50% 0%,   rgba(124, 58, 237, 0.22) 0%, transparent 65%),
        radial-gradient(ellipse at 30% 100%, rgba(139, 92, 246, 0.18) 0%, transparent 70%),
        radial-gradient(ellipse at 80% 80%,  rgba(91, 33, 182, 0.16) 0%, transparent 70%),
        #100A1F;
}

/* =============================================
   BACKGROUND D20 DECORATION
   ============================================= */

.bg-dice-wrap {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.bg-dice {
    position: absolute;
    /* color setzt currentColor (für SVG-fill-Vererbung); die path-Elemente
       haben aber ein hardcoded stroke="#D4AF37" und fill="none" — color
       greift hier nicht, opacity steuert die Dezenz. */
    color: var(--color-gold);
    opacity: 0.13;
    animation-duration: 20s;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    pointer-events: none;
}

.bg-dice svg {
    width: 100%;
    height: 100%;
    display: block;
    /* fill wird inline via PHP injiziert (fill="currentColor") und greift
       auf .bg-dice color zu. */
}

@keyframes bgFloat1 {
    0%,100% { transform: translate(0,0)    rotate(0deg);   }
    30%      { transform: translate(18px,-28px) rotate(12deg);  }
    65%      { transform: translate(-12px, 20px) rotate(-8deg); }
}
@keyframes bgFloat2 {
    0%,100% { transform: translate(0,0)     rotate(0deg);   }
    40%      { transform: translate(-22px, 16px) rotate(-15deg); }
    70%      { transform: translate(14px,-24px)  rotate(10deg);  }
}
@keyframes bgFloat3 {
    0%,100% { transform: translate(0,0)    rotate(0deg);   }
    25%      { transform: translate(-16px,22px) rotate(8deg);   }
    55%      { transform: translate(10px,-18px) rotate(-12deg); }
}
@keyframes bgFloat4 {
    0%,100% { transform: translate(0,0)    rotate(0deg);   }
    35%      { transform: translate(20px, 14px)  rotate(-10deg); }
    70%      { transform: translate(-8px,-20px)  rotate(6deg);  }
}
@keyframes bgFloat5 {
    0%,100% { transform: translate(0,0)        rotate(0deg);  }
    45%      { transform: translate(-18px,-12px) rotate(18deg); }
    80%      { transform: translate(12px,  18px) rotate(-6deg); }
}
@keyframes bgFloat6 {
    0%,100% { transform: translate(0,0)        rotate(0deg);   }
    30%      { transform: translate(16px, -22px) rotate(-14deg); }
    65%      { transform: translate(-10px, 16px) rotate(9deg);   }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 620px;
    animation: fadeInUp 1s ease-out;
}

.hero-logo {
    position: relative;
    display: inline-block;
    margin-bottom: var(--spacing-xl);
    width: 140px;
    height: 140px;
}

#dice-canvas {
    display: block;
}

/* CSS Sparkle stars around logo */
.logo-sparkle {
    position: absolute;
    clip-path: polygon(50% 0%, 54% 46%, 100% 50%, 54% 54%, 50% 100%, 46% 54%, 0% 50%, 46% 46%);
    animation: logo-sparkle-anim 2.5s ease-in-out infinite;
    pointer-events: none;
    z-index: 5;
    transform: translate(-50%, -50%) scale(0);
}

@keyframes logo-sparkle-anim {
    0%   { opacity: 0;   transform: translate(-50%, -50%) scale(0)    rotate(0deg); }
    30%  { opacity: 1;   transform: translate(-50%, -50%) scale(1)    rotate(45deg); }
    65%  { opacity: 0.8; transform: translate(-50%, -50%) scale(0.9)  rotate(90deg); }
    100% { opacity: 0;   transform: translate(-50%, -50%) scale(0)    rotate(180deg); }
}

.hero-title {
    font-size: 4rem;
    margin-bottom: var(--spacing-md);
}

.hero-tagline {
    font-family: var(--font-body);
    font-size: 1.5rem;
    color: var(--color-gold);
    margin-bottom: var(--spacing-lg);
    font-weight: 300;
    font-style: italic;
}

.status-badge {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--color-gold);
    border-radius: var(--radius-lg);
    color: var(--color-gold);
    font-family: var(--font-serif);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0;
}

.hint-text {
    color: var(--color-text);
    font-size: 0.95rem;
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-md);
    border-left: 3px solid var(--color-gold);
    padding-left: var(--spacing-lg);
}

.hero-login-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

/* Hero CTA Button */
.btn-hero-cta {
    margin-top: var(--spacing-sm);
    margin-bottom: 0;
    padding: var(--spacing-md) var(--spacing-2xl);
    font-size: 1.1rem;
    letter-spacing: 0.08em;
    box-shadow: 0 0 18px rgba(212, 175, 55, 0.3);
}

.btn-hero-cta:hover {
    background-color: #e8c84a;
    border-color: #e8c84a;
    box-shadow: 0 0 28px rgba(212, 175, 55, 0.55);
    color: var(--color-dark);
}

.cta-buttons {
    display: flex;
    gap: var(--spacing-lg);
    justify-content: center;
    flex-wrap: wrap;
}

.cta-buttons .btn {
    animation: slideUp 0.8s ease-out;
}

.cta-buttons .btn:nth-child(2) {
    animation-delay: 0.2s;
}


/* =============================================
   FEATURES SECTION
   ============================================= */

.features {
    padding: var(--spacing-3xl) var(--spacing-lg);
    background-color: rgba(26, 31, 58, 0.5);
    border-top: 1px solid rgba(212, 175, 55, 0.1);
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.features-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: var(--spacing-3xl);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-xl);
}

.feature-card {
    padding: var(--spacing-xl);
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
    text-align: center;
}

.feature-card:hover {
    background-color: rgba(212, 175, 55, 0.05);
    border-color: var(--color-gold);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    margin-bottom: var(--spacing-lg);
    display: flex;
    justify-content: center;
}

.feature-icon svg {
    width: 60px;
    height: 60px;
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.2));
}

.feature-title {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-md);
}

.feature-description {
    color: var(--color-light-gray);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* =============================================
   CTA SECTION
   ============================================= */

.cta-section {
    padding: var(--spacing-3xl) var(--spacing-lg);
    text-align: center;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.05) 0%, transparent 100%);
    border-top: 1px solid rgba(212, 175, 55, 0.1);
}

.cta-container {
    max-width: 600px;
    margin: 0 auto;
}

.cta-title {
    font-size: 2rem;
    margin-bottom: var(--spacing-md);
}

.cta-description {
    color: var(--color-light-gray);
    font-size: 1.1rem;
    margin-bottom: var(--spacing-lg);
}

/* =============================================
   FOOTER
   ============================================= */

.footer {
    background-color: rgba(0, 0, 0, 0.4);
    border-top: 1px solid rgba(212, 175, 55, 0.1);
    padding: var(--spacing-xl) var(--spacing-lg);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-lg);
}

.footer-content p {
    color: var(--color-light-gray);
    font-size: 0.9rem;
    margin: 0;
}

.footer-links {
    display: flex;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
    justify-content: center;
}

.legal-link {
    background: none;
    border: none;
    color: var(--color-gold);
    cursor: pointer;
    font-family: var(--font-body);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-disclaimer {
    width: 100%;
    margin-top: var(--spacing-lg);
    font-size: 0.72rem;
    color: rgba(255,255,255,0.35);
    text-align: center;
    line-height: 1.5;
}

.legal-link:hover {
    color: var(--color-gold-dark);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: opacity 0.25s;
}

.footer-brand:hover {
    opacity: 0.8;
}

.footer-logo-icon {
    /* width/height direkt am SVG-Element gesetzt (wie Navbar) —
       hier nur flex-shrink:0 damit der Container nicht quetscht */
    flex-shrink: 0;
}

.footer-brand-name {
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-gold);
    letter-spacing: 0.1em;
}

.footer-version {
    font-size: 0.7rem;
    color: rgba(212, 175, 55, 0.55);
    border: 1px solid rgba(212, 175, 55, 0.22);
    border-radius: 10px;
    padding: 2px 9px;
    letter-spacing: 0.05em;
    line-height: 1;
    white-space: nowrap;
}

/* =============================================
   LEGAL PAGE
   ============================================= */

.legal-page {
    padding: var(--spacing-xl) var(--spacing-lg);
    min-height: calc(100vh - 200px);
}

.legal-container {
    max-width: 800px;
    margin: 0 auto;
}

.legal-content {
    background-color: rgba(0, 0, 0, 0.2);
    padding: var(--spacing-xl);
    border: 1px solid rgba(212, 175, 55, 0.1);
    border-radius: var(--radius-lg);
}

.legal-content h2 {
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-md);
    border-bottom: 2px solid rgba(212, 175, 55, 0.2);
    padding-bottom: var(--spacing-md);
}

.legal-content h3 {
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

.legal-content hr {
    border: none;
    height: 1px;
    background-color: rgba(212, 175, 55, 0.1);
    margin: var(--spacing-xl) 0;
}

.legal-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: var(--spacing-lg);
}

.legal-content th,
.legal-content td {
    padding: var(--spacing-md);
    text-align: left;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.legal-content th {
    background-color: rgba(212, 175, 55, 0.05);
    color: var(--color-gold);
    font-weight: 600;
}

.legal-content ul,
.legal-content ol {
    margin-left: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

.legal-content li {
    margin-bottom: var(--spacing-sm);
}

/* =============================================
   MODAL
   ============================================= */

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    background-color: var(--color-dark);
    border: 1px solid var(--color-gold);
    border-radius: var(--radius-lg);
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    display: none;
    box-shadow: var(--shadow-lg);
    animation: slideDown 0.3s ease-out;
}

.modal.active {
    display: block;
}

.modal-content {
    position: relative;
    padding: var(--spacing-xl);
}

.modal-close {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    color: var(--color-gold);
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 10;
}

.modal-close:hover {
    color: var(--color-gold-dark);
}

.modal-body {
    padding-right: var(--spacing-lg);
}

.modal-body h1,
.modal-body h2,
.modal-body h3 {
    margin-top: var(--spacing-lg);
}

.modal-body hr {
    border: none;
    height: 1px;
    background-color: rgba(212, 175, 55, 0.1);
    margin: var(--spacing-lg) 0;
}

/* Modal backdrop */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 999;
    display: none;
}

.modal-backdrop.active {
    display: block;
}

/* =============================================
   PARTICLE CANVAS
   ============================================= */

.particle-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* =============================================
   MODAL FOOTER CLOSE BUTTON
   ============================================= */

.modal-footer {
    position: sticky;
    bottom: 0;
    background-color: var(--color-dark);
    padding: var(--spacing-md) var(--spacing-xl);
    border-top: 1px solid rgba(212, 175, 55, 0.15);
    text-align: center;
}

.modal-close-bottom {
    padding: var(--spacing-sm) var(--spacing-2xl);
    font-size: 0.9rem;
}

/* =============================================
   RESPONSIVE DESIGN — TABLET (≤ 900px)
   ============================================= */

@media (max-width: 900px) {
    .navbar-toggle {
        display: flex;
    }

    .navbar-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: rgba(16, 10, 31, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        gap: var(--spacing-md);
        padding: var(--spacing-lg);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        border-bottom: 1px solid rgba(212, 175, 55, 0.1);
    }

    .navbar-menu.active {
        max-height: 300px;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-logo {
        width: 120px;
        height: 120px;
    }

    #dice-canvas {
        width: 120px !important;
        height: 120px !important;
    }

    .footer-container {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-md);
        text-align: center;
    }

    .modal {
        max-width: 92%;
        max-height: 92vh;
    }
}

/* =============================================
   RESPONSIVE DESIGN — MOBILE (≤ 480px)
   ============================================= */

@media (max-width: 480px) {
    :root {
        font-size: 14px;
    }

    .navbar-container {
        padding: var(--spacing-sm) var(--spacing-md);
    }

    .hero {
        padding: var(--spacing-lg) var(--spacing-md);
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-title {
        font-size: 2.4rem;
    }

    .hero-tagline {
        font-size: 1.1rem;
    }

    .hero-logo {
        width: 100px;
        height: 100px;
    }

    #dice-canvas {
        width: 100px !important;
        height: 100px !important;
    }

    .hint-text {
        font-size: 0.88rem;
        border-left: 2px solid var(--color-gold);
        padding-left: var(--spacing-md);
        text-align: left;
    }

    .footer {
        padding: var(--spacing-md);
    }

    .footer-container {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-sm);
        text-align: center;
    }

    .footer-links {
        gap: var(--spacing-md);
    }

    .modal {
        max-width: 98%;
        max-height: 96vh;
        border-radius: var(--radius-md);
    }

    .modal-content {
        padding: var(--spacing-lg) var(--spacing-md);
    }

    .legal-content {
        padding: var(--spacing-md);
    }

    /* Scale down background D20s on mobile */
    .bg-dice-wrap .bg-dice {
        opacity: 0.03;
    }
}
