* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --common: #9d9d9d;
    --uncommon: #1eff00;
    --rare: #1a88ee;
    --epic: #b35cf5;
    --legendary: #ff8000;

    --bg-dark: #0a0a12;
    --bg-stone: #1a1a24;
    --gold: #c9a227;
    --gold-light: #f0d060;
    --text: #e8e4d9;
    --text-dim: #8a8678;

    --whisp: #88ddff;
    --whisp-glow: rgba(136, 221, 255, 0.6);
}

html, body {
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Crimson Text', Georgia, serif;
    background: var(--bg-dark);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Ambient magical particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--gold-light);
    border-radius: 50%;
    opacity: 0;
    will-change: transform, opacity;
    animation: float-up 8s infinite;
    box-shadow: 0 0 6px var(--gold);
}

@keyframes float-up {
    0% { transform: translateY(100vh) scale(0); opacity: 0; }
    10% { opacity: 0.8; }
    90% { opacity: 0.8; }
    100% { transform: translateY(-20vh) scale(1); opacity: 0; }
}

/* Main content area */
.main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px 100px;
    position: relative;
    z-index: 1;
}

/* Title */
.title {
    font-family: 'Cinzel', serif;
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    font-weight: 700;
    color: var(--gold);
    text-shadow:
        0 0 20px rgba(201, 162, 39, 0.5),
        0 2px 4px rgba(0,0,0,0.8);
    letter-spacing: 0.15em;
    margin-bottom: 30px;
    text-align: center;
    will-change: text-shadow;
    animation: title-glow 3s ease-in-out infinite alternate;
}

@keyframes title-glow {
    from { text-shadow: 0 0 20px rgba(201, 162, 39, 0.3), 0 2px 4px rgba(0,0,0,0.8); }
    to { text-shadow: 0 0 30px rgba(201, 162, 39, 0.6), 0 0 60px rgba(201, 162, 39, 0.3), 0 2px 4px rgba(0,0,0,0.8); }
}

/* Daily buff button */
.invoke-section {
    text-align: center;
    margin-bottom: 40px;
}

.invoke-btn {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 16px 40px;
    background: linear-gradient(145deg, #2a2520, #1a1510);
    border: 2px solid var(--gold);
    color: var(--gold);
    cursor: pointer;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow:
        0 4px 15px rgba(0,0,0,0.4),
        inset 0 1px 0 rgba(255,255,255,0.1);
}

.invoke-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent, rgba(201, 162, 39, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.invoke-btn:hover:not(:disabled)::before {
    transform: translateX(100%);
}

.invoke-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow:
        0 6px 20px rgba(201, 162, 39, 0.3),
        inset 0 1px 0 rgba(255,255,255,0.1);
    text-shadow: 0 0 10px var(--gold);
}

.invoke-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: var(--text-dim);
    color: var(--text-dim);
}

.cooldown-text {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-top: 10px;
    font-style: italic;
}

/* WoW-style tooltip */
.tooltip {
    position: fixed;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    max-width: 300px;
}

.tooltip.visible {
    opacity: 1;
}

.tooltip-content {
    background: linear-gradient(180deg, #1a1a24 0%, #0d0d14 100%);
    border: 1px solid #4a4a5a;
    border-radius: 4px;
    padding: 12px 14px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.8);
}

.tooltip-name {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.tooltip-name.common { color: var(--common); }
.tooltip-name.uncommon { color: var(--uncommon); }
.tooltip-name.rare { color: var(--rare); }
.tooltip-name.epic { color: var(--epic); }
.tooltip-name.legendary { color: var(--legendary); }

.tooltip-rarity {
    font-size: 0.8rem;
    text-transform: capitalize;
    margin-bottom: 8px;
}

.tooltip-rarity.common { color: var(--common); }
.tooltip-rarity.uncommon { color: var(--uncommon); }
.tooltip-rarity.rare { color: var(--rare); }
.tooltip-rarity.epic { color: var(--epic); }
.tooltip-rarity.legendary { color: var(--legendary); }

.tooltip-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #4a4a5a, transparent);
    margin: 8px 0;
}

.tooltip-effect {
    font-size: 0.9rem;
    color: #1eff00;
    line-height: 1.4;
    margin-bottom: 8px;
}

.tooltip-whisp-bonus {
    font-size: 0.85rem;
    color: var(--whisp);
    line-height: 1.4;
    margin-bottom: 8px;
    font-style: italic;
    text-shadow: 0 0 8px rgba(136, 221, 255, 0.4);
}

.tooltip-duration {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.tooltip-flavor {
    font-size: 0.8rem;
    color: #ffd100;
    font-style: italic;
    margin-top: 8px;
    line-height: 1.3;
}

@keyframes reset-flash {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

/* Focus indicators for keyboard navigation */
.invoke-btn:focus-visible,
.subscribe-btn:focus-visible {
    outline: 2px solid var(--gold-light);
    outline-offset: 3px;
}

.buff:focus-visible {
    outline: 2px solid var(--gold-light);
    outline-offset: 2px;
    border-radius: 6px;
}

.well-prompt:focus-visible {
    outline: 2px solid var(--gold-light);
    outline-offset: 3px;
}

.buff-choice-card:focus-visible {
    outline: 2px solid var(--gold-light);
    outline-offset: 3px;
}

.disclaimer-toggle:focus-visible,
.footer-link:focus-visible {
    outline: 2px solid var(--gold-light);
    outline-offset: 2px;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Responsive */
@media (max-width: 600px) {
    .main-content {
        padding: 30px 15px 100px;
    }

    .invoke-btn {
        padding: 14px 30px;
        font-size: 1rem;
    }

    .subscribe-btn {
        font-size: 0.8rem;
        padding: 8px 16px;
    }
}
