/* --- UNIVERSAL RARITY COLORS --- */
.rarity-common    { color: #ffffff; font-weight: bold; } /* White */
.rarity-uncommon  { color: #4cc9f0; font-weight: bold; } /* Blue */
.rarity-rare      { color: #ff3333; font-weight: bold; } /* Red */
.rarity-epic      { color: #b57edc; font-weight: bold; } /* Purple */
.rarity-legendary { 
    color: #fcd34d; 
    font-weight: bold; 
    text-shadow: 0 0 5px rgba(255, 153, 0, 0.4);
}
.rarity-mythical {
    background: linear-gradient(90deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #9400d3);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: bold;
    animation: rainbowShine 3s linear infinite;
}
.rarity-exclusive { color: #13bd00; font-weight: bold; }


.random-btn {
    width: 100%;
    padding: 12px;
    font-weight: bold;
    font-size: 1.1em;
    background: #4cc9f0;
    color: #111;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.random-btn:hover {
    background: linear-gradient(90deg, #ff3333, #ff9933, #ffff00, #33cc33, #3399ff, #b57edc, #ff3333);
    background-size: 200% 200%;
    color: #fff;
    animation: seamlessRainbow 4s ease-in-out infinite;
}

/* It gently slides right, then gently slides left. No jumps. */
@keyframes seamlessRainbow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.section-title {
    color: #fff;
    border-bottom: 2px solid #ff3333;
    padding-bottom: 5px;
    margin-bottom: 10px;
    text-align: center;
}

details.control-group {
    background: #1a1a2e;
    border: 1px solid #4cc9f0;
    border-radius: 8px;
    margin-bottom: 15px;
}

details.control-group summary {
    background: #0f172a;
    padding: 12px;
    font-weight: bold;
    color: #ff3333;
    cursor: pointer;
    outline: none;
    font-size: 1.1em;
    text-align: center;
    border-radius: 8px 8px 0 0;
}

details.control-group > div { padding: 15px; }

.dropdown-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 15px;
}

.dropdown-item {
    display: flex;
    align-items: center;
    background: #0f172a;
    padding: 5px 10px;
    border-radius: 6px;
    border-left: 3px solid #ff3333;
}

.dropdown-item label {
    width: 65px;
    font-size: 0.85em;
    color: #94a3b8;
    text-transform: capitalize;
}

select {
    flex: 1;
    padding: 6px; 
    font-size: 0.85em;
    background: #16213e;
    color: #fff;
    border: 1px solid #4cc9f0;
    border-radius: 4px;
    cursor: pointer;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}

.stat-box {
    background: #0f172a;
    padding: 8px;
    border-radius: 6px;
    border-left: 4px solid #4cc9f0;
}

.stat-label { color: #aaa; font-size: 0.7em; }
.stat-value { font-weight: bold; font-size: 0.9em; margin-top: 2px; }

.rarity-mythical {
    background: linear-gradient(90deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #9400d3);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: bold;
    animation: rainbowShine 3s linear infinite;
}

@keyframes rainbowShine {
    to { background-position: 200% center; }
}

.help-icon {
    display: inline-block;
    background: #4cc9f0;
    color: #111;
    border-radius: 50%;
    width: 14px;
    height: 14px;
    text-align: center;
    font-size: 11px;
    line-height: 14px;
    font-weight: bold;
    cursor: help;
    margin-left: 5px;
    position: relative;
    font-family: Arial, sans-serif;
}

.help-icon .tooltip-text {
    visibility: hidden;
    width: 220px;
    background-color: #0f172a;
    color: #fff;
    text-align: center;
    border: 1px solid #ff3333;
    border-radius: 6px;
    padding: 10px;
    position: absolute;
    z-index: 100;
    bottom: 150%;
    left: 50%;
    margin-left: -110px;
    font-size: 12px;
    font-weight: normal;
    font-family: 'Courier New', Courier, monospace;
    opacity: 0;
    transition: opacity 0.2s;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
    pointer-events: none;
}

.help-icon:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* --- NAME INPUT --- */
.name-input {
    background: transparent;
    border: none;
    border-bottom: 2px dashed #4cc9f0;
    color: #ffffff;
    font-size: 1.5em;
    font-weight: bold;
    font-style: italic;
    font-family: 'Courier New', Courier, monospace;
    text-align: center;
    width: 200px;
    padding: 5px;
    outline: none;
    transition: 0.2s;
}
.name-input:focus {
    border-bottom: 2px solid #ff3333;
    background: #16213e;
    border-radius: 4px 4px 0 0;
}
.name-dice-btn {
    background: #1a1a2e;
    border: 1px solid #4cc9f0;
    color: white;
    font-size: 1.2em;
    border-radius: 5px;
    padding: 5px 8px;
    cursor: pointer;
    transition: 0.2s;
}
.name-dice-btn:hover {
    background: #ff3333;
    border-color: #ff3333;
    transform: scale(1.1);
}
.mythical-animated {
    animation: mythicalSpin 4s linear infinite;
}
@keyframes mythicalSpin {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

@keyframes rainbowShine {
    to { background-position: 200% center; }
}


/* Custom Nebula Colored Tooltip */
.nebula-tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
}

.nebula-tooltip .tooltip-content {
    visibility: hidden;
    background-color: #080c16;
    border: 1px solid #4cc9f0;
    border-radius: 8px;
    padding: 12px;
    position: absolute;
    z-index: 999;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.2s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.6);
    font-family: 'Courier New', Courier, monospace;
    line-height: 1.4;
    pointer-events: none; /* Prevents flickering */
}

/* The little arrow pointing down */
.nebula-tooltip .tooltip-content::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #4cc9f0 transparent transparent transparent;
}

.nebula-tooltip:hover .tooltip-content {
    visibility: visible;
    opacity: 1;
}


/* --- LIGHTBULB GLOW PULSE --- */
@keyframes bulbPulse {
    0% { opacity: 0.6; filter: brightness(1); }
    50% { opacity: 1.0; filter: brightness(1.3); }
    100% { opacity: 0.6; filter: brightness(1); }
}

.layer-glow-pulse {
    animation: bulbPulse 2.5s ease-in-out infinite;
}


#news-container {
    color: #cccccc !important; /* Force text to be visible against dark background */
}