/* style.css - 4-space indentation */
:root {
    --gold: #c9a84c;
    --gold-light: #f0d080;
    --gold-dark: #7a5c1e;
    --crimson: #8b1a1a;
    --deep: #07060e;
    --void: #0d0b1a;
    --mist: #1a162e;
    --rune: #2a2248;
    --silver: #b8c4d0;
    --glow-gold: rgba(201,168,76,0.35);
    --glow-blue: rgba(100,160,255,0.25);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--deep);
    color: var(--silver);
    font-family: 'Lato', sans-serif;
    font-weight: 300;
    overflow-x: hidden;
    cursor: default;
}

/* SVG ICONS */
.icon-svg {
    display: inline-block;
    width: 1.2em;
    height: 1.2em;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: middle;
}

.icon-large {
    width: 2.2rem;
    height: 2.2rem;
    stroke-width: 1.8;
}

.feature-icon .icon-svg {
    width: 2.2rem;
    height: 2.2rem;
    filter: drop-shadow(0 0 6px var(--gold));
}

.rank-gem .icon-svg {
    width: 2rem;
    height: 2rem;
    stroke: var(--gold-light);
    stroke-width: 1.5;
}

.world-bg .icon-svg {
    width: 5rem;
    height: 5rem;
    stroke: rgba(255,215,120,0.3);
    stroke-width: 1;
}

.supporter-badge .icon-svg {
    width: 0.9rem;
    height: 0.9rem;
    margin-right: 0.3rem;
    stroke: var(--gold);
}

.founder-avatar .icon-svg {
    width: 2.5rem;
    height: 2.5rem;
    stroke: var(--gold-light);
}

.discord-icon .icon-svg {
    width: 3rem;
    height: 3rem;
    stroke: #7289da;
}

/* CUSTOM CURSOR */
.cursor {
    position: fixed;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--gold);
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform .1s, opacity .2s;
    mix-blend-mode: screen;
}

.cursor-ring {
    position: fixed;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--gold);
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: transform .25s ease, width .2s, height .2s;
    opacity: 0.5;
}

/* STARS BACKGROUND */
#stars-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* SCROLLBAR */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #0a0814;
}

::-webkit-scrollbar-thumb {
    background: var(--gold-dark);
    border-radius: 3px;
}

/* NAVIGATION */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 3rem;
    background: linear-gradient(180deg, rgba(7,6,14,0.95) 0%, transparent 100%);
    backdrop-filter: blur(4px);
    border-bottom: 1px solid rgba(201,168,76,0.12);
    transition: background .3s;
}

nav.scrolled {
    background: rgba(7,6,14,0.97);
}

.nav-logo {
    font-family: 'Cinzel Decorative', serif;
    font-size: 1.1rem;
    color: var(--gold);
    text-shadow: 0 0 20px var(--glow-gold);
    letter-spacing: .05em;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    font-family: 'Cinzel', serif;
    font-size: .75rem;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--silver);
    text-decoration: none;
    transition: color .2s;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--gold);
    transition: width .3s;
}

.nav-links a:hover {
    color: var(--gold-light);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-cta {
    font-family: 'Cinzel', serif;
    font-size: .75rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: .55rem 1.6rem;
    border: 1px solid var(--gold);
    color: var(--gold);
    background: transparent;
    cursor: pointer;
    transition: all .3s;
    text-decoration: none;
    clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
}

.nav-cta:hover {
    background: var(--gold);
    color: var(--deep);
}

/* HERO SECTION */
#hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 1;
    overflow: hidden;
    padding: 0 2rem;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 80% 60% at 50% 40%, rgba(42,34,72,0.7) 0%, transparent 70%),
        radial-gradient(ellipse 50% 40% at 20% 80%, rgba(139,26,26,0.25) 0%, transparent 60%),
        radial-gradient(ellipse 40% 30% at 80% 70%, rgba(60,80,160,0.2) 0%, transparent 60%),
        var(--deep);
}

.hero-rune-ring {
    position: absolute;
    width: 700px;
    height: 700px;
    border: 1px solid rgba(201,168,76,0.07);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: slowspin 60s linear infinite;
}

.hero-rune-ring::before {
    content: '';
    position: absolute;
    inset: 30px;
    border-radius: 50%;
    border: 1px solid rgba(201,168,76,0.05);
}

.hero-rune-ring::after {
    content: '';
    position: absolute;
    inset: 60px;
    border-radius: 50%;
    border: 1px dashed rgba(201,168,76,0.04);
}

.hero-tag {
    font-family: 'Cinzel', serif;
    font-size: .7rem;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeUp .8s .3s forwards;
}

.hero-tag span {
    margin: 0 .8rem;
    opacity: .4;
}

h1.hero-title {
    font-family: 'Cinzel Decorative', serif;
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 900;
    line-height: 1;
    color: var(--gold-light);
    text-shadow: 0 0 60px rgba(201,168,76,0.4), 0 0 120px rgba(201,168,76,0.15);
    margin-bottom: .5rem;
    opacity: 0;
    animation: fadeUp .8s .5s forwards;
}

.hero-title-sub {
    font-family: 'Cinzel Decorative', serif;
    font-size: clamp(1rem, 2.5vw, 1.8rem);
    font-weight: 400;
    color: var(--gold);
    letter-spacing: .15em;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeUp .8s .7s forwards;
}

