/* ==========================================================================
   HOGWARTS CRAFT - MODERN MAGICAL DESIGN SYSTEM
   Dark Fantasy & Arcane Gold & Mystic Purple Glassmorphism
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;800;900&family=Outfit:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
    --bg-darkest: #05070e;
    --bg-darker: #0a0e1a;
    --bg-main: #0c1222;
    --bg-card: rgba(16, 24, 45, 0.75);
    --bg-card-hover: rgba(24, 35, 65, 0.9);
    --bg-glass: rgba(255, 255, 255, 0.04);

    --border-gold: rgba(251, 191, 36, 0.3);
    --border-gold-glow: rgba(251, 191, 36, 0.7);
    --border-purple: rgba(139, 92, 246, 0.35);
    --border-glass: rgba(255, 255, 255, 0.08);

    --gold-primary: #fbbf24;
    --gold-dark: #b45309;
    --gold-gradient: linear-gradient(135deg, #fde68a 0%, #fbbf24 50%, #d97706 100%);
    --gold-glow: 0 0 25px rgba(251, 191, 36, 0.45);

    --purple-primary: #a855f7;
    --purple-dark: #6b21a8;
    --purple-gradient: linear-gradient(135deg, #c084fc 0%, #a855f7 50%, #6366f1 100%);
    --purple-glow: 0 0 25px rgba(168, 85, 247, 0.45);

    --cyan-accent: #38bdf8;
    --emerald-accent: #10b981;
    --emerald-glow: 0 0 20px rgba(16, 185, 129, 0.4);
    --ruby-accent: #ef4444;

    --text-white: #ffffff;
    --text-light: #f1f5f9;
    --text-muted: #94a3b8;
    --text-dim: #64748b;

    --font-heading: 'Cinzel', Georgia, serif;
    --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --radius-full: 9999px;

    --shadow-main: 0 20px 50px rgba(0, 0, 0, 0.6);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-darkest);
    color: var(--text-light);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-image: 
        radial-gradient(circle at 10% 10%, rgba(139, 92, 246, 0.14) 0%, transparent 45%),
        radial-gradient(circle at 90% 20%, rgba(251, 191, 36, 0.12) 0%, transparent 45%),
        radial-gradient(circle at 50% 85%, rgba(56, 189, 248, 0.1) 0%, transparent 55%);
    background-attachment: fixed;
}

/* Background Animated Canvas */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
}

.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.header-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 78px;
    background: rgba(10, 14, 26, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-glass);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.nav-logo-img {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid var(--gold-primary);
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.4);
}

.nav-logo-text {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 800;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    transition: all 0.25s ease;
    font-size: 15px;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-white);
    background: rgba(255, 255, 255, 0.07);
}

.nav-cta {
    background: var(--gold-gradient);
    color: #1e1202 !important;
    font-weight: 700 !important;
    box-shadow: var(--gold-glow);
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.6);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
    padding-top: 150px;
    padding-bottom: 80px;
    text-align: center;
    position: relative;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 18px;
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid var(--border-purple);
    border-radius: var(--radius-full);
    color: var(--purple-primary);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.hero-avatar-wrap {
    position: relative;
    display: inline-block;
    margin-bottom: 24px;
}

.hero-avatar {
    width: 170px;
    height: 170px;
    border-radius: 28px;
    object-fit: cover;
    border: 3px solid var(--gold-primary);
    box-shadow: 0 0 45px rgba(251, 191, 36, 0.5), 0 20px 40px rgba(0, 0, 0, 0.8);
    transition: transform 0.4s ease;
}

.hero-avatar:hover {
    transform: scale(1.05) rotate(1deg);
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(38px, 6vw, 68px);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 18px;
    letter-spacing: 1px;
}

.hero-title-gold {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 15px rgba(251, 191, 36, 0.3));
}

.hero-subtitle {
    max-width: 680px;
    margin: 0 auto 36px;
    color: var(--text-muted);
    font-size: 18px;
    line-height: 1.6;
}

/* IP BOX */
.hero-ip-box {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    background: rgba(16, 24, 45, 0.9);
    border: 2px solid var(--border-gold);
    border-radius: var(--radius-md);
    padding: 10px 20px;
    box-shadow: var(--shadow-main), 0 0 30px rgba(251, 191, 36, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-ip-box:hover {
    border-color: var(--gold-primary);
    box-shadow: var(--shadow-main), var(--gold-glow);
    transform: translateY(-2px);
}

.hero-ip-text {
    font-family: var(--font-mono);
    font-size: 20px;
    font-weight: 700;
    color: var(--text-white);
    letter-spacing: 0.5px;
}

.hero-ip-btn {
    background: var(--gold-gradient);
    color: #1e1202;
    border: none;
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hero-online-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
    font-size: 15px;
    color: var(--text-muted);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--emerald-accent);
    box-shadow: 0 0 10px var(--emerald-accent);
    animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.3); }
}

/* Player Subdomains Pill Bar */
.subdomains-bar {
    margin-top: 32px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.subdomain-tag-title {
    color: var(--text-dim);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-right: 4px;
}

.subdomain-pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.subdomain-pill:hover {
    background: rgba(168, 85, 247, 0.15);
    border-color: var(--border-purple);
    color: var(--text-white);
    transform: translateY(-1px);
}

/* ==========================================================================
   SECTION COMMON STYLES
   ========================================================================== */
.section-wrap {
    padding: 90px 0;
    position: relative;
}

.section-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 50px;
}

.section-badge {
    display: inline-block;
    padding: 5px 16px;
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-full);
    color: var(--gold-primary);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 14px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(30px, 4vw, 44px);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 14px;
}

.section-desc {
    color: var(--text-muted);
    font-size: 17px;
}

