:root {
    --parchment: #f4e4bc;
    --parchment-dark: #e8d4a0;
    --ink: #2c1810;
    --ink-muted: #5c4033;
    --gold: #b8860b;
    --gold-light: #daa520;
    --burgundy: #722f37;
    --forest: #2d5016;
    --shadow: 0 8px 32px rgba(44, 24, 16, 0.2);
    --border-ornate: 3px double var(--gold);
    --torch-radius: 800px;
    --card-bg: linear-gradient(180deg, rgba(244, 228, 188, 0.08), rgba(244, 228, 188, 0.03));
}


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

body {
    font-family: 'Crimson Text', Georgia, serif;
    background: #1a0f08;
    color: var(--parchment);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24' fill='none' stroke='%23daa520' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 14 5-5'/%3E%3Cpath d='m17 3-3.1 3.1'/%3E%3Cpath d='m9 22-3.1-3.1'/%3E%3Cpath d='m17 21 3.1-3.1'/%3E%3Cpath d='m9 3-3.1 3.1'/%3E%3Cpath d='m14 14 5 5'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") 12 12, auto;
}


body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle var(--torch-radius) at var(--mouse-x, 50%) var(--mouse-y, 50%), 
        rgba(0,0,0,0) 0%, 
        rgba(0,0,0,0.4) 60%, 
        rgba(0,0,0,0.85) 100%);
    pointer-events: none;
    z-index: 9999;
}

#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    pointer-events: none;
}


a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: min(1100px, 90%);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

header {
    position: fixed;
    width: 100%;
    background: linear-gradient(180deg, rgba(26, 15, 8, 0.98) 0%, rgba(45, 24, 16, 0.95) 100%);
    border-bottom: var(--border-ornate);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    z-index: 1000;
}

.nav {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 18px 0;
    gap: 20px;
}

.logo {
    font-family: 'Cinzel', serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--gold-light);
    letter-spacing: 2px;
    text-shadow: 0 0 20px rgba(218, 165, 32, 0.3);
}

.menu {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.menu a {
    color: var(--parchment);
    padding: 10px 14px;
    border: 1px solid transparent;
    transition: 0.25s;
    font-size: 0.95rem;
    font-family: 'Cinzel', serif;
}

.menu a:hover {
    color: var(--gold-light);
    border-color: var(--gold);
}

.menu .btn-trocar-sistema {
    margin-left: 10px;
    padding: 6px 14px;
    font-size: 0.9rem;
    background: rgba(184, 134, 11, 0.1);
}

.hero {
    padding: 80px 0 50px;
}

.hero-grid {
    display: grid;
    margin-top: clamp(40px, 10vh, 100px);
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: center;
}

.scroll-badge {
    display: inline-block;
    padding: 8px 16px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, rgba(184, 134, 11, 0.2), rgba(114, 47, 55, 0.2));
    border: 1px solid var(--gold);
    color: var(--gold-light);
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.hero h1 {
    font-family: 'Cinzel', serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.2;
    margin-bottom: 24px;
    color: var(--parchment);
    font-weight: 700;
    letter-spacing: 1px;
}

.hero p {
    color: var(--parchment-dark);
    font-size: 1.15rem;
    line-height: 1.9;
    margin-bottom: 28px;
    max-width: 600px;
    font-style: italic;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    border: 2px solid var(--gold);
    cursor: pointer;
    padding: 14px 22px;
    font-family: 'Cinzel', serif;
    font-weight: 600;
    transition: 0.25s ease;
    box-shadow: var(--shadow);
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold), #8b6914);
    color: #1a0f08;
}

.btn-primary:hover {
    transform: translateY(-2px);
    filter: brightness(1.15);
    box-shadow: 0 4px 20px rgba(184, 134, 11, 0.4);
}

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

.btn-secondary:hover {
    background: rgba(184, 134, 11, 0.15);
    transform: translateY(-2px);
}

.hero-card {
    background: linear-gradient(180deg, rgba(244, 228, 188, 0.12), rgba(244, 228, 188, 0.05));
    border: 2px solid var(--gold);
    padding: 28px;
    box-shadow: var(--shadow), inset 0 0 60px rgba(184, 134, 11, 0.05);
    position: relative;
}