.hero-desc {
    max-width: 520px;
    line-height: 1.8;
    color: rgba(184,196,208,0.7);
    margin: 0 auto 3rem;
    font-size: .95rem;
    opacity: 0;
    animation: fadeUp .8s .9s forwards;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeUp .8s 1.1s forwards;
}

.btn-primary {
    font-family: 'Cinzel', serif;
    font-size: .8rem;
    letter-spacing: .15em;
    text-transform: uppercase;
    padding: .9rem 2.5rem;
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: var(--deep);
    border: none;
    cursor: pointer;
    clip-path: polygon(12px 0%, 100% 0%, calc(100% - 12px) 100%, 0% 100%);
    text-decoration: none;
    display: inline-block;
    transition: all .3s;
    box-shadow: 0 0 30px rgba(201,168,76,0.3);
}

.btn-primary:hover {
    box-shadow: 0 0 50px rgba(201,168,76,0.6);
    transform: translateY(-2px);
}

.btn-secondary {
    font-family: 'Cinzel', serif;
    font-size: .8rem;
    letter-spacing: .15em;
    text-transform: uppercase;
    padding: .9rem 2.5rem;
    background: transparent;
    color: var(--silver);
    border: 1px solid rgba(184,196,208,0.3);
    cursor: pointer;
    clip-path: polygon(12px 0%, 100% 0%, calc(100% - 12px) 100%, 0% 100%);
    text-decoration: none;
    display: inline-block;
    transition: all .3s;
}

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

.hero-ip {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: 'Cinzel', serif;
    font-size: .75rem;
    letter-spacing: .12em;
    color: rgba(201,168,76,0.6);
    opacity: 0;
    animation: fadeUp .8s 1.3s forwards;
    cursor: pointer;
}

.hero-ip:hover {
    color: var(--gold);
}

.hero-ip .ip-badge {
    background: rgba(201,168,76,0.08);
    border: 1px solid rgba(201,168,76,0.2);
    padding: .4rem 1rem;
    letter-spacing: .08em;
    color: var(--gold-light);
    font-size: .8rem;
}

.scroll-hint {
    position: absolute;
    bottom: 1.2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .4rem;
    opacity: 0;
    animation: fadeIn 1s 2s forwards;
}

.scroll-hint span {
    font-size: .6rem;
    letter-spacing: .2em;
    color: rgba(201,168,76,0.4);
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 1px solid rgba(201,168,76,0.3);
    border-bottom: 1px solid rgba(201,168,76,0.3);
    transform: rotate(45deg);
    animation: bounce 2s infinite;
}

/* RUNE DIVIDER */
.rune-divider {
    position: relative;
    text-align: center;
    padding: 1.5rem 0;
    z-index: 1;
}

.rune-divider::before,
.rune-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 80px);
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(201,168,76,0.3));
}

.rune-divider::before {
    left: 0;
}

.rune-divider::after {
    right: 0;
    background: linear-gradient(90deg, rgba(201,168,76,0.3), transparent);
}

.rune-divider-icon {
    display: inline-block;
    color: var(--gold);
    text-shadow: 0 0 20px var(--glow-gold);
}

.rune-divider-icon .icon-svg {
    width: 1.8rem;
    height: 1.8rem;
    stroke: var(--gold);
}

/* SECTION HEADERS */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
    z-index: 1;
}

.section-label {
    font-family: 'Cinzel', serif;
    font-size: .65rem;
    letter-spacing: .35em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: .8rem;
    display: block;
    opacity: .8;
}

.section-title {
    font-family: 'Cinzel Decorative', serif;
    font-size: clamp(1.8rem, 4vw, 3rem);
    color: var(--gold-light);
    text-shadow: 0 0 40px rgba(201,168,76,0.25);
    line-height: 1.2;
}

.section-subtitle {
    margin-top: 1rem;
    color: rgba(184,196,208,0.6);
    font-size: .9rem;
    line-height: 1.7;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* GALLERY */
#gallery {
    position: relative;
    z-index: 1;
    padding: 6rem 0;
    overflow: hidden;
}

.gallery-track-wrap {
    overflow: hidden;
    position: relative;
}

.gallery-track-wrap::before,
.gallery-track-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    width: 200px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.gallery-track-wrap::before {
    left: 0;
    background: linear-gradient(90deg, var(--deep), transparent);
}

.gallery-track-wrap::after {
    right: 0;
    background: linear-gradient(270deg, var(--deep), transparent);
}

.gallery-track {
    display: flex;
    gap: 1.5rem;
    animation: scrollTrack 40s linear infinite;
    width: max-content;
}

.gallery-track:hover {
    animation-play-state: paused;
}

.gallery-card {
    position: relative;
    width: 320px;
    height: 220px;
    flex-shrink: 0;
    border: 1px solid rgba(201,168,76,0.12);
    overflow: hidden;
    cursor: pointer;
    clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 15px, 100% 100%, 15px 100%, 0 calc(100% - 15px));
}

.gallery-card .card-bg {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a162e, #0d0b1a);
}

.gallery-card .icon-svg {
    width: 5rem;
    height: 5rem;
    stroke: var(--gold);
    opacity: 0.7;
}

.gallery-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(7,6,14,.85) 0%, transparent 60%);
    transition: opacity .3s;
}

.gallery-card:hover .gallery-card-overlay {
    opacity: .6;
}

.gallery-card-label {
    position: absolute;
    bottom: 1rem;
    left: 1.2rem;
    font-family: 'Cinzel', serif;
    font-size: .75rem;
    letter-spacing: .1em;
    color: var(--gold-light);
}