/* ==========================================================================
   WHEEL OF FORTUNE SECTION
   ========================================================================== */
.wheel-container-card {
    background: var(--bg-card);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-lg);
    padding: 48px 36px;
    box-shadow: var(--shadow-main), 0 0 50px rgba(0,0,0,0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 48px;
    align-items: center;
}

@media (max-width: 992px) {
    .wheel-container-card {
        grid-template-columns: 1fr;
        padding: 32px 20px;
    }
}

.wheel-visual-col {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.wheel-canvas-wrap {
    position: relative;
    width: 100%;
    max-width: 480px;
    aspect-ratio: 1 / 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

#wheelCanvas {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.7));
}

.wheel-needle {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 38px;
    height: 48px;
    z-index: 10;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.8));
    animation: needleBob 2s ease-in-out infinite;
}

@keyframes needleBob {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(3px); }
}

/* Controls Column */
.wheel-info-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.wheel-step-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 20px;
}

.wheel-step-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--gold-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ticket-input-group {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.ticket-input {
    flex: 1;
    background: rgba(8, 12, 22, 0.8);
    border: 2px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    color: var(--text-white);
    font-family: var(--font-mono);
    font-size: 18px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 2px;
    outline: none;
    transition: all 0.3s ease;
}

.ticket-input:focus {
    border-color: var(--gold-primary);
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.3);
}

.btn-verify {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-white);
    border: 1px solid var(--border-glass);
    padding: 14px 22px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-verify:hover {
    background: rgba(255, 255, 255, 0.15);
}

.ticket-status {
    min-height: 24px;
    font-size: 14px;
    font-weight: 600;
    margin-top: 8px;
}

.btn-spin {
    width: 100%;
    background: var(--gold-gradient);
    color: #1e1202;
    border: none;
    border-radius: var(--radius-md);
    padding: 20px;
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: var(--gold-glow);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.btn-spin:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 0 40px rgba(251, 191, 36, 0.7);
}

.btn-spin:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(0.6);
    box-shadow: none;
}

/* ==========================================================================
   REWARD MODAL
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(4, 6, 12, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 2000;
    transition: all 0.3s ease;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-card {
    background: var(--bg-card);
    border: 2px solid var(--gold-primary);
    border-radius: var(--radius-lg);
    padding: 40px;
    max-width: 580px;
    width: 100%;
    text-align: center;
    box-shadow: 0 0 60px rgba(251, 191, 36, 0.35), var(--shadow-main);
    animation: modalPop 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
    0% { transform: scale(0.85); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.modal-icon {
    font-size: 64px;
    margin-bottom: 12px;
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 800;
    color: var(--gold-primary);
    margin-bottom: 8px;
}

.modal-prize-name {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 24px;
}

.modal-cmd-box {
    display: flex;
    gap: 8px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-sm);
    padding: 6px;
    margin-bottom: 20px;
}

.modal-cmd-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--gold-primary);
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 700;
    padding: 8px 12px;
    outline: none;
}

.modal-copy-btn {
    background: var(--gold-gradient);
    color: #1e1202;
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-close-btn {
    background: transparent;
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.modal-close-btn:hover {
    color: var(--text-white);
    background: rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   RANKS & PRIVILEGES GRID
   ========================================================================== */
.ranks-filter-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.filter-btn:hover, .filter-btn.active {
    background: var(--gold-gradient);
    color: #1e1202;
    border-color: transparent;
    font-weight: 700;
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.4);
}

.ranks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 28px;
}

.rank-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.rank-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-gold);
    box-shadow: var(--shadow-main), 0 0 35px rgba(251, 191, 36, 0.25);
    background: var(--bg-card-hover);
}

.rank-card.featured {
    border: 2px solid var(--gold-primary);
    box-shadow: 0 0 35px rgba(251, 191, 36, 0.3);
}

.featured-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: var(--gold-gradient);
    color: #1e1202;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

.rank-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.rank-icon-box {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
}

.rank-title-group h3 {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 800;
    color: var(--text-white);
}

.rank-subtitle {
    font-size: 13px;
    color: var(--text-dim);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
}

.rank-desc {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.rank-features {
    list-style: none;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rank-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: var(--text-light);
}

.feature-check {
    color: var(--emerald-accent);
    font-weight: 900;
}

.rank-footer-limits {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--border-glass);
    font-size: 13px;
    color: var(--text-muted);
}

.limit-badge {
    font-family: var(--font-mono);
    color: var(--gold-primary);
    font-weight: 700;
}

/* ==========================================================================
   QUESTS & HOW TO PLAY SECTION
   ========================================================================== */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

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

.step-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.step-card:hover {
    border-color: var(--border-purple);
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

.step-num {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--purple-gradient);
    color: var(--text-white);
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: var(--purple-glow);
}

.step-title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}

.step-desc {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.6;
}

/* ==========================================================================
   RULES SECTION
   ========================================================================== */
.rules-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

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

.rule-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: all 0.3s ease;
}

.rule-card:hover {
    border-color: var(--border-gold);
    transform: translateY(-2px);
}

.rule-header {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--gold-primary);
    margin-bottom: 10px;
}

.rule-text {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer-wrap {
    margin-top: auto;
    background: var(--bg-darker);
    border-top: 1px solid var(--border-glass);
    padding: 50px 0 30px;
    text-align: center;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.footer-text {
    color: var(--text-dim);
    font-size: 14px;
    margin-bottom: 8px;
}

/* TOAST NOTIFICATION */
#toast-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(16, 24, 45, 0.95);
    border: 1px solid var(--emerald-accent);
    color: var(--text-white);
    padding: 14px 24px;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), var(--emerald-glow);
    font-weight: 600;
    font-size: 15px;
    z-index: 9999;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

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