.hero-card::before {
    content: '✦';
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--gold);
    font-size: 1.2rem;
}

.hero-card h3 {
    margin-bottom: 20px;
    color: var(--gold-light);
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    text-align: center;
    margin-top: 8px;
}

.hero-card ul {
    list-style: none;
    display: grid;
    gap: 14px;
}

.hero-card li {
    background: rgba(44, 24, 16, 0.4);
    padding: 14px 16px;
    border-left: 4px solid var(--gold);
    color: var(--parchment-dark);
    font-size: 0.95rem;
}

section {
    padding: 50px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 2px solid rgba(184, 134, 11, 0.3);
}

.section-title {
    font-family: 'Cinzel', serif;
    font-size: 2.2rem;
    margin-bottom: 12px;
    color: var(--gold-light);
    letter-spacing: 2px;
}

.section-subtitle {
    color: var(--parchment-dark);
    margin-bottom: 0;
    line-height: 1.8;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    font-style: italic;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.card {
    background: linear-gradient(180deg, rgba(244, 228, 188, 0.1), rgba(244, 228, 188, 0.03));
    border: 2px solid rgba(184, 134, 11, 0.4);
    padding: 26px;
    box-shadow: var(--shadow);
    transition: 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    border-color: var(--gold);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.card h3 {
    margin-bottom: 14px;
    color: var(--gold-light);
    font-family: 'Cinzel', serif;
    font-size: 1.15rem;
}

/* System Cards */
.system-card {
    background: var(--card-bg);
    border: 1px solid rgba(184, 134, 11, 0.3);
    padding: 30px;
    position: relative;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow: hidden;
}

.system-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.system-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--gold);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.5);
    background: rgba(244, 228, 188, 0.1);
}

.system-card:hover::before {
    transform: scaleX(1);
}

.system-tag {
    align-self: flex-start;
    font-family: 'Cinzel', serif;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 4px 10px;
    background: rgba(184, 134, 11, 0.15);
    color: var(--gold-light);
    border: 1px solid rgba(184, 134, 11, 0.4);
    border-radius: 2px;
}

.system-card h3 {
    font-family: 'Cinzel', serif;
    color: var(--parchment);
    font-size: 1.4rem;
    margin: 5px 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.system-card p {
    color: var(--parchment-dark);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
    flex-grow: 1;
}

.system-features {
    list-style: none;
    padding: 0;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.system-features li {
    font-size: 0.85rem;
    color: var(--gold-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

.system-features li::before {
    content: '✦';
    font-size: 0.7rem;
    color: var(--gold);
}

/* Categories specific colors (subtle) */
.system-card[data-category="tradicional"] { border-left: 3px solid #b8860b; }
.system-card[data-category="narrativo"] { border-left: 3px solid #722f37; }
.system-card[data-category="simulacionista"] { border-left: 3px solid #2d5016; }
.system-card[data-category="hibrido"] { border-left: 3px solid #daa520; }

/* System cards as selectable categories */
.system-card-selectable {
    cursor: pointer;
}
.system-select-hint {
    font-size: 0.8rem;
    color: var(--gold);
    opacity: 0.8;
    margin-top: 10px;
    display: block;
}
.system-card-selectable:hover .system-select-hint {
    opacity: 1;
}

/* Essenciais do sistema no guia */
#essenciais-conteudo ul {
    list-style: none;
    padding: 0;
}
#essenciais-conteudo li {
    margin-bottom: 12px;
    padding-left: 1.2em;
    position: relative;
}
#essenciais-conteudo li::before {
    content: '✦';
    position: absolute;
    left: 0;
    color: var(--gold);
}
#essenciais-conteudo .dica-destaque {
    margin-top: 16px;
    padding: 12px;
    background: rgba(184, 134, 11, 0.1);
    border-left: 3px solid var(--gold);
}

.card p {
    color: var(--parchment-dark);
    line-height: 1.8;
    font-size: 1.05rem;
}

.tag {
    display: inline-block;
    font-size: 0.8rem;
    background: rgba(114, 47, 55, 0.4);
    color: #e8b4b8;
    border: 1px solid var(--burgundy);
    padding: 6px 12px;
    margin-bottom: 14px;
    font-family: 'Cinzel', serif;
}

.interactive-box {
    background: linear-gradient(180deg, rgba(244, 228, 188, 0.08), rgba(244, 228, 188, 0.02));
    border: 2px solid rgba(184, 134, 11, 0.5);
    padding: 32px;
    box-shadow: var(--shadow), inset 0 0 80px rgba(44, 24, 16, 0.2);
}

.input,
select,
textarea {
    width: 100%;
    margin-top: 10px;
    background: rgba(44, 24, 16, 0.5);
    border: 2px solid rgba(184, 134, 11, 0.4);
    color: var(--parchment);
    padding: 14px 18px;
    outline: none;
    font-size: 1rem;
    font-family: 'Crimson Text', serif;
}

textarea {
    resize: vertical;
    min-height: 120px;
}

label {
    display: block;
    margin-top: 18px;
    font-weight: 600;
    color: var(--gold-light);
    font-family: 'Cinzel', serif;
}

.result {
    margin-top: 20px;
    background: rgba(44, 24, 16, 0.6);
    border-left: 4px solid var(--gold);
    padding: 20px;
    line-height: 1.9;
    color: var(--parchment-dark);
    min-height: 80px;
    font-style: italic;
}

.checklist {
    display: grid;
    gap: 14px;
    margin-top: 20px;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(44, 24, 16, 0.4);
    padding: 16px;
    border-left: 4px solid var(--gold);
    color: var(--parchment-dark);
}

.check-item input {
    transform: scale(1.3);
    accent-color: var(--forest);
}

.progress-wrap {
    margin-top: 24px;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: rgba(44, 24, 16, 0.6);
    overflow: hidden;
    border: 2px solid rgba(184, 134, 11, 0.3);
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--gold), var(--forest));
    transition: 0.3s ease;
}

.progress-text {
    margin-top: 12px;
    color: var(--parchment-dark);
    font-size: 0.95rem;
}

.tips-list {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.tip-btn {
    width: 100%;
    text-align: left;
    background: rgba(44, 24, 16, 0.5);
    color: var(--parchment);
    border: 2px solid rgba(184, 134, 11, 0.3);
    padding: 18px 20px;
    cursor: pointer;
    transition: 0.2s;
    font-size: 1rem;
    font-family: 'Cinzel', serif;
}

.tip-btn:hover {
    background: rgba(184, 134, 11, 0.15);
    border-color: var(--gold);
}

.tip-content {
    display: none;
    margin-top: 12px;
    color: var(--parchment-dark);
    line-height: 1.9;
    padding: 0 8px 12px;
    font-style: italic;
}

.tip.active .tip-content {
    display: block;
    animation: fadeIn 0.25s ease;
}

.planner-output {
    margin-top: 20px;
    display: grid;
    gap: 16px;
}

.planner-block {
    background: rgba(44, 24, 16, 0.5);
    padding: 18px;
    border-left: 4px solid var(--gold);
    color: var(--parchment-dark);
}

.planner-block strong {
    color: var(--gold-light);
    font-family: 'Cinzel', serif;
}

.race-card {
    position: relative;
    background: linear-gradient(180deg, rgba(244, 228, 188, 0.12), rgba(244, 228, 188, 0.04));
    border: 2px solid rgba(184, 134, 11, 0.5);
    padding: 28px;
    transition: 0.3s;
    overflow: hidden;
    min-height: 480px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.race-card:hover {
    border-color: var(--gold);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.race-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    width: 120px;
    height: 120px;
}

.race-card h3 {
    position: absolute;
    bottom: 10px;
    font-family: 'Cinzel', serif;
    color: var(--gold-light);
    margin-bottom: 0;
    font-size: 1.3rem;
    text-align: center;
    padding: 10px;
    border: none;
    border-radius: 10px;
    backdrop-filter: blur(15px);
}

.race-card p {
    position: absolute;
    inset: 0;
    background: rgba(26, 15, 8, 0.96);
    color: var(--parchment-dark);
    line-height: 1.85;
    font-size: 1.05rem;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.race-card:hover p {
    opacity: 1;
    visibility: visible;
}

.racas-actions {
    display: flex;
    justify-content: center;
    margin: 24px 0;
    gap: 16px;
}

.race-card-dynamic .race-icon {
    background: none;
}

/* Icones das raças */
.icon-elf {
    background-image: url(imgs/elf.png);
}

.icon-dwarf {
    background-image: url(imgs/dwarf.png);   
}

.icon-gnome {
    background-image: url(imgs/gnome.png);   
}

.icon-fairy {
    background-image: url(imgs/fairy.png);   
}

.icon-orcs {
    background-image: url(imgs/orcs.png);   
}

.icon-other-creatures {
    background-image: url(imgs/other_creatures.png);   
}

.race-card {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
/* Icones das raças */

.lore-block {
    background: rgba(44, 24, 16, 0.5);
    border: 2px solid rgba(184, 134, 11, 0.3);
    padding: 32px 40px;
    margin: 30px 0;
    font-style: italic;
    line-height: 1.9;
    color: var(--parchment-dark);
}

.lore-block::before {
    content: '"';
    font-size: 4rem;
    color: var(--gold);
    opacity: 0.5;
    line-height: 0;
}

footer {
    padding: 50px 0 60px;
    margin-top: 40px;
    border-top: var(--border-ornate);
    text-align: center;
    color: var(--parchment-dark);
    font-style: italic;
}

.audio-controls {
    position: fixed;
    left: 24px;
    bottom: 24px;
    z-index: 999;
}

.audio-btn {
    width: 52px;
    height: 52px;
    border: 2px solid var(--gold);
    border-radius: 50%;
    cursor: pointer;
    background: rgba(44, 24, 16, 0.8);
    backdrop-filter: blur(8px);
    color: var(--gold-light);
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.audio-btn:hover {
    background: var(--gold);
    color: #1a0f08;
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 0 20px rgba(184, 134, 11, 0.4);
}

.audio-btn.playing {
    animation: pulse-gold 2s infinite;
}

@keyframes pulse-gold {
    0% { box-shadow: 0 0 0 0 rgba(184, 134, 11, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(184, 134, 11, 0); }
    100% { box-shadow: 0 0 0 0 rgba(184, 134, 11, 0); }
}

.floating-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 52px;
    height: 52px;
    border: 2px solid var(--gold);
    cursor: pointer;
    background: rgba(44, 24, 16, 0.9);
    color: var(--gold-light);
    font-size: 22px;
    font-family: 'Cinzel', serif;
    display: none;
    z-index: 999;
    transition: 0.2s;
}

.floating-top:hover {
    background: var(--gold);
    color: #1a0f08;
}

.floating-top.show {
    display: block;
}

.ornament {
    text-align: center;
    color: var(--gold);
    font-size: 1.5rem;
    margin: 24px 0;
    letter-spacing: 8px;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--gold);
    color: var(--gold-light);
    font-size: 1.8rem;
    cursor: pointer;
    padding: 4px 10px;
    transition: 0.3s;
}

@media (max-width: 900px) {
    .container {
        width: 92%;
    }

    .menu-toggle {
        display: block;
    }

    .nav {
        justify-content: space-between;
        padding: 12px 0;
    }

    .menu {
        position: fixed;
        top: 75px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 75px);
        background: rgba(26, 15, 8, 0.98);
        flex-direction: column;
        align-items: center;
        padding-top: 40px;
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
        backdrop-filter: blur(10px);
        border-top: 1px solid rgba(184, 134, 11, 0.3);
    }

    .menu.active {
        left: 0;
    }

    .menu a {
        font-size: 1.2rem;
        width: 80%;
        text-align: center;
        border-bottom: 1px solid rgba(184, 134, 11, 0.1);
        padding: 16px;
    }

    .hero-grid,
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .system-card {
        padding: 20px;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero h1 {
        text-align: center;
    }

    .hero p {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .race-card {
        min-height: 350px;
    }

    .race-card p {
        opacity: 0;
        visibility: hidden;
    }
    
    /* On mobile, allow tapping to see info */
    .race-card.active p {
        opacity: 1;
        visibility: visible;
    }
}

@media (max-width: 600px) {
    .section-title {
        font-size: 1.8rem;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .interactive-box {
        padding: 20px;
    }

    .lore-block {
        padding: 20px;
        font-size: 0.95rem;
    }

    #dice-roller-wrapper {
        right: 16px;
        bottom: 16px;
    }

    .dice-panel {
        right: -8px;
        width: min(280px, calc(100vw - 32px));
    }
}

/* Oráculo dos Dados */
#dice-roller-wrapper {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 10001;
}

.dice-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 64px;
    height: 64px;
    background: linear-gradient(145deg, var(--gold) 0%, #8b6914 100%);
    border: 2px solid var(--parchment);
    border-radius: 12px;
    cursor: pointer;
    color: var(--ink);
    font-family: 'Cinzel', serif;
    font-size: 0.65rem;
    font-weight: 700;
    box-shadow: 0 4px 20px rgba(184, 134, 11, 0.4), inset 0 1px 0 rgba(255,255,255,0.2);
    transition: transform 0.2s, box-shadow 0.2s;
}

.dice-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 28px rgba(184, 134, 11, 0.5);
}

.dice-btn.active {
    background: linear-gradient(145deg, var(--gold-light) 0%, var(--gold) 100%);
    box-shadow: 0 0 0 2px var(--parchment);
}

.dice-icon {
    font-size: 1.4rem;
    line-height: 1;
}

.dice-panel {
    position: absolute;
    right: 0;
    bottom: 72px;
    width: 260px;
    background: linear-gradient(180deg, rgba(44, 24, 16, 0.98) 0%, rgba(26, 15, 8, 0.98) 100%);
    border: var(--border-ornate);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.6);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.95);
    transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
}

.dice-panel.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.dice-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.dice-panel-title {
    font-family: 'Cinzel', serif;
    font-size: 0.95rem;
    color: var(--gold-light);
}

.dice-close {
    background: none;
    border: none;
    color: var(--parchment);
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    opacity: 0.7;
}

.dice-close:hover {
    opacity: 1;
}

.dice-presets {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.dice-presets button {
    flex: 1;
    padding: 8px;
    background: rgba(184, 134, 11, 0.2);
    border: 1px solid var(--gold);
    border-radius: 6px;
    color: var(--gold-light);
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.2s;
}

.dice-presets button:hover {
    background: rgba(184, 134, 11, 0.35);
}

.dice-custom {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.dice-custom input,
.dice-custom select {
    width: 48px;
    padding: 6px;
    background: rgba(244, 228, 188, 0.1);
    border: 1px solid var(--gold);
    border-radius: 4px;
    color: var(--parchment);
    font-family: inherit;
    font-size: 0.9rem;
    text-align: center;
}

.dice-custom input#dice-mod {
    width: 44px;
}

.dice-custom span {
    color: var(--ink-muted);
    font-size: 0.85rem;
}

.dice-roll-main {
    width: 100%;
    padding: 12px;
    background: linear-gradient(145deg, var(--gold) 0%, #8b6914 100%);
    border: 2px solid var(--parchment);
    border-radius: 8px;
    color: var(--ink);
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.dice-roll-main:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(184, 134, 11, 0.4);
}

.dice-result-area {
    margin-top: 14px;
    padding: 12px;
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    border: 1px solid rgba(184, 134, 11, 0.3);
    min-height: 60px;
}

.dice-result-area.rolling .dice-value {
    animation: dicePulse 0.4s ease-in-out infinite alternate;
}

.dice-value {
    font-family: 'Cinzel', serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--parchment);
    text-align: center;
}

.dice-value.crit {
    color: var(--gold-light);
    text-shadow: 0 0 12px rgba(218, 165, 32, 0.6);
    animation: critGlow 1.5s ease-out;
}

.dice-value.fumble {
    color: var(--burgundy);
    animation: fumbleShake 0.5s ease-out;
}

.dice-fortuna {
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--ink-muted);
    font-style: italic;
    text-align: center;
}

@keyframes dicePulse {
    from { opacity: 0.5; }
    to { opacity: 1; }
}

@keyframes critGlow {
    0% { transform: scale(1.2); opacity: 0; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes fumbleShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* 3D-Tilt Effect for cards */
.race-card, .card, .hero-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.race-card:hover, .card:hover, .hero-card:hover {
    transform: perspective(1000px) rotateX(2deg) rotateY(2deg) translateY(-5px) !important;
    box-shadow: 0 15px 45px rgba(0,0,0,0.6) !important;
}