/* FEATURES */
#features {
    position: relative;
    z-index: 1;
    padding: 6rem 3rem;
    background: linear-gradient(180deg, transparent 0%, rgba(13,11,26,0.8) 20%, rgba(13,11,26,0.8) 80%, transparent 100%);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    position: relative;
    background: rgba(26,22,46,0.5);
    border: 1px solid rgba(201,168,76,0.1);
    padding: 2rem 1.8rem;
    overflow: hidden;
    transition: transform .3s, border-color .3s, box-shadow .3s;
    clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(201,168,76,0.35);
    box-shadow: 0 8px 40px rgba(201,168,76,0.1);
}

.feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(201,168,76,0.04) 0%, transparent 60%);
    transition: opacity .3s;
}

.feature-card:hover::before {
    opacity: 2;
}

.feature-icon {
    margin-bottom: 1.2rem;
    display: block;
}

.feature-title {
    font-family: 'Cinzel', serif;
    font-size: .95rem;
    letter-spacing: .08em;
    color: var(--gold-light);
    margin-bottom: .7rem;
}

.feature-desc {
    font-size: .85rem;
    line-height: 1.7;
    color: rgba(184,196,208,0.65);
}

.feature-tag {
    display: inline-block;
    margin-top: 1rem;
    font-family: 'Cinzel', serif;
    font-size: .6rem;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--gold-dark);
    border: 1px solid rgba(201,168,76,0.2);
    padding: .25rem .7rem;
}

/* RANKS */
#ranks {
    position: relative;
    z-index: 1;
    padding: 6rem 3rem;
}

.ranks-path {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
}

.rank-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    cursor: pointer;
}

.rank-connector {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, rgba(201,168,76,0.4), rgba(201,168,76,0.1));
    margin-top: -32px;
}

.rank-gem {
    width: 64px;
    height: 64px;
    background: var(--void);
    border: 2px solid var(--gold-dark);
    transform: rotate(45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .3s;
    box-shadow: 0 0 0 rgba(201,168,76,0);
    position: relative;
}

.rank-gem span {
    transform: rotate(-45deg);
    display: flex;
}

.rank-node:hover .rank-gem {
    border-color: var(--gold);
    box-shadow: 0 0 20px rgba(201,168,76,0.4);
    transform: rotate(45deg) scale(1.1);
}

.rank-name {
    font-family: 'Cinzel', serif;
    font-size: .7rem;
    letter-spacing: .1em;
    color: var(--gold);
    margin-top: .8rem;
    text-align: center;
}

.rank-time {
    font-size: .6rem;
    color: rgba(184,196,208,0.4);
    margin-top: .2rem;
    letter-spacing: .05em;
    text-align: center;
}

.rank-node.locked .rank-gem {
    border-color: rgba(201,168,76,0.2);
}

.rank-node.locked .rank-name {
    color: rgba(201,168,76,0.4);
}

/* ==================== MYSTICAL RANK TOOLTIPS ==================== */
.rank-node {
    position: relative;
    cursor: pointer;
}

.rank-tooltip {
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    width: 280px;
    padding: 1.2rem;
    background: linear-gradient(135deg, rgba(26, 22, 46, 0.98), rgba(13, 11, 26, 0.98));
    border: 1px solid var(--gold);
    border-radius: 0;
    clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 15px, 100% 100%, 15px 100%, 0 calc(100% - 15px));
    color: var(--silver);
    font-family: 'Lato', sans-serif;
    font-size: 0.85rem;
    line-height: 1.5;
    text-align: center;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.8),
        0 0 30px rgba(201, 168, 76, 0.2),
        inset 0 0 30px rgba(201, 168, 76, 0.1);
    backdrop-filter: blur(10px);
    border-image: linear-gradient(135deg, var(--gold), var(--gold-dark)) 1;
}

.rank-tooltip::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 10px;
    border-style: solid;
    border-color: var(--gold) transparent transparent transparent;
    filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.3));
}

.rank-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px;
    border-style: solid;
    border-color: rgba(26, 22, 46, 0.98) transparent transparent transparent;
    z-index: 1;
}

.rank-node:hover .rank-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-15px);
}

/* Tooltip Ornaments */
.rank-tooltip-ornament {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.rank-tooltip-ornament.top {
    top: 0;
}

.rank-tooltip-ornament.bottom {
    bottom: 0;
}

/* Tooltip Title */
.rank-tooltip-title {
    font-family: 'Cinzel Decorative', serif;
    font-size: 1.2rem;
    color: var(--gold-light);
    margin-bottom: 0.8rem;
    letter-spacing: 0.1em;
    text-shadow: 0 0 10px var(--glow-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.rank-tooltip-icon {
    font-size: 1.2rem;
    filter: drop-shadow(0 0 5px var(--gold));
}

/* Tooltip Quote */
.rank-tooltip-quote {
    font-style: italic;
    color: var(--gold);
    font-size: 0.8rem;
    margin-bottom: 0.8rem;
    padding: 0.5rem;
    background: rgba(201, 168, 76, 0.1);
    border-left: 2px solid var(--gold);
    border-right: 2px solid var(--gold);
    font-family: 'Cinzel', serif;
}

/* Tooltip Lore */
.rank-tooltip-lore {
    color: rgba(184, 196, 208, 0.9);
    margin-bottom: 1rem;
    font-size: 0.8rem;
    line-height: 1.6;
    padding: 0 0.5rem;
}

/* Tooltip Stats */
.rank-tooltip-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(201, 168, 76, 0.2);
}

.rank-tooltip-stat {
    text-align: center;
    flex: 1;
}

.rank-tooltip-stat .stat-label {
    display: block;
    color: rgba(184, 196, 208, 0.5);
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.2rem;
}

.rank-tooltip-stat .stat-value {
    display: block;
    color: var(--gold-light);
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    font-weight: 600;
}

.rank-tooltip-stat .stat-value.locked {
    color: #ef4444;
}

.rank-tooltip-stat .stat-value.unlocked {
    color: #4ade80;
}

/* Tooltip Abilities */
.rank-tooltip-abilities {
    margin-bottom: 1rem;
    text-align: left;
}

.abilities-title {
    font-family: 'Cinzel', serif;
    color: var(--gold);
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    margin-bottom: 0.5rem;
    text-align: center;
    text-transform: uppercase;
}

.abilities-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.abilities-list li {
    padding: 0.3rem 0;
    color: var(--silver);
    font-size: 0.75rem;
    border-bottom: 1px solid rgba(201, 168, 76, 0.1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.abilities-list li:last-child {
    border-bottom: none;
}

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

/* Tooltip Requirement */
.rank-tooltip-requirement {
    padding: 0.5rem;
    background: rgba(201, 168, 76, 0.1);
    border: 1px solid rgba(201, 168, 76, 0.2);
    font-size: 0.7rem;
    text-align: center;
}

.requirement-label {
    color: var(--gold);
    font-family: 'Cinzel', serif;
    margin-right: 0.3rem;
}

.requirement-text {
    color: var(--silver);
}

/* Mobile touch support */
@media (max-width: 768px) {
    .rank-tooltip {
        width: 240px;
        padding: 1rem;
        font-size: 0.75rem;
        bottom: 120%;
    }
    
    .rank-tooltip-title {
        font-size: 1rem;
    }
    
    .rank-tooltip-quote {
        font-size: 0.7rem;
    }
    
    .abilities-list li {
        font-size: 0.7rem;
    }
    
    /* On mobile, show tooltip on click instead of hover */
    .rank-node .rank-tooltip {
        transition: none;
    }
    
    .rank-node.active .rank-tooltip {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(-15px);
    }
}

/* Animation for tooltip entrance */
@keyframes tooltipGlow {
    0%, 100% {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 30px rgba(201, 168, 76, 0.2);
    }
    50% {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 50px rgba(201, 168, 76, 0.4);
    }
}

.rank-node:hover .rank-tooltip {
    animation: tooltipGlow 2s infinite;
}

/* Tooltip positioning for edge cases */
.rank-node:first-child .rank-tooltip {
    transform: translateX(-30%) translateY(-10px);
}

.rank-node:first-child:hover .rank-tooltip {
    transform: translateX(-30%) translateY(-15px);
}

.rank-node:first-child .rank-tooltip::before,
.rank-node:first-child .rank-tooltip::after {
    left: 30%;
}

.rank-node:last-child .rank-tooltip {
    transform: translateX(-70%) translateY(-10px);
}

.rank-node:last-child:hover .rank-tooltip {
    transform: translateX(-70%) translateY(-15px);
}

.rank-node:last-child .rank-tooltip::before,
.rank-node:last-child .rank-tooltip::after {
    left: 70%;
}

/* Additional styles for tooltip icons */
.tooltip-title-icon {
    width: 1.5rem;
    height: 1.5rem;
    stroke: var(--gold-light);
    margin-right: 0.5rem;
}

.rank-tooltip-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.stat-icon {
    width: 1.2rem;
    height: 1.2rem;
    stroke: var(--gold);
    opacity: 0.8;
}

.abilities-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.abilities-title .icon-svg {
    width: 1rem;
    height: 1rem;
    stroke: var(--gold);
}

.requirement-icon {
    width: 1rem;
    height: 1rem;
    stroke: var(--gold);
    margin-right: 0.3rem;
    vertical-align: middle;
}

.rank-tooltip-requirement {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    flex-wrap: wrap;
}

/* Hover effects for icons */
.rank-tooltip-stat:hover .stat-icon {
    stroke: var(--gold-light);
    transform: scale(1.1);
    transition: all 0.3s ease;
}

.abilities-title:hover .icon-svg {
    animation: slowspin 3s linear infinite;
}

@keyframes slowspin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* LORE */
#lore {
    position: relative;
    z-index: 1;
    padding: 6rem 3rem;
    background:
        radial-gradient(ellipse 60% 50% at 50% 50%, rgba(42,34,72,0.5) 0%, transparent 70%),
        linear-gradient(180deg, transparent 0%, rgba(13,11,26,0.9) 50%, transparent 100%);
}

.lore-inner {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.lore-inner::before,
.lore-inner::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(180deg, transparent, rgba(201,168,76,0.2), transparent);
}

.lore-inner::before {
    left: 0;
}

.lore-inner::after {
    right: 0;
}

.lore-text {
    padding: 2rem 3rem;
    font-size: 1rem;
    line-height: 2;
    color: rgba(184,196,208,0.75);
    text-align: center;
    font-style: italic;
}

.lore-text p+p {
    margin-top: 1.5rem;
}

.lore-text strong {
    color: var(--gold-light);
    font-style: normal;
    font-weight: 400;
}

.lore-audio-container {
    text-align: center;
    margin-bottom: 1rem;
}

.audio-mystic {
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold-light);
    font-family: 'Cinzel', serif;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    padding: 0.6rem 1.5rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
    transition: all 0.3s;
    margin-bottom: 1rem;
}

.audio-mystic:hover {
    background: rgba(201,168,76,0.15);
    border-color: var(--gold-light);
    box-shadow: 0 0 20px var(--glow-gold);
}

.audio-mystic .icon-svg {
    width: 1rem;
    height: 1rem;
}

/* WORLDS */
#worlds {
    position: relative;
    z-index: 1;
    padding: 6rem 3rem;
}

.worlds-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

@media(max-width:600px) {
    .worlds-grid {
        grid-template-columns: 1fr;
    }
}

.world-card {
    position: relative;
    overflow: hidden;
    height: 200px;
    border: 1px solid rgba(201,168,76,0.1);
    cursor: pointer;
    transition: border-color .3s, box-shadow .3s;
}

.world-card:hover {
    border-color: rgba(201,168,76,0.4);
    box-shadow: 0 0 30px rgba(201,168,76,0.1);
}

.world-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.4s;
    display: block; /* was flex, but now it's a background container */
}

.world-card:hover .world-bg {
    transform: scale(1.05);
}

/* Optional: darken background image slightly for better text contrast */
.world-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
    pointer-events: none;
}

.world-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(7,6,14,.92) 0%, rgba(7,6,14,.5) 60%, rgba(7,6,14,.3) 100%);
}

.world-content {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    right: 1.5rem;
}

.world-name {
    font-family: 'Cinzel Decorative', serif;
    font-size: 1.1rem;
    color: var(--gold-light);
    margin-bottom: .4rem;
}

.world-req {
    font-size: .7rem;
    letter-spacing: .1em;
    color: rgba(201,168,76,0.5);
    font-family: 'Cinzel', serif;
}

/* World lock icons */
.world-lock {
    position: absolute;
    top: 1rem;
    right: 1rem;
    opacity: 0.7;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 5;
}

.world-lock .icon-svg {
    width: 1.5rem;
    height: 1.5rem;
    stroke: var(--gold);
    stroke-width: 1.8;
}

.world-card:hover .world-lock {
    opacity: 1;
    transform: scale(1.1);
}

.world-card.unlocked .world-lock .icon-svg {
    stroke: #4ade80; /* Green for unlocked */
}

.world-card .world-lock .icon-svg {
    stroke: #ef4444; /* Red for locked */
}

.world-card.unlocked .world-lock {
    opacity: 0.4;
}

.world-card.unlocked:hover .world-lock {
    opacity: 0.8;
}

/* Special styling for mystery realm icon */
.world-card:last-child .world-lock .icon-svg {
    stroke: #c9a84c; /* Gold for mystery */
}

/* STATUS */
#status {
    position: relative;
    z-index: 1;
    padding: 5rem 3rem;
}

.status-panel {
    max-width: 700px;
    margin: 0 auto;
    background: rgba(13,11,26,0.8);
    border: 1px solid rgba(201,168,76,0.15);
    padding: 3rem;
    clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 24px 100%, 0 calc(100% - 24px));
}

.status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(201,168,76,0.07);
}

.status-row:last-child {
    border-bottom: none;
}

.status-label {
    font-family: 'Cinzel', serif;
    font-size: .75rem;
    letter-spacing: .12em;
    color: rgba(184,196,208,0.5);
    text-transform: uppercase;
}

.status-value {
    font-family: 'Cinzel', serif;
    font-size: .85rem;
    color: var(--gold-light);
    letter-spacing: .05em;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 8px #4ade80;
    margin-right: .6rem;
    animation: pulse-dot 2s infinite;
}

.status-bar {
    width: 120px;
    height: 4px;
    background: rgba(201,168,76,0.1);
    border-radius: 2px;
    overflow: hidden;
}

.status-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold));
    border-radius: 2px;
}

.server-ip-box {
    margin-top: 2.5rem;
    text-align: center;
    background: rgba(201,168,76,0.04);
    border: 1px solid rgba(201,168,76,0.15);
    padding: 1.5rem;
}

.server-ip-label {
    font-family: 'Cinzel', serif;
    font-size: .65rem;
    letter-spacing: .2em;
    color: var(--gold);
    margin-bottom: .6rem;
    display: block;
    text-transform: uppercase;
}

.server-ip-val {
    font-family: 'Cinzel Decorative', serif;
    font-size: 0.9rem;
    color: var(--gold-light);
    cursor: pointer;
    transition: text-shadow .2s;
}

.server-ip-val:hover {
    text-shadow: 0 0 20px var(--glow-gold);
}

.copy-hint {
    font-size: .65rem;
    color: rgba(201,168,76,0.4);
    margin-top: .4rem;
    display: block;
    letter-spacing: .1em;
}

/* FAQ */
#faq {
    position: relative;
    z-index: 1;
    padding: 5rem 3rem;
}

.faq-list {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: .8rem;
}

.faq-item {
    background: rgba(26,22,46,0.4);
    border: 1px solid rgba(201,168,76,0.08);
    overflow: hidden;
    transition: border-color .3s;
}

.faq-item.open {
    border-color: rgba(201,168,76,0.25);
}

.faq-q {
    font-family: 'Cinzel', serif;
    font-size: .85rem;
    letter-spacing: .05em;
    color: var(--silver);
    padding: 1.2rem 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color .2s;
    user-select: none;
}

.faq-item.open .faq-q {
    color: var(--gold-light);
}

.faq-arrow {
    width: 16px;
    height: 16px;
    border-right: 1px solid var(--gold);
    border-bottom: 1px solid var(--gold);
    transform: rotate(45deg);
    transition: transform .3s;
    flex-shrink: 0;
}

.faq-item.open .faq-arrow {
    transform: rotate(-135deg);
}

.faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height .4s ease, padding .3s;
    font-size: .85rem;
    line-height: 1.7;
    color: rgba(184,196,208,0.65);
    padding: 0 1.5rem;
}

.faq-item.open .faq-a {
    max-height: 200px;
    padding: .2rem 1.5rem 1.2rem;
}

/* SUPPORTERS */
#supporters {
    position: relative;
    z-index: 1;
    padding: 4rem 3rem;
}

.supporters-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    max-width: 700px;
    margin: 2rem auto 0;
}

.supporter-badge {
    font-family: 'Cinzel', serif;
    font-size: .75rem;
    letter-spacing: .1em;
    color: var(--gold);
    border: 1px solid rgba(201,168,76,0.2);
    padding: .5rem 1.2rem;
    background: rgba(201,168,76,0.04);
    transition: all .2s;
    display: inline-flex;
    align-items: center;
}

.supporter-badge:hover {
    background: rgba(201,168,76,0.1);
    border-color: rgba(201,168,76,0.5);
    box-shadow: 0 0 15px rgba(201,168,76,0.15);
}

/* FOUNDERS - Unique Fantasy Style */
.founders-row {
    display: flex;
    gap: 2.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.founder-card-fantasy {
    width: 260px;
    background: rgba(10, 8, 20, 0.75);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(201, 168, 76, 0.25);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(201, 168, 76, 0.1) inset;
    clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
    transition: all 0.4s cubic-bezier(0.2, 0.9, 0.3, 1);
    position: relative;
    overflow: visible;
}

.founder-card-fantasy::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(201, 168, 76, 0.15), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
    z-index: 0;
}

.founder-card-fantasy:hover {
    transform: translateY(-8px);
    border-color: var(--gold-light);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8), 0 0 30px rgba(201, 168, 76, 0.3);
}

.founder-card-fantasy:hover::before {
    opacity: 1;
}

/* Runic frame around head */
.founder-head-frame {
    position: relative;
    padding: 2rem 1.5rem 1rem 1.5rem;
    display: flex;
    justify-content: center;
    border-bottom: 1px solid rgba(201, 168, 76, 0.2);
    background: linear-gradient(180deg, rgba(42, 34, 72, 0.5) 0%, transparent 100%);
}

.founder-head-frame::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 20%;
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: 0.3;
}

.founder-rune-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140px;
    height: 140px;
    border: 1px solid rgba(201, 168, 76, 0.2);
    border-radius: 50%;
    animation: slowSpin 30s linear infinite;
    pointer-events: none;
}

.founder-rune-ring::before,
.founder-rune-ring::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    border: 1px dashed rgba(201, 168, 76, 0.15);
}

.founder-rune-ring::before {
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    animation: slowSpinReverse 20s linear infinite;
}

.founder-rune-ring::after {
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    border: 1px dotted rgba(201, 168, 76, 0.1);
}

.founder-head {
    display: block;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 3px solid var(--gold-dark);
    image-rendering: pixelated;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
    box-shadow: 0 0 20px rgba(201, 168, 76, 0.4);
    position: relative;
    z-index: 2;
    background: var(--deep); /* fallback while loading */
}

.founder-card-fantasy:hover .founder-head {
    transform: scale(1.05);
    border-color: var(--gold-light);
    box-shadow: 0 0 30px var(--gold);
}

.founder-info {
    padding: 1.5rem 1.2rem 1.8rem;
    text-align: center;
    position: relative;
    z-index: 2;
}

.founder-name-large {
    font-family: 'Cinzel Decorative', serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--gold-light);
    text-shadow: 0 0 15px rgba(201, 168, 76, 0.5);
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
    line-height: 1.2;
}

.founder-badge {
    display: inline-block;
    font-family: 'Cinzel', serif;
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    color: var(--gold);
    background: rgba(201, 168, 76, 0.1);
    padding: 0.4rem 1.2rem;
    border: 1px solid rgba(201, 168, 76, 0.3);
    box-shadow: 0 0 10px rgba(201, 168, 76, 0.2);
    text-transform: uppercase;
    margin-bottom: 1rem;
    clip-path: polygon(0 0, 90% 0, 100% 30%, 100% 100%, 10% 100%, 0 70%);
}

.founder-details {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding-top: 1rem;
    border-top: 1px dashed rgba(201, 168, 76, 0.3);
}

.founder-detail-item {
    font-size: 0.75rem;
    color: var(--silver);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.founder-card-fantasy:hover .founder-detail-item {
    opacity: 1;
}

.founder-detail-item .icon-svg {
    width: 1rem;
    height: 1rem;
    stroke: var(--gold);
}

/* Animations */
@keyframes slowSpin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes slowSpinReverse {
    from { transform: rotate(0deg); }
    to { transform: rotate(-360deg); }
}

/* Mobile */
@media (max-width: 768px) {
    .founder-card-fantasy {
        width: 220px;
    }
    .founder-head {
        width: 90px;
        height: 90px;
    }
    .founder-rune-ring {
        width: 120px;
        height: 120px;
    }
    .founder-name-large {
        font-size: 1.2rem;
    }
}

/* DISCORD */
#discord {
    position: relative;
    z-index: 1;
    padding: 6rem 3rem;
    text-align: center;
    background: radial-gradient(ellipse 80% 60% at 50% 50%, rgba(88,101,242,0.08) 0%, transparent 70%);
}

.discord-card {
    max-width: 600px;
    margin: 0 auto;
    background: rgba(13,11,26,0.8);
    border: 1px solid rgba(88,101,242,0.2);
    padding: 3.5rem;
    clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 24px 100%, 0 calc(100% - 24px));
}

.discord-icon {
    margin-bottom: 1.5rem;
    display: block;
}

.discord-title {
    font-family: 'Cinzel Decorative', serif;
    font-size: 1.5rem;
    color: #7289da;
    margin-bottom: 1rem;
}

.discord-desc {
    font-size: .9rem;
    line-height: 1.7;
    color: rgba(184,196,208,0.6);
    margin-bottom: 2rem;
}

.discord-stats {
    display: flex;
    gap: 3rem;
    justify-content: center;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.discord-stat span:first-child {
    display: block;
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: var(--gold-light);
    margin-bottom: .2rem;
}

.discord-stat span:last-child {
    font-size: .7rem;
    letter-spacing: .1em;
    color: rgba(184,196,208,0.4);
    text-transform: uppercase;
}

.btn-discord {
    font-family: 'Cinzel', serif;
    font-size: .8rem;
    letter-spacing: .15em;
    text-transform: uppercase;
    padding: .9rem 2.5rem;
    background: linear-gradient(135deg, #4752c4, #7289da);
    color: #fff;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all .3s;
    clip-path: polygon(12px 0%, 100% 0%, calc(100% - 12px) 100%, 0% 100%);
    box-shadow: 0 0 20px rgba(114,137,218,0.3);
}

.btn-discord:hover {
    box-shadow: 0 0 40px rgba(114,137,218,0.5);
    transform: translateY(-2px);
}

/* FOOTER */
footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid rgba(201,168,76,0.1);
    padding: 3rem;
    background: rgba(7,6,14,0.95);
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-logo {
    font-family: 'Cinzel Decorative', serif;
    font-size: .95rem;
    color: var(--gold);
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    flex-wrap: wrap;
}

.footer-links a {
    font-family: 'Cinzel', serif;
    font-size: .7rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(184,196,208,0.4);
    text-decoration: none;
    transition: color .2s;
}

.footer-links a:hover {
    color: var(--gold);
}

.footer-copy {
    font-size: .7rem;
    color: rgba(184,196,208,0.25);
    letter-spacing: .05em;
}

/* TOAST */
#toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(26,22,46,0.95);
    border: 1px solid rgba(201,168,76,0.3);
    font-family: 'Cinzel', serif;
    font-size: .75rem;
    letter-spacing: .1em;
    color: var(--gold);
    padding: .8rem 2rem;
    z-index: 9999;
    opacity: 0;
    transition: all .3s;
    pointer-events: none;
    clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
}

#toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ANIMATIONS */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slowspin {
    from {
        transform: translate(-50%, -50%) rotate(0);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes scrollTrack {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: rotate(45deg) translateY(0);
    }
    50% {
        transform: rotate(45deg) translateY(5px);
    }
}

@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: .4;
    }
}

/* REVEAL ON SCROLL – enhanced */
.reveal {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    transition: opacity 0.6s cubic-bezier(0.2, 0.9, 0.4, 1.1),
                transform 0.6s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    will-change: opacity, transform;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* RESPONSIVE */
@media(max-width:768px) {
    nav {
        padding: 1rem 1.5rem;
    }
    .nav-links {
        display: none;
    }
    #features {
        padding: 4rem 1.5rem;
    }
    .ranks-path {
        gap: .5rem;
    }
    .rank-connector {
        width: 30px;
    }
    #lore {
        padding: 4rem 1.5rem;
    }
    .lore-text {
        padding: 1rem 1.5rem;
    }
    .worlds-grid {
        grid-template-columns: 1fr;
    }
    footer .footer-inner {
        flex-direction: column;
        text-align: center;
    }
}


/* ===== MYSTICAL PRELOADER ===== */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #0a0818 0%, #03020a 100%);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 1s ease, visibility 1s;
    pointer-events: none;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
    color: var(--gold);
    font-family: 'Cinzel', serif;
    letter-spacing: 0.2em;
    position: relative;
}

/* Container for the rune and effects */
.loader-rune-container {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Central rune */
.loader-rune {
    width: 80px;
    height: 80px;
    background: transparent;
    border: 3px solid var(--gold);
    transform: rotate(45deg);
    animation: spin 8s linear infinite;
    position: relative;
    z-index: 3;
    box-shadow: 0 0 30px var(--glow-gold), inset 0 0 20px rgba(201, 168, 76, 0.3);
}

.loader-rune::before,
.loader-rune::after {
    content: '';
    position: absolute;
    background: var(--gold);
    opacity: 0.4;
}

.loader-rune::before {
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 1px dashed var(--gold);
    animation: pulseGlow 2s ease-in-out infinite;
}

.loader-rune::after {
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    transform: translate(-50%, -50%);
    background: transparent;
    border: 2px solid var(--gold-light);
    border-radius: 0;
    animation: spinReverse 4s linear infinite;
}

/* Outer ring */
.loader-ring {
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    border: 2px solid transparent;
    border-top: 2px solid var(--gold);
    border-bottom: 2px solid var(--gold);
    border-radius: 50%;
    animation: spin 6s linear infinite;
    z-index: 2;
    opacity: 0.5;
}

.loader-ring::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    border: 1px dashed var(--gold-dark);
    border-radius: 50%;
    animation: spinReverse 10s linear infinite;
}

/* Floating particles */
.loader-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    animation: spin 20s linear infinite;
}

.loader-particles span {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--gold-light);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--gold);
    opacity: 0.6;
}

/* Position particles in a circle */
.loader-particles span:nth-child(1) { top: 10%; left: 50%; }
.loader-particles span:nth-child(2) { top: 20%; left: 80%; }
.loader-particles span:nth-child(3) { top: 50%; left: 90%; }
.loader-particles span:nth-child(4) { top: 80%; left: 70%; }
.loader-particles span:nth-child(5) { top: 90%; left: 30%; }
.loader-particles span:nth-child(6) { top: 60%; left: 10%; }
.loader-particles span:nth-child(7) { top: 30%; left: 20%; }
.loader-particles span:nth-child(8) { top: 40%; left: 40%; }

/* Animated text */
.loader-text {
    display: inline-block;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--gold-light);
    text-shadow: 0 0 10px var(--gold), 0 0 20px var(--gold-dark);
    animation: textPulse 2s ease-in-out infinite;
    margin-top: 1rem;
    position: relative;
}

.loader-text::before,
.loader-text::after {
    content: '✦';
    margin: 0 1rem;
    opacity: 0.6;
    animation: sparkle 1.5s ease-in-out infinite;
}

.loader-text::before {
    margin-right: 1.5rem;
}
.loader-text::after {
    margin-left: 1.5rem;
}

/* Keyframes */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes spinReverse {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(-360deg); }
}

@keyframes pulseGlow {
    0%, 100% {
        opacity: 0.2;
        box-shadow: 0 0 10px var(--gold);
    }
    50% {
        opacity: 0.6;
        box-shadow: 0 0 30px var(--gold-light), 0 0 60px var(--gold);
    }
}

@keyframes textPulse {
    0%, 100% {
        text-shadow: 0 0 10px var(--gold), 0 0 20px var(--gold-dark);
        opacity: 0.9;
    }
    50% {
        text-shadow: 0 0 20px var(--gold-light), 0 0 40px var(--gold), 0 0 80px var(--gold-dark);
        opacity: 1;
    }
}

@keyframes sparkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.5); }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .loader-rune-container {
        width: 120px;
        height: 120px;
    }
    .loader-rune {
        width: 60px;
        height: 60px;
    }
    .loader-rune::after {
        width: 30px;
        height: 30px;
    }
    .loader-text {
        font-size: 1rem;
    }
    .loader-particles span {
        width: 3px;
        height: 3px;
    }
}

/* ===== MYSTICAL MUSIC TOGGLE ===== */
.music-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 0 15px rgba(201, 168, 76, 0.3));
    padding: 0;
}

.music-toggle:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 0 25px rgba(201, 168, 76, 0.6));
}

/* Runic ring container */
.music-rune-ring {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(13, 11, 26, 0.9);
    border: 2px solid var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-shadow: 0 0 20px rgba(201, 168, 76, 0.3), inset 0 0 10px rgba(201, 168, 76, 0.2);
}

/* Rotating ring effect (only visible when playing) */
.music-toggle.playing .music-rune-ring::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    border: 2px dashed transparent;
    border-top-color: var(--gold-light);
    border-bottom-color: var(--gold-light);
    animation: spin 4s linear infinite;
    opacity: 0.7;
    pointer-events: none;
}

/* Bars container */
.music-bars {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
    width: 28px;
    height: 28px;
    z-index: 2;
}

/* Individual bars with gradient */
.music-bars span {
    display: block;
    width: 5px;
    background: linear-gradient(to top, var(--gold-dark), var(--gold-light));
    border-radius: 3px;
    box-shadow: 0 0 8px var(--gold-light);
    transition: height 0.2s ease;
    height: 14px; /* static height when paused */
}

/* Animated bars when playing */
.music-toggle.playing .music-bars span {
    animation: mysticPulse 1.4s ease-in-out infinite;
}

.music-toggle.playing .music-bars span:nth-child(1) {
    animation-delay: 0s;
}
.music-toggle.playing .music-bars span:nth-child(2) {
    animation-delay: 0.3s;
}
.music-toggle.playing .music-bars span:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes mysticPulse {
    0%, 100% {
        height: 10px;
        opacity: 0.8;
        box-shadow: 0 0 5px var(--gold);
    }
    50% {
        height: 24px;
        opacity: 1;
        box-shadow: 0 0 15px var(--gold-light), 0 0 25px var(--gold);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Extra runic sparkles on hover */
.music-toggle:hover .music-rune-ring {
    border-color: var(--gold-light);
    box-shadow: 0 0 30px var(--gold), inset 0 0 15px var(--gold);
}

/* Mobile adjustment */
@media (max-width: 768px) {
    .music-toggle {
        width: 50px;
        height: 50px;
        bottom: 1rem;
        right: 1rem;
    }
    .music-bars {
        width: 22px;
        height: 22px;
        gap: 3px;
    }
    .music-bars span {
        width: 4px;
    }
    @keyframes mysticPulse {
        0%, 100% { height: 8px; }
        50% { height: 18px; }
    }
}