/* ============================================
   SERHAN AYDINICEN - CODE WIZARD PORTFOLIO
   Dark Fantasy Theme (Path of Exile / Dota inspired)
   Blazor Edition
   ============================================ */

/* CSS Variables */
:root {
    /* Dark Theme Colors */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a2e;
    --bg-card: #16161f;
    
    /* Accent Colors */
    --gold: #ffd700;
    --gold-dark: #b8860b;
    --cyan: #00ffff;
    --cyan-dark: #008b8b;
    --purple: #9b59b6;
    --purple-dark: #6c3483;
    --magenta: #ff00ff;
    --red: #e74c3c;
    --green: #2ecc71;
    --blue: #3498db;
    
    /* Rarity Colors (Game-style) */
    --legendary: #ff8000;
    --epic: #a335ee;
    --rare: #0070dd;
    --uncommon: #1eff00;
    --common: #ffffff;
    
    /* Text Colors */
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --text-muted: #666;
    
    /* Effects */
    --glow-gold: 0 0 20px rgba(255, 215, 0, 0.5);
    --glow-cyan: 0 0 20px rgba(0, 255, 255, 0.5);
    --glow-purple: 0 0 20px rgba(155, 89, 182, 0.5);
    
    /* Fonts */
    --font-title: 'Cinzel', serif;
    --font-fantasy: 'MedievalSharp', cursive;
    --font-body: 'Segoe UI', system-ui, sans-serif;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

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

::-webkit-scrollbar-thumb:hover {
    background: var(--gold);
}

/* ============================================
   PARTICLE BACKGROUND
   ============================================ */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--gold);
    border-radius: 50%;
    opacity: 0;
    animation: float-particle 8s infinite ease-in-out;
}

@keyframes float-particle {
    0%, 100% {
        opacity: 0;
        transform: translateY(100vh) scale(0);
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(-100px) scale(1);
    }
}

/* Floating Runes */
.runes-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.rune {
    position: absolute;
    font-size: 24px;
    opacity: 0.1;
    animation: rune-float 20s infinite linear;
    color: var(--cyan);
}

@keyframes rune-float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.15;
    }
    90% {
        opacity: 0.15;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* ============================================
   MAIN SCROLL CONTAINER
   ============================================ */
.scroll-container {
    position: relative;
    z-index: 1;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    position: relative;
    background: 
        radial-gradient(ellipse at center, rgba(155, 89, 182, 0.1) 0%, transparent 70%),
        linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h100v100H0z' fill='none'/%3E%3Cpath d='M10 10h80v80H10z' fill='none' stroke='%23ffd700' stroke-width='0.1' opacity='0.1'/%3E%3C/svg%3E");
    background-size: 50px 50px;
    opacity: 0.3;
    pointer-events: none;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 4rem;
    max-width: 1400px;
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
}

/* Wizard Portrait */
.wizard-portrait {
    position: relative;
    flex-shrink: 0;
}

.portrait-frame {
    width: 280px;
    height: 350px;
    position: relative;
    border: 3px solid var(--gold);
    border-radius: 10px;
    background: linear-gradient(180deg, var(--bg-tertiary) 0%, var(--bg-primary) 100%);
    overflow: hidden;
    box-shadow: 
        var(--glow-gold),
        inset 0 0 50px rgba(0, 0, 0, 0.5);
}

.portrait-frame::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--gold), var(--purple), var(--cyan), var(--gold));
    border-radius: 12px;
    z-index: -1;
    animation: border-glow 3s linear infinite;
    background-size: 400% 400%;
}

@keyframes border-glow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.portrait-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(0, 255, 255, 0.2) 0%, transparent 70%);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.8; }
}

.wizard-silhouette {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wizard-svg {
    width: 200px;
    height: 300px;
    filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.5));
}

.eye-glow {
    animation: eye-pulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 5px var(--cyan));
}

@keyframes eye-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.star-twinkle {
    animation: twinkle 1.5s ease-in-out infinite;
}

.star-twinkle.delay-1 { animation-delay: 0.5s; }
.star-twinkle.delay-2 { animation-delay: 1s; }

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

.magic-orb {
    animation: orb-glow 2s ease-in-out infinite;
    filter: drop-shadow(0 0 10px var(--cyan));
}

@keyframes orb-glow {
    0%, 100% { filter: drop-shadow(0 0 10px var(--cyan)); }
    50% { filter: drop-shadow(0 0 20px var(--cyan)) drop-shadow(0 0 30px var(--magenta)); }
}

.orb-ring {
    animation: ring-spin 4s linear infinite;
    transform-origin: 155px 90px;
}

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

.code-float {
    animation: code-float-anim 3s ease-in-out infinite;
}

.code-float.delay-1 { animation-delay: 1s; }
.code-float.delay-2 { animation-delay: 2s; }

@keyframes code-float-anim {
    0%, 100% { transform: translateY(0); opacity: 0.7; }
    50% { transform: translateY(-10px); opacity: 1; }
}

.level-badge {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(180deg, var(--legendary) 0%, #cc6600 100%);
    padding: 8px 20px;
    border-radius: 20px;
    border: 2px solid var(--gold);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--glow-gold);
    cursor: pointer;
    transition: all 0.3s ease;
}

.level-badge:hover {
    transform: translateX(-50%) scale(1.1);
    box-shadow: 0 0 30px rgba(255, 128, 0, 0.8);
}

.level-badge.clicked {
    animation: level-up 0.5s ease-out;
}

@keyframes level-up {
    0% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.3); }
    100% { transform: translateX(-50%) scale(1); }
}

.level-text {
    font-family: var(--font-title);
    font-size: 12px;
    color: var(--bg-primary);
    font-weight: bold;
}

.level-number {
    font-family: var(--font-title);
    font-size: 24px;
    color: var(--bg-primary);
    font-weight: 900;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Hero Text */
.hero-text {
    flex: 1;
    min-width: 300px;
    max-width: 700px;
}

.title-container {
    margin-bottom: 2rem;
}

.glitch {
    font-family: var(--font-title);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    color: var(--gold);
    text-shadow: 
        0 0 10px var(--gold),
        0 0 20px var(--gold),
        0 0 40px var(--gold-dark);
    position: relative;
    animation: glitch-anim 3s infinite;
}

@keyframes glitch-anim {
    0%, 90%, 100% { text-shadow: 0 0 10px var(--gold), 0 0 20px var(--gold), 0 0 40px var(--gold-dark); }
    92% { text-shadow: -2px 0 var(--cyan), 2px 0 var(--magenta), 0 0 10px var(--gold); }
    94% { text-shadow: 2px 0 var(--magenta), -2px 0 var(--cyan), 0 0 10px var(--gold); }
}

.subtitle-line {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    margin: 1rem 0;
    animation: line-expand 2s ease-out forwards;
}

@keyframes line-expand {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

.class-title {
    font-family: var(--font-fantasy);
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--cyan);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bracket {
    color: var(--purple);
    font-weight: bold;
}

.typing-text {
    color: var(--text-primary);
}

.cursor {
    animation: blink 0.8s infinite;
    color: var(--cyan);
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.tagline {
    font-style: italic;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    padding-left: 1rem;
    border-left: 3px solid var(--purple);
}

.tagline em {
    color: var(--gold);
}

/* Stats Bar */
.stats-bar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--gold-dark);
    border-radius: 8px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    font-size: 1.5rem;
}

.stat-info {
    flex: 1;
}

.stat-label {
    font-family: var(--font-title);
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-bar {
    height: 8px;
    background: var(--bg-primary);
    border-radius: 4px;
    overflow: hidden;
    margin: 4px 0;
    border: 1px solid var(--gold-dark);
}

.stat-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--cyan));
    border-radius: 4px;
    transition: width 1s ease-out;
    transform-origin: left;
}

.stat-fill.animate {
    animation: fill-anim 2s ease-out forwards;
}

@keyframes fill-anim {
    from { width: 0; }
}

.stat-value {
    font-size: 0.75rem;
    color: var(--cyan);
}

/* CTA Buttons */
.cta-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-family: var(--font-title);
    font-size: 1rem;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border: none;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(180deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: var(--bg-primary);
    border: 2px solid var(--gold);
    box-shadow: var(--glow-gold);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.7);
}

.btn-secondary {
    background: transparent;
    color: var(--cyan);
    border: 2px solid var(--cyan);
}

.btn-secondary:hover {
    background: rgba(0, 255, 255, 0.1);
    transform: translateY(-3px);
    box-shadow: var(--glow-cyan);
}

.btn-tertiary {
    background: transparent;
    color: var(--purple);
    border: 2px solid var(--purple);
}

.btn-tertiary:hover {
    background: rgba(155, 89, 182, 0.1);
    transform: translateY(-3px);
    box-shadow: var(--glow-purple);
}

.btn-icon {
    font-size: 1.2rem;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    animation: bounce 2s infinite;
    cursor: pointer;
}

.scroll-indicator span {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-family: var(--font-fantasy);
}

.scroll-arrow {
    color: var(--gold);
    font-size: 1.5rem;
    margin-top: 0.5rem;
}

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

/* ============================================
   SECTION STYLES
   ============================================ */
section {
    padding: 6rem 2rem;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-family: var(--font-title);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: var(--gold);
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-family: var(--font-fantasy);
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* ============================================
   SKILLS SECTION
   ============================================ */
.skills-section {
    background: 
        radial-gradient(ellipse at top, rgba(155, 89, 182, 0.1) 0%, transparent 50%),
        var(--bg-secondary);
}

.skill-tree {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.skill-branch {
    background: var(--bg-card);
    border: 1px solid var(--gold-dark);
    border-radius: 8px;
    padding: 2rem;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.skill-branch.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.branch-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gold-dark);
}

.branch-icon {
    font-size: 2rem;
}

.branch-header h3 {
    font-family: var(--font-title);
    color: var(--gold);
    font-size: 1.3rem;
}

.skill-nodes {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
}

.skill-node {
    position: relative;
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 1.5rem;
    min-width: 200px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.skill-node .node-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.skill-node.legendary .node-glow {
    box-shadow: 0 0 30px var(--legendary);
}

.skill-node.epic .node-glow {
    box-shadow: 0 0 30px var(--epic);
}

.skill-node.rare .node-glow {
    box-shadow: 0 0 20px var(--rare);
}

.skill-node:hover .node-glow,
.skill-node.active .node-glow {
    opacity: 1;
}

.skill-node.legendary {
    border-color: var(--legendary);
}

.skill-node.epic {
    border-color: var(--epic);
}

.skill-node.rare {
    border-color: var(--rare);
}

.skill-node.uncommon {
    border-color: var(--uncommon);
}

.skill-node:hover,
.skill-node.active {
    transform: translateY(-5px);
}

.skill-node.clicked {
    animation: skill-activate 0.4s ease-out;
}

@keyframes skill-activate {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.node-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
}

.skill-icon {
    font-size: 2.5rem;
}

.skill-name {
    font-family: var(--font-title);
    font-size: 1rem;
    color: var(--text-primary);
}

.skill-level {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.rarity {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: bold;
    letter-spacing: 1px;
}

.rarity.legendary {
    background: var(--legendary);
    color: var(--bg-primary);
}

.rarity.epic {
    background: var(--epic);
    color: white;
}

.rarity.rare {
    background: var(--rare);
    color: white;
}

.rarity.uncommon {
    background: var(--uncommon);
    color: var(--bg-primary);
}

.skill-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: var(--bg-primary);
    border: 1px solid var(--gold);
    border-radius: 8px;
    padding: 1rem;
    min-width: 250px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
}

.skill-node:hover .skill-tooltip,
.skill-node.active .skill-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.skill-tooltip p {
    font-style: italic;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.skill-tooltip .skill-points {
    color: var(--green);
    font-weight: bold;
}

.passive-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.passive-skill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-tertiary);
    padding: 0.8rem 1.2rem;
    border-radius: 20px;
    border: 1px solid var(--gold-dark);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.passive-skill:hover {
    border-color: var(--gold);
    transform: scale(1.05);
}

.passive-skill.active {
    border-color: var(--green);
    background: rgba(46, 204, 113, 0.1);
}

.passive-icon {
    font-size: 1.2rem;
}

/* ============================================
   PROJECTS SECTION
   ============================================ */
.projects-section {
    background: 
        radial-gradient(ellipse at bottom, rgba(0, 255, 255, 0.05) 0%, transparent 50%),
        var(--bg-primary);
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.inventory-slot {
    position: relative;
    border-radius: 8px;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(30px);
}

.inventory-slot.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.inventory-slot .item-glow {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.inventory-slot.legendary .item-glow {
    background: linear-gradient(45deg, var(--legendary), var(--gold), var(--legendary));
    animation: legendary-glow 2s ease-in-out infinite;
}

.inventory-slot.epic .item-glow {
    background: linear-gradient(45deg, var(--epic), var(--magenta), var(--epic));
}

.inventory-slot.rare .item-glow {
    background: linear-gradient(45deg, var(--rare), var(--cyan), var(--rare));
}

.inventory-slot:hover .item-glow {
    opacity: 0.5;
}

@keyframes legendary-glow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

.item-card {
    background: var(--bg-card);
    border: 2px solid;
    border-radius: 8px;
    padding: 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.item-card:hover {
    transform: translateY(-5px);
}

.inventory-slot.legendary .item-card {
    border-color: var(--legendary);
}

.inventory-slot.epic .item-card {
    border-color: var(--epic);
}

.inventory-slot.rare .item-card {
    border-color: var(--rare);
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.item-icon {
    font-size: 2.5rem;
}

.item-rarity {
    font-size: 0.7rem;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: bold;
    letter-spacing: 1px;
}

.item-rarity.legendary {
    background: var(--legendary);
    color: var(--bg-primary);
}

.item-rarity.epic {
    background: var(--epic);
    color: white;
}

.item-rarity.rare {
    background: var(--rare);
    color: white;
}

.item-name {
    font-family: var(--font-title);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.inventory-slot.legendary .item-name {
    color: var(--legendary);
}

.inventory-slot.epic .item-name {
    color: var(--epic);
}

.inventory-slot.rare .item-name {
    color: var(--rare);
}

.item-description {
    font-style: italic;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.item-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.item-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--green);
}

.item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    background: var(--bg-tertiary);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    border: 1px solid var(--gold-dark);
    cursor: pointer;
    transition: all 0.3s ease;
}

.tag:hover {
    background: var(--gold-dark);
    color: var(--bg-primary);
}

.item-link {
    color: var(--cyan);
    text-decoration: none;
    font-family: var(--font-title);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    align-self: flex-start;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.item-link:hover {
    color: var(--gold);
    text-shadow: 0 0 10px var(--gold);
}

/* ============================================
   CASTLES / WORK EXPERIENCE SECTION
   ============================================ */
.castles-section {
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-primary) 100%);
    position: relative;
    overflow: hidden;
}

.castles-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 30%, rgba(255, 128, 0, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(163, 53, 238, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.castles-timeline {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    position: relative;
}

/* Timeline connector line */
.castles-timeline::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 4px;
    background: linear-gradient(90deg, 
        transparent, 
        var(--gold-dark) 10%, 
        var(--gold) 50%, 
        var(--gold-dark) 90%, 
        transparent);
    transform: translateY(-50%);
    z-index: 0;
    opacity: 0.3;
}

.castle-card {
    flex: 1 1 320px;
    max-width: 380px;
    background: linear-gradient(145deg, var(--bg-tertiary) 0%, var(--bg-card) 100%);
    border: 3px solid var(--gold-dark);
    border-radius: 16px;
    padding: 0;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    z-index: 1;
}

.castle-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* Tier-based styling */
.castle-card.legendary {
    border-color: var(--legendary);
    box-shadow: 
        0 0 30px rgba(255, 128, 0, 0.3),
        inset 0 0 30px rgba(255, 128, 0, 0.1);
}

.castle-card.legendary:hover {
    box-shadow: 
        0 0 50px rgba(255, 128, 0, 0.5),
        0 20px 40px rgba(0, 0, 0, 0.4);
}

.castle-card.epic {
    border-color: var(--epic);
    box-shadow: 
        0 0 20px rgba(163, 53, 238, 0.2),
        inset 0 0 20px rgba(163, 53, 238, 0.05);
}

.castle-card.epic:hover {
    box-shadow: 
        0 0 40px rgba(163, 53, 238, 0.4),
        0 20px 40px rgba(0, 0, 0, 0.4);
}

.castle-card.rare {
    border-color: var(--rare);
    box-shadow: 
        0 0 15px rgba(0, 112, 221, 0.2),
        inset 0 0 15px rgba(0, 112, 221, 0.05);
}

.castle-card.rare:hover {
    box-shadow: 
        0 0 30px rgba(0, 112, 221, 0.3),
        0 20px 40px rgba(0, 0, 0, 0.4);
}

/* Current castle highlight */
.castle-card.current {
    animation: castle-pulse 3s ease-in-out infinite;
}

@keyframes castle-pulse {
    0%, 100% { 
        box-shadow: 0 0 30px rgba(255, 128, 0, 0.3), inset 0 0 30px rgba(255, 128, 0, 0.1);
    }
    50% { 
        box-shadow: 0 0 50px rgba(255, 128, 0, 0.5), inset 0 0 50px rgba(255, 128, 0, 0.2);
    }
}

/* Banner at top */
.castle-banner {
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.5), transparent);
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid rgba(255, 215, 0, 0.3);
    gap: 0.5rem;
}

.castle-card.legendary .castle-banner {
    border-bottom-color: var(--legendary);
    background: linear-gradient(90deg, rgba(255, 128, 0, 0.1), rgba(255, 128, 0, 0.2), rgba(255, 128, 0, 0.1));
}

.castle-card.epic .castle-banner {
    border-bottom-color: var(--epic);
    background: linear-gradient(90deg, rgba(163, 53, 238, 0.1), rgba(163, 53, 238, 0.15), rgba(163, 53, 238, 0.1));
}

.castle-card.rare .castle-banner {
    border-bottom-color: var(--rare);
    background: linear-gradient(90deg, rgba(0, 112, 221, 0.1), rgba(0, 112, 221, 0.15), rgba(0, 112, 221, 0.1));
}

/* Banner Tier Label */
.banner-tier {
    font-family: var(--font-title);
    font-size: 0.7rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    border: 1px solid;
    background: var(--bg-card);
}

.castle-card.legendary .banner-tier {
    color: var(--legendary);
    border-color: var(--legendary);
    box-shadow: 0 0 8px rgba(255, 128, 0, 0.3);
}

.castle-card.epic .banner-tier {
    color: var(--epic);
    border-color: var(--epic);
    box-shadow: 0 0 8px rgba(163, 53, 238, 0.3);
}

.castle-card.rare .banner-tier {
    color: var(--rare);
    border-color: var(--rare);
    box-shadow: 0 0 8px rgba(0, 112, 221, 0.3);
}

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

.current-badge .badge-icon {
    font-size: 1.2rem;
    animation: sword-swing 1s ease-in-out infinite;
}

@keyframes sword-swing {
    0%, 100% { transform: rotate(-10deg); }
    50% { transform: rotate(10deg); }
}

.current-badge .badge-text {
    font-family: var(--font-title);
    font-size: 0.75rem;
    color: var(--legendary);
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 0 10px var(--legendary);
    animation: badge-glow-text 2s ease-in-out infinite;
}

@keyframes badge-glow-text {
    0%, 100% { text-shadow: 0 0 10px var(--legendary); }
    50% { text-shadow: 0 0 20px var(--legendary), 0 0 30px rgba(255, 128, 0, 0.5); }
}

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

.past-badge .badge-icon {
    font-size: 1rem;
}

.past-badge .badge-text {
    font-family: var(--font-title);
    font-size: 0.7rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Castle Visual */
.castle-visual {
    position: relative;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
}

.castle-icon {
    font-size: 5rem;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.5));
    transition: transform 0.3s ease;
    z-index: 2;
}

.castle-card:hover .castle-icon {
    transform: scale(1.1);
}

.castle-card.legendary .castle-icon {
    filter: drop-shadow(0 0 20px rgba(255, 128, 0, 0.6));
}

.castle-card.epic .castle-icon {
    filter: drop-shadow(0 0 15px rgba(163, 53, 238, 0.5));
}

.castle-card.rare .castle-icon {
    filter: drop-shadow(0 0 10px rgba(0, 112, 221, 0.4));
}

.castle-glow {
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.2) 0%, transparent 70%);
    animation: castle-glow-pulse 3s ease-in-out infinite;
}

@keyframes castle-glow-pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

.castle-card.legendary .castle-glow {
    background: radial-gradient(circle, rgba(255, 128, 0, 0.3) 0%, transparent 70%);
}

.castle-card.epic .castle-glow {
    background: radial-gradient(circle, rgba(163, 53, 238, 0.25) 0%, transparent 70%);
}

.castle-card.rare .castle-glow {
    background: radial-gradient(circle, rgba(0, 112, 221, 0.2) 0%, transparent 70%);
}

/* Flags for current castle */
.castle-flags {
    position: absolute;
    top: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
}

.castle-flags .flag {
    font-size: 1.5rem;
    animation: flag-wave 1s ease-in-out infinite;
}

.castle-flags .flag.left {
    animation-delay: 0s;
}

.castle-flags .flag.right {
    animation-delay: 0.5s;
}

@keyframes flag-wave {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

/* Castle Info */
.castle-info {
    padding: 1.5rem;
    text-align: center;
}

.castle-name {
    font-family: var(--font-fantasy);
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.castle-card.legendary .castle-name {
    color: var(--legendary);
    text-shadow: 0 0 10px rgba(255, 128, 0, 0.5);
}

.castle-card.epic .castle-name {
    color: var(--epic);
    text-shadow: 0 0 10px rgba(163, 53, 238, 0.4);
}

.castle-card.rare .castle-name {
    color: var(--rare);
    text-shadow: 0 0 10px rgba(0, 112, 221, 0.3);
}

.castle-title {
    font-family: var(--font-title);
    font-size: 0.9rem;
    color: var(--gold);
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.castle-period {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.period-icon {
    font-size: 0.9rem;
}

/* Achievements */
.castle-achievements {
    text-align: left;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 215, 0, 0.2);
}

.achievements-title {
    font-family: var(--font-title);
    font-size: 0.8rem;
    color: var(--gold);
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

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

.achievements-list li {
    position: relative;
    padding-left: 1.2rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    line-height: 1.4;
}

.achievements-list li::before {
    content: '◆';
    position: absolute;
    left: 0;
    color: var(--gold-dark);
    font-size: 0.6rem;
    top: 0.3rem;
}

/* Castle Link */
.castle-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 215, 0, 0.05) 100%);
    border: 1px solid var(--gold-dark);
    border-radius: 6px;
    color: var(--gold);
    text-decoration: none;
    font-family: var(--font-title);
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.castle-link:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 215, 0, 0.1) 100%);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
    transform: translateY(-2px);
}

.castle-link .link-arrow {
    transition: transform 0.3s ease;
}

.castle-link:hover .link-arrow {
    transform: translateX(5px);
}

/* Tier Badge */
.castle-tier-badge {
    display: none;
}

.castle-card.legendary .castle-tier-badge {
    border-color: var(--legendary);
    color: var(--legendary);
    box-shadow: 0 0 10px rgba(255, 128, 0, 0.3);
}

.castle-card.epic .castle-tier-badge {
    border-color: var(--epic);
    color: var(--epic);
    box-shadow: 0 0 10px rgba(163, 53, 238, 0.3);
}

.castle-card.rare .castle-tier-badge {
    border-color: var(--rare);
    color: var(--rare);
    box-shadow: 0 0 10px rgba(0, 112, 221, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .castles-timeline {
        flex-direction: column;
        align-items: center;
    }
    
    .castles-timeline::before {
        display: none;
    }
    
    .castle-card {
        max-width: 100%;
    }
}

/* ============================================
   QUEST SECTION
   ============================================ */
.quest-section {
    background: var(--bg-secondary);
}

.quest-log {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.quest {
    display: flex;
    gap: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--gold-dark);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(30px);
    cursor: pointer;
}

.quest.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.quest:hover {
    border-color: var(--gold);
    transform: translateX(10px);
}

.quest-status {
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    flex-shrink: 0;
}

.quest.completed .quest-status {
    background: var(--green);
    color: var(--bg-primary);
}

.quest.in-progress .quest-status {
    background: var(--gold);
    color: var(--bg-primary);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4); }
    50% { box-shadow: 0 0 0 15px rgba(255, 215, 0, 0); }
}

.quest-content {
    flex: 1;
}

.quest-title {
    font-family: var(--font-title);
    color: var(--gold);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.quest-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.quest-rewards {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.reward {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    color: var(--cyan);
    background: rgba(0, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.reward:hover {
    background: rgba(0, 255, 255, 0.2);
    transform: scale(1.05);
}

.quest-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-bar {
    flex: 1;
    height: 10px;
    background: var(--bg-primary);
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid var(--gold-dark);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold));
    border-radius: 5px;
    transition: width 1s ease;
}

.progress-text {
    font-size: 0.85rem;
    color: var(--gold);
    font-weight: bold;
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact-section {
    background: 
        radial-gradient(ellipse at center, rgba(155, 89, 182, 0.1) 0%, transparent 50%),
        var(--bg-primary);
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-container {
    max-width: 900px;
    margin: 0 auto;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 4rem;
    flex-wrap: wrap;
    justify-content: center;
}

.contact-art {
    flex-shrink: 0;
}

.summoning-circle {
    width: 250px;
    height: 250px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.summoning-circle:hover .circle-center {
    transform: scale(1.2);
}

.circle-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid;
}

.ring-1 {
    width: 100%;
    height: 100%;
    border-color: var(--gold);
    animation: rotate 10s linear infinite;
}

.ring-2 {
    width: 80%;
    height: 80%;
    border-color: var(--purple);
    animation: rotate 8s linear infinite reverse;
}

.ring-3 {
    width: 60%;
    height: 60%;
    border-color: var(--cyan);
    animation: rotate 6s linear infinite;
}

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

.circle-center {
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, var(--purple) 0%, var(--bg-primary) 70%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse-center 2s ease-in-out infinite;
    transition: transform 0.3s ease;
}

@keyframes pulse-center {
    0%, 100% { box-shadow: 0 0 30px var(--purple); }
    50% { box-shadow: 0 0 50px var(--purple); }
}

.summon-icon {
    font-size: 2.5rem;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 300px;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border: 2px solid var(--gold-dark);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    opacity: 0;
    transform: translateX(-30px);
}

.contact-link.animate-in {
    opacity: 1;
    transform: translateX(0);
}

.contact-link:hover {
    transform: translateX(10px);
    border-color: var(--gold);
    box-shadow: var(--glow-gold);
}

.link-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.link-icon svg {
    width: 24px;
    height: 24px;
}

.contact-link.github .link-icon { color: #fff; }
.contact-link.linkedin .link-icon { color: #0077b5; }
.contact-link.steam .link-icon { color: #1b2838; }
.contact-link.email .link-icon { color: var(--gold); }

.link-text {
    font-family: var(--font-title);
    font-size: 1.1rem;
    color: var(--text-primary);
}

.link-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-left: auto;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--bg-primary);
    padding: 3rem 2rem;
    border-top: 1px solid var(--gold-dark);
    text-align: center;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer-rune {
    font-size: 3rem;
    color: var(--gold);
    margin-bottom: 1rem;
    animation: float 3s ease-in-out infinite;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.footer-rune:hover {
    transform: scale(1.2);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.footer-text {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.footer-text .heart {
    color: var(--red);
    animation: heartbeat 1.5s infinite;
    display: inline-block;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.footer-joke {
    font-style: italic;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ============================================
   BLAZOR SPECIFIC - NOTIFICATION TOAST
   ============================================ */
.notification-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #ff8000, #ffd700);
    color: #000;
    padding: 1rem 2rem;
    border-radius: 10px;
    font-family: var(--font-title);
    font-weight: bold;
    z-index: 10000;
    animation: toast-in 0.5s ease-out;
    box-shadow: 0 0 30px rgba(255, 128, 0, 0.8);
}

@keyframes toast-in {
    0% { transform: translateX(100%); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

.notification-toast.fade-out {
    animation: toast-out 0.5s ease-in forwards;
}

@keyframes toast-out {
    0% { transform: translateX(0); opacity: 1; }
    100% { transform: translateX(100%); opacity: 0; }
}

/* ============================================
   SKILL DETAIL MODAL
   ============================================ */
.skill-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fade-in 0.3s ease-out;
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.skill-modal {
    background: var(--bg-card);
    border: 2px solid var(--gold);
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    animation: modal-in 0.3s ease-out;
}

@keyframes modal-in {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.skill-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gold-dark);
}

.skill-modal-title {
    font-family: var(--font-title);
    color: var(--gold);
    font-size: 1.5rem;
}

.skill-modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.skill-modal-close:hover {
    color: var(--red);
}

.skill-modal-content {
    text-align: center;
}

.skill-modal-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.skill-modal-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-style: italic;
}

.skill-modal-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skill-modal-stat {
    color: var(--green);
    font-weight: bold;
}

/* ============================================
   XP COUNTER ANIMATION
   ============================================ */
.xp-counter {
    position: fixed;
    pointer-events: none;
    font-family: var(--font-title);
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--gold);
    text-shadow: 0 0 10px var(--gold);
    animation: xp-float 1s ease-out forwards;
    z-index: 9999;
}

@keyframes xp-float {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(-50px); opacity: 0; }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 968px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-text {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .tagline {
        border-left: none;
        padding-left: 0;
        border-top: 3px solid var(--purple);
        padding-top: 1rem;
    }
    
    .stats-bar {
        max-width: 400px;
    }
    
    .cta-buttons {
        justify-content: center;
    }
    
    .contact-card {
        flex-direction: column;
    }
}

@media (max-width: 600px) {
    section {
        padding: 4rem 1rem;
    }
    
    .portrait-frame {
        width: 220px;
        height: 280px;
    }
    
    .wizard-svg {
        width: 160px;
        height: 240px;
    }
    
    .skill-node {
        min-width: 150px;
        padding: 1rem;
    }
    
    .skill-icon {
        font-size: 2rem;
    }
    
    .inventory-grid {
        grid-template-columns: 1fr;
    }
    
    .quest {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .summoning-circle {
        width: 200px;
        height: 200px;
    }
    
    .contact-links {
        min-width: auto;
        width: 100%;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-gold { color: var(--gold); }
.text-cyan { color: var(--cyan); }
.text-purple { color: var(--purple); }
.text-legendary { color: var(--legendary); }
.text-epic { color: var(--epic); }
.text-rare { color: var(--rare); }

.glow-gold { text-shadow: var(--glow-gold); }
.glow-cyan { text-shadow: var(--glow-cyan); }
.glow-purple { text-shadow: var(--glow-purple); }

/* Hide default Blazor error UI */
#blazor-error-ui {
    display: none;
}

/* ============================================
   INTERACTIVE GAME BACKGROUND
   ============================================ */
.game-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 50;
    overflow: hidden;
    transition: opacity 0.5s ease;
}

.game-background.disabled {
    /* Keep toggle visible but hide game elements */
}

/* Game Toggle Button */
.game-toggle {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95) 0%, rgba(15, 15, 26, 0.95) 100%);
    border: 2px solid var(--gold);
    border-radius: 12px;
    padding: 12px 18px;
    cursor: pointer;
    pointer-events: auto;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.game-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
    border-color: #ffcc00;
}

.game-toggle.on {
    border-color: #ff6600;
    box-shadow: 0 0 20px rgba(255, 100, 0, 0.4);
}

.game-toggle.on:hover {
    box-shadow: 0 0 30px rgba(255, 100, 0, 0.6);
}

.game-toggle.off {
    border-color: var(--cyan);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.game-toggle.off:hover {
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
}

.toggle-icon {
    font-size: 1.8rem;
    animation: toggle-bounce 2s ease-in-out infinite;
}

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

.toggle-text {
    font-family: var(--font-title);
    font-size: 0.85rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.toggle-hint {
    font-family: var(--font-fantasy);
    font-size: 0.7rem;
    color: #888;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-toggle:hover .toggle-hint {
    opacity: 1;
}

/* ============================================
   WIZARD PORTRAIT
   ============================================ */
.wizard-portrait {
    z-index: 60;
    pointer-events: none;
}

/* Game mode - fixed position top left */
.wizard-portrait.game-mode {
    position: fixed;
    left: 20px;
    top: 80px;
}

/* Hero mode - in the hero section, larger */
.wizard-portrait.hero-mode {
    position: relative;
}

.wizard-portrait.hero-mode .portrait-frame {
    width: 250px;
    height: 350px;
}

.wizard-portrait.hero-mode .wizard-image {
    object-position: center 20%;
}

.wizard-portrait.hero-mode .wizard-nickname {
    position: absolute;
    top: -65px;
}

.wizard-portrait.hero-mode .level-badge {
    bottom: -20px;
}

.portrait-frame {
    width: 150px;
    height: 200px;
    background: linear-gradient(135deg, #1a1a2e 0%, #0f0f1a 100%);
    border: 3px solid var(--gold);
    border-radius: 10px;
    padding: 5px;
    position: relative;
    box-shadow: 
        0 0 30px rgba(255, 215, 0, 0.4),
        0 0 60px rgba(255, 100, 0, 0.2),
        inset 0 0 30px rgba(0, 0, 0, 0.5);
    overflow: visible;
}

.portrait-glow {
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border-radius: 15px;
    background: conic-gradient(
        from 0deg,
        transparent,
        rgba(255, 150, 0, 0.3),
        transparent,
        rgba(255, 100, 0, 0.3),
        transparent
    );
    animation: portrait-rotate 4s linear infinite;
    pointer-events: none;
}

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

.portrait-inner {
    width: 100%;
    height: 100%;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    background: #0a0a0f;
}

.wizard-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    filter: brightness(1.1) contrast(1.1);
    transition: all 0.3s ease;
}

.wizard-portrait.idle .wizard-image {
    animation: wizard-breathe 4s ease-in-out infinite;
}

.wizard-portrait.casting .wizard-image {
    animation: wizard-cast-pulse 0.4s ease-out;
    filter: brightness(1.4) contrast(1.2) saturate(1.3);
}

@keyframes wizard-breathe {
    0%, 100% { 
        transform: scale(1) translateY(0); 
        filter: brightness(1.1) contrast(1.1);
    }
    50% { 
        transform: scale(1.02) translateY(-2px); 
        filter: brightness(1.2) contrast(1.1);
    }
}

@keyframes wizard-cast-pulse {
    0% { transform: scale(1); filter: brightness(1.1); }
    50% { transform: scale(1.05); filter: brightness(1.6) saturate(1.5); }
    100% { transform: scale(1); filter: brightness(1.1); }
}

/* Staff glow overlay */
.staff-glow-overlay {
    position: absolute;
    top: 15%;
    left: 10%;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 150, 0, 0.8) 0%, rgba(255, 100, 0, 0.4) 40%, transparent 70%);
    opacity: 0.6;
    animation: staff-ambient-glow 2s ease-in-out infinite;
    pointer-events: none;
}

.staff-glow-overlay.active {
    opacity: 1;
    animation: staff-cast-glow 0.4s ease-out;
    background: radial-gradient(circle, rgba(255, 200, 100, 1) 0%, rgba(255, 150, 0, 0.8) 30%, rgba(255, 100, 0, 0.4) 60%, transparent 80%);
    width: 60px;
    height: 60px;
}

@keyframes staff-ambient-glow {
    0%, 100% { 
        opacity: 0.5; 
        transform: scale(1);
        filter: blur(5px);
    }
    50% { 
        opacity: 0.8; 
        transform: scale(1.2);
        filter: blur(8px);
    }
}

@keyframes staff-cast-glow {
    0% { transform: scale(1); opacity: 1; filter: blur(5px); }
    50% { transform: scale(2); opacity: 1; filter: blur(10px); }
    100% { transform: scale(1); opacity: 0.6; filter: blur(5px); }
}

/* Wizard Particles - floating around portrait */
.wizard-particles {
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    pointer-events: none;
}

.wizard-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: radial-gradient(circle, #ff9900 0%, #ff6600 50%, transparent 100%);
    border-radius: 50%;
    animation: particle-orbit 4s ease-in-out infinite;
    animation-delay: var(--delay);
    box-shadow: 0 0 10px #ff6600, 0 0 20px #ff9900;
}

.wizard-particle:nth-child(odd) {
    background: radial-gradient(circle, #ffcc00 0%, #ff9900 50%, transparent 100%);
    box-shadow: 0 0 10px #ffcc00, 0 0 20px #ff9900;
}

@keyframes particle-orbit {
    0% { 
        transform: rotate(var(--angle)) translateX(80px) rotate(calc(-1 * var(--angle))) scale(0.5);
        opacity: 0.3;
    }
    50% { 
        transform: rotate(calc(var(--angle) + 180deg)) translateX(90px) rotate(calc(-1 * (var(--angle) + 180deg))) scale(1);
        opacity: 1;
    }
    100% { 
        transform: rotate(calc(var(--angle) + 360deg)) translateX(80px) rotate(calc(-1 * (var(--angle) + 360deg))) scale(0.5);
        opacity: 0.3;
    }
}

.wizard-portrait.casting .wizard-particle {
    animation: particle-burst 0.5s ease-out forwards;
}

@keyframes particle-burst {
    0% { transform: rotate(var(--angle)) translateX(80px) scale(1); opacity: 1; }
    100% { transform: rotate(var(--angle)) translateX(150px) scale(0); opacity: 0; }
}

/* Mana Bar */
.mana-bar {
    width: 100%;
    height: 10px;
    background: linear-gradient(180deg, #0a0a1a 0%, #1a1a2e 100%);
    border-radius: 5px;
    margin-top: 10px;
    overflow: hidden;
    border: 2px solid #333;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5);
}

.mana-fill {
    height: 100%;
    background: linear-gradient(90deg, #0044ff, #00aaff, #00ccff);
    border-radius: 3px;
    transition: width 0.3s ease;
    box-shadow: 0 0 15px #00ccff, inset 0 0 10px rgba(255, 255, 255, 0.3);
    position: relative;
}

.mana-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0%, transparent 100%);
    border-radius: 3px 3px 0 0;
}

/* Casting Effect */
.casting-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.casting-ring {
    width: 180px;
    height: 180px;
    border: 3px solid #ff9900;
    border-radius: 50%;
    animation: casting-expand 0.6s ease-out forwards;
    opacity: 0;
    box-shadow: 0 0 20px #ff6600, inset 0 0 20px rgba(255, 100, 0, 0.3);
}

.casting-ring.delay {
    animation-delay: 0.15s;
    border-color: #ffcc00;
}

@keyframes casting-expand {
    0% { transform: scale(0.3); opacity: 1; }
    100% { transform: scale(2.5); opacity: 0; }
}

/* Spell Projectiles */
.spell-projectile {
    position: absolute;
    width: 40px;
    height: 40px;
    pointer-events: none;
    z-index: 55;
}

.spell-projectile .spell-core {
    font-size: 30px;
    animation: spell-pulse 0.2s ease-in-out infinite;
    user-select: none;
}

.spell-projectile.fire .spell-core {
    filter: drop-shadow(0 0 15px #ff6600) drop-shadow(0 0 30px #ff0000);
}

.spell-projectile.ice .spell-core {
    filter: drop-shadow(0 0 15px #00ffff) drop-shadow(0 0 30px #0088ff);
}

.spell-projectile.arcane .spell-core {
    filter: drop-shadow(0 0 15px #ff00ff) drop-shadow(0 0 30px #9900ff);
}

.spell-projectile.holy .spell-core {
    filter: drop-shadow(0 0 15px #ffff00) drop-shadow(0 0 30px #ffaa00);
}

@keyframes spell-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.spell-trail {
    position: absolute;
    width: 60px;
    height: 15px;
    right: 25px;
    top: 12px;
    background: linear-gradient(to left, currentColor, transparent);
    opacity: 0.6;
    border-radius: 10px;
    filter: blur(3px);
}

/* Monsters */
.bg-monster {
    position: absolute;
    width: 60px;
    height: 70px;
    cursor: pointer;
    pointer-events: auto;
    transition: transform 0.1s ease;
    z-index: 10;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.bg-monster:hover {
    transform: scale(1.2);
    z-index: 4;
}

.bg-monster:hover .monster-emoji {
    animation: monster-shake 0.2s infinite;
}

@keyframes monster-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

.bg-monster.hit {
    animation: monster-hit 0.2s ease-out;
}

@keyframes monster-hit {
    0% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.3); filter: brightness(2) drop-shadow(0 0 20px #fff); }
    100% { transform: scale(1); filter: brightness(1); }
}

.bg-monster.dying {
    animation: monster-die 0.5s ease-out forwards;
}

@keyframes monster-die {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5) rotate(180deg); opacity: 0.5; }
    100% { transform: scale(0) rotate(360deg); opacity: 0; }
}

.monster-body {
    position: relative;
    text-align: center;
}

.monster-emoji {
    font-size: 50px;
    display: block;
    filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.8));
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: none;
}

.monster-shadow {
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 10px;
    background: radial-gradient(ellipse, rgba(0, 0, 0, 0.3) 0%, transparent 70%);
    border-radius: 50%;
}

/* Monster type specific animations */
.bg-monster.bat .monster-emoji {
    animation: bat-fly 0.5s ease-in-out infinite;
}

@keyframes bat-fly {
    0%, 100% { transform: translateY(0) scaleX(1); }
    50% { transform: translateY(-5px) scaleX(0.9); }
}

.bg-monster.ghost .monster-emoji {
    animation: ghost-float 2s ease-in-out infinite;
    opacity: 0.8;
}

@keyframes ghost-float {
    0%, 100% { transform: translateY(0); opacity: 0.8; }
    50% { transform: translateY(-10px); opacity: 0.6; }
}

.bg-monster.slime .monster-emoji {
    animation: slime-bounce 1s ease-in-out infinite;
}

@keyframes slime-bounce {
    0%, 100% { transform: scaleY(1) scaleX(1); }
    50% { transform: scaleY(0.8) scaleX(1.1); }
}

.bg-monster.skeleton .monster-emoji {
    animation: skeleton-rattle 0.5s ease-in-out infinite;
}

@keyframes skeleton-rattle {
    0%, 100% { transform: rotate(-2deg); }
    50% { transform: rotate(2deg); }
}

.bg-monster.demon .monster-emoji {
    filter: drop-shadow(0 0 10px #ff0000);
}

.bg-monster.dragon .monster-emoji {
    filter: drop-shadow(0 0 15px #ff6600);
    animation: dragon-breathe 2s ease-in-out infinite;
}

@keyframes dragon-breathe {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 15px #ff6600); }
    50% { transform: scale(1.05); filter: drop-shadow(0 0 25px #ff0000); }
}

/* Monster Health Bar */
.monster-health-bar {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 5px;
    background: #333;
    border-radius: 3px;
    border: 1px solid #666;
    overflow: hidden;
}

.monster-health-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff0000, #00ff00);
    transition: width 0.2s ease;
    border-radius: 2px;
}

/* Spell Explosion */
.spell-explosion {
    position: absolute;
    font-size: 50px;
    pointer-events: none;
    animation: explosion 0.5s ease-out forwards;
    z-index: 55;
    user-select: none;
}

.spell-explosion.fire {
    filter: drop-shadow(0 0 20px #ff6600);
}

.spell-explosion.ice {
    filter: drop-shadow(0 0 20px #00ffff);
}

.spell-explosion.arcane {
    filter: drop-shadow(0 0 20px #ff00ff);
}

.spell-explosion.holy {
    filter: drop-shadow(0 0 20px #ffff00);
}

@keyframes explosion {
    0% { transform: scale(0.5); opacity: 1; }
    50% { transform: scale(1.8); opacity: 1; }
    100% { transform: scale(2.5); opacity: 0; }
}

/* Kill Counter */
.kill-counter {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid var(--gold);
    border-radius: 10px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-title);
    z-index: 100;
    pointer-events: auto;
    box-shadow: var(--glow-gold);
}

.kill-icon {
    font-size: 1.5rem;
}

.kill-count {
    font-size: 1.5rem;
    color: var(--gold);
    font-weight: bold;
}

.kill-label {
    font-size: 0.8rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Combo Indicator */
.combo-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 200;
    pointer-events: none;
    animation: combo-pop 0.5s ease-out forwards;
}

.combo-text {
    font-family: var(--font-title);
    font-size: 3rem;
    color: var(--gold);
    text-shadow: 
        0 0 20px var(--gold),
        0 0 40px #ff6600,
        2px 2px 0 #000;
    animation: combo-shake 0.1s linear infinite;
}

@keyframes combo-pop {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

@keyframes combo-shake {
    0%, 100% { transform: translate(-50%, -50%) rotate(-1deg); }
    50% { transform: translate(-50%, -50%) rotate(1deg); }
}

/* Monster spawn animations */
.bg-monster.from-right {
    animation: spawn-from-right 0.5s ease-out;
}

.bg-monster.from-top {
    animation: spawn-from-top 0.5s ease-out;
}

.bg-monster.from-bottom {
    animation: spawn-from-bottom 0.5s ease-out;
}

@keyframes spawn-from-right {
    0% { opacity: 0; transform: translateX(50px); }
    100% { opacity: 1; transform: translateX(0); }
}

@keyframes spawn-from-top {
    0% { opacity: 0; transform: translateY(-50px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes spawn-from-bottom {
    0% { opacity: 0; transform: translateY(50px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Spider specific */
.bg-monster.spider .monster-emoji {
    animation: spider-crawl 0.5s ease-in-out infinite;
}

@keyframes spider-crawl {
    0%, 100% { transform: translateX(0) scaleX(1); }
    25% { transform: translateX(-2px) scaleX(0.95); }
    75% { transform: translateX(2px) scaleX(0.95); }
}

/* Zombie specific */
.bg-monster.zombie .monster-emoji {
    animation: zombie-shamble 1s ease-in-out infinite;
}

@keyframes zombie-shamble {
    0%, 100% { transform: rotate(-3deg); }
    50% { transform: rotate(3deg); }
}

/* Game Instructions */
.game-instructions {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--cyan);
    border-radius: 8px;
    padding: 8px 16px;
    font-family: var(--font-fantasy);
    font-size: 0.9rem;
    color: var(--cyan);
    z-index: 100;
    animation: fade-pulse 2s ease-in-out infinite;
}

@keyframes fade-pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* ========================================
   WIZARD NICKNAME & LEVEL SYSTEM
   ======================================== */

/* Nickname Display */
.wizard-nickname {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 10;
    white-space: nowrap;
}

.nickname-text {
    display: block;
    font-family: var(--font-fantasy);
    font-size: 1.4rem;
    color: var(--gold);
    text-shadow: 
        0 0 10px var(--gold),
        0 0 20px rgba(255, 170, 0, 0.5),
        2px 2px 0 #000;
    letter-spacing: 2px;
}

.nickname-title {
    display: block;
    font-family: var(--font-title);
    font-size: 0.7rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-top: 2px;
    transition: color 0.5s ease;
}

/* Level Badge */
.wizard-level-badge {
    position: absolute;
    bottom: -10px;
    right: -10px;
    width: 50px;
    height: 50px;
    background: linear-gradient(145deg, #1a1a2e, #0a0a1a);
    border: 3px solid var(--gold);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 0 15px rgba(255, 170, 0, 0.5),
        inset 0 0 10px rgba(0, 0, 0, 0.5);
    z-index: 15;
    transition: all 0.3s ease;
}

.level-number {
    font-family: var(--font-fantasy);
    font-size: 1.4rem;
    color: var(--gold);
    line-height: 1;
    text-shadow: 0 0 10px var(--gold);
}

.level-label {
    font-family: var(--font-title);
    font-size: 0.5rem;
    color: #888;
    letter-spacing: 1px;
}

.wizard-level-badge.level-up {
    animation: level-badge-pop 0.5s ease-out;
    border-color: #fff;
    box-shadow: 
        0 0 30px #fff,
        0 0 60px var(--gold),
        inset 0 0 20px rgba(255, 255, 255, 0.3);
}

@keyframes level-badge-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.5); }
    100% { transform: scale(1); }
}

/* XP Bar */
.wizard-xp-bar {
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    width: 130px;
    height: 12px;
    background: linear-gradient(180deg, #0a0a1a 0%, #1a1a2e 100%);
    border-radius: 6px;
    border: 2px solid #444;
    overflow: hidden;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5);
}

.xp-fill {
    height: 100%;
    background: linear-gradient(90deg, #22aa44, #44ff66, #66ff88);
    border-radius: 4px;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px #44ff66, inset 0 0 5px rgba(255, 255, 255, 0.3);
    position: relative;
}

.xp-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, transparent 100%);
    border-radius: 4px 4px 0 0;
}

.xp-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-title);
    font-size: 0.6rem;
    color: #fff;
    text-shadow: 1px 1px 2px #000;
    white-space: nowrap;
}

/* Level Up Effect */
.level-up-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 20;
    pointer-events: none;
    animation: level-up-float 2s ease-out forwards;
}

.level-up-text {
    font-family: var(--font-fantasy);
    font-size: 2rem;
    color: #fff;
    text-shadow: 
        0 0 10px #fff,
        0 0 20px var(--gold),
        0 0 40px #ff6600,
        3px 3px 0 #000;
    animation: level-up-glow 0.5s ease-in-out infinite;
}

@keyframes level-up-float {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 1; }
    50% { transform: translate(-50%, -100%) scale(1.2); opacity: 1; }
    100% { transform: translate(-50%, -150%) scale(1); opacity: 0; }
}

@keyframes level-up-glow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.5); }
}

/* Level Glow Ring - orbits portrait at higher levels */
.level-glow-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140%;
    height: 140%;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    transition: all 0.5s ease;
}

/* ========================================
   LEVEL TIER GLOW EFFECTS
   ======================================== */

/* Level Tier 1 (Level 1) - Basic blue glow */
.wizard-portrait.level-1 .portrait-frame {
    box-shadow: 
        0 0 10px rgba(0, 170, 255, 0.3),
        inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.wizard-portrait.level-1 .portrait-glow {
    background: radial-gradient(circle at center, rgba(0, 170, 255, 0.2) 0%, transparent 70%);
}

.wizard-portrait.level-1 .nickname-title {
    color: #5599cc;
}

/* Level Tier 2 (Levels 2-3) - Cyan with pulse */
.wizard-portrait.level-2 .portrait-frame {
    box-shadow: 
        0 0 20px rgba(0, 255, 255, 0.4),
        0 0 40px rgba(0, 170, 255, 0.2),
        inset 0 0 15px rgba(0, 255, 255, 0.1);
    animation: tier2-glow 2s ease-in-out infinite;
}

.wizard-portrait.level-2 .portrait-glow {
    background: radial-gradient(circle at center, rgba(0, 255, 255, 0.3) 0%, transparent 70%);
    animation: glow-pulse 2s ease-in-out infinite;
}

.wizard-portrait.level-2 .nickname-title {
    color: #00ffff;
}

.wizard-portrait.level-2 .wizard-level-badge {
    border-color: #00ffff;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

@keyframes tier2-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 255, 255, 0.4), 0 0 40px rgba(0, 170, 255, 0.2); }
    50% { box-shadow: 0 0 30px rgba(0, 255, 255, 0.6), 0 0 60px rgba(0, 170, 255, 0.3); }
}

@keyframes glow-pulse {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

/* Level Tier 3 (Levels 4-5) - Purple epic with ring */
.wizard-portrait.level-3 .portrait-frame {
    box-shadow: 
        0 0 30px rgba(170, 0, 255, 0.5),
        0 0 60px rgba(100, 0, 200, 0.3),
        inset 0 0 20px rgba(170, 0, 255, 0.2);
    animation: tier3-glow 2s ease-in-out infinite;
}

.wizard-portrait.level-3 .portrait-glow {
    background: radial-gradient(circle at center, rgba(170, 0, 255, 0.4) 0%, transparent 70%);
    animation: glow-pulse 1.5s ease-in-out infinite;
}

.wizard-portrait.level-3 .level-glow-ring {
    opacity: 0.6;
    border: 2px solid rgba(170, 0, 255, 0.5);
    animation: ring-rotate 8s linear infinite;
}

.wizard-portrait.level-3 .nickname-text {
    color: var(--epic);
    text-shadow: 0 0 15px var(--epic), 0 0 30px rgba(170, 0, 255, 0.5);
}

.wizard-portrait.level-3 .nickname-title {
    color: #bb66ff;
}

.wizard-portrait.level-3 .wizard-level-badge {
    border-color: var(--epic);
    box-shadow: 0 0 25px rgba(170, 0, 255, 0.6);
}

.wizard-portrait.level-3 .level-number {
    color: var(--epic);
    text-shadow: 0 0 15px var(--epic);
}

@keyframes tier3-glow {
    0%, 100% { box-shadow: 0 0 30px rgba(170, 0, 255, 0.5), 0 0 60px rgba(100, 0, 200, 0.3); }
    50% { box-shadow: 0 0 50px rgba(170, 0, 255, 0.7), 0 0 100px rgba(100, 0, 200, 0.4); }
}

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

/* Level Tier 4 (Levels 6-8) - Legendary orange/gold with multiple rings */
.wizard-portrait.level-4 .portrait-frame {
    box-shadow: 
        0 0 40px rgba(255, 150, 0, 0.6),
        0 0 80px rgba(255, 100, 0, 0.4),
        0 0 120px rgba(255, 50, 0, 0.2),
        inset 0 0 30px rgba(255, 150, 0, 0.3);
    animation: tier4-glow 1.5s ease-in-out infinite;
    border-color: var(--legendary);
}

.wizard-portrait.level-4 .portrait-glow {
    background: radial-gradient(circle at center, rgba(255, 150, 0, 0.5) 0%, rgba(255, 50, 0, 0.2) 50%, transparent 70%);
    animation: glow-pulse 1s ease-in-out infinite;
}

.wizard-portrait.level-4 .level-glow-ring {
    opacity: 0.8;
    border: 3px solid rgba(255, 150, 0, 0.7);
    box-shadow: 0 0 20px rgba(255, 100, 0, 0.5);
    animation: ring-rotate 6s linear infinite;
}

.wizard-portrait.level-4 .level-glow-ring::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 2px dashed rgba(255, 200, 0, 0.5);
    border-radius: 50%;
    animation: ring-rotate-reverse 10s linear infinite;
}

.wizard-portrait.level-4 .nickname-text {
    color: var(--legendary);
    text-shadow: 0 0 15px var(--legendary), 0 0 30px rgba(255, 100, 0, 0.7);
    animation: legendary-shimmer 2s ease-in-out infinite;
}

.wizard-portrait.level-4 .nickname-title {
    color: var(--gold);
}

.wizard-portrait.level-4 .wizard-level-badge {
    border-color: var(--legendary);
    box-shadow: 0 0 30px rgba(255, 150, 0, 0.7), 0 0 60px rgba(255, 100, 0, 0.4);
    animation: badge-glow 1.5s ease-in-out infinite;
}

.wizard-portrait.level-4 .level-number {
    color: var(--legendary);
    text-shadow: 0 0 20px var(--legendary);
}

@keyframes tier4-glow {
    0%, 100% { 
        box-shadow: 0 0 40px rgba(255, 150, 0, 0.6), 0 0 80px rgba(255, 100, 0, 0.4), 0 0 120px rgba(255, 50, 0, 0.2);
    }
    50% { 
        box-shadow: 0 0 60px rgba(255, 150, 0, 0.8), 0 0 120px rgba(255, 100, 0, 0.5), 0 0 180px rgba(255, 50, 0, 0.3);
    }
}

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

@keyframes legendary-shimmer {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.3); }
}

@keyframes badge-glow {
    0%, 100% { box-shadow: 0 0 30px rgba(255, 150, 0, 0.7); }
    50% { box-shadow: 0 0 50px rgba(255, 150, 0, 1), 0 0 80px rgba(255, 100, 0, 0.6); }
}

/* Level Tier 5 (Level 9+) - Unique/Mythical with rainbow/golden divine glow */
.wizard-portrait.level-5 .portrait-frame {
    box-shadow: 
        0 0 50px rgba(255, 215, 0, 0.8),
        0 0 100px rgba(255, 150, 0, 0.5),
        0 0 150px rgba(255, 100, 50, 0.3),
        0 0 200px rgba(200, 100, 200, 0.2),
        inset 0 0 40px rgba(255, 215, 0, 0.4);
    animation: tier5-glow 1s ease-in-out infinite;
    border: 4px solid;
    border-image: linear-gradient(45deg, #ffd700, #ff6600, #ff00ff, #00ffff, #ffd700) 1;
}

.wizard-portrait.level-5 .portrait-glow {
    background: conic-gradient(from 0deg, 
        rgba(255, 215, 0, 0.5), 
        rgba(255, 100, 0, 0.4), 
        rgba(255, 0, 150, 0.4), 
        rgba(150, 0, 255, 0.4), 
        rgba(0, 150, 255, 0.4), 
        rgba(255, 215, 0, 0.5));
    animation: divine-rotate 4s linear infinite;
    opacity: 0.8;
}

.wizard-portrait.level-5 .level-glow-ring {
    opacity: 1;
    border: 4px solid transparent;
    background: linear-gradient(transparent, transparent) padding-box,
                linear-gradient(45deg, #ffd700, #ff6600, #ff00ff, #00ffff, #ffd700) border-box;
    box-shadow: 
        0 0 30px rgba(255, 215, 0, 0.6),
        0 0 60px rgba(255, 100, 0, 0.4);
    animation: ring-rotate 4s linear infinite;
}

.wizard-portrait.level-5 .level-glow-ring::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    border: 3px solid rgba(255, 215, 0, 0.4);
    border-radius: 50%;
    animation: ring-rotate-reverse 6s linear infinite;
}

.wizard-portrait.level-5 .level-glow-ring::after {
    content: '';
    position: absolute;
    top: -35px;
    left: -35px;
    right: -35px;
    bottom: -35px;
    border: 2px dashed rgba(255, 100, 255, 0.3);
    border-radius: 50%;
    animation: ring-rotate 8s linear infinite;
}

.wizard-portrait.level-5 .nickname-text {
    background: linear-gradient(90deg, #ffd700, #ff6600, #ff00ff, #00ffff, #ffd700);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: rainbow-flow 3s linear infinite;
    font-size: 1.6rem;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8));
}

.wizard-portrait.level-5 .nickname-title {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
    letter-spacing: 4px;
}

.wizard-portrait.level-5 .wizard-level-badge {
    border: 3px solid transparent;
    background: linear-gradient(145deg, #1a1a2e, #0a0a1a) padding-box,
                linear-gradient(45deg, #ffd700, #ff6600, #ff00ff, #ffd700) border-box;
    box-shadow: 
        0 0 40px rgba(255, 215, 0, 0.8),
        0 0 80px rgba(255, 100, 0, 0.5);
    animation: divine-badge-pulse 1s ease-in-out infinite;
}

.wizard-portrait.level-5 .level-number {
    background: linear-gradient(90deg, #ffd700, #ff6600, #ffd700);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: rainbow-flow 2s linear infinite;
    font-size: 1.6rem;
}

.wizard-portrait.level-5 .xp-fill {
    background: linear-gradient(90deg, #ffd700, #ff6600, #ff00ff, #00ffff, #ffd700);
    background-size: 200% auto;
    animation: rainbow-flow 3s linear infinite;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
}

@keyframes tier5-glow {
    0%, 100% { 
        box-shadow: 0 0 50px rgba(255, 215, 0, 0.8), 0 0 100px rgba(255, 150, 0, 0.5), 0 0 150px rgba(255, 100, 50, 0.3);
    }
    50% { 
        box-shadow: 0 0 80px rgba(255, 215, 0, 1), 0 0 150px rgba(255, 150, 0, 0.7), 0 0 220px rgba(255, 100, 50, 0.4);
    }
}

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

@keyframes rainbow-flow {
    from { background-position: 0% center; }
    to { background-position: 200% center; }
}

@keyframes divine-badge-pulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 40px rgba(255, 215, 0, 0.8), 0 0 80px rgba(255, 100, 0, 0.5);
    }
    50% { 
        transform: scale(1.1);
        box-shadow: 0 0 60px rgba(255, 215, 0, 1), 0 0 120px rgba(255, 100, 0, 0.7);
    }
}

/* Particle color changes per level */
.wizard-portrait.level-2 .wizard-particle {
    background: radial-gradient(circle, #00ffff 0%, #0088ff 50%, transparent 100%);
    box-shadow: 0 0 10px #00ffff, 0 0 20px #0088ff;
}

.wizard-portrait.level-3 .wizard-particle {
    background: radial-gradient(circle, #bb66ff 0%, #9900ff 50%, transparent 100%);
    box-shadow: 0 0 10px #bb66ff, 0 0 20px #9900ff;
}

.wizard-portrait.level-4 .wizard-particle {
    background: radial-gradient(circle, #ffd700 0%, #ff6600 50%, transparent 100%);
    box-shadow: 0 0 15px #ffd700, 0 0 30px #ff6600;
}

.wizard-portrait.level-5 .wizard-particle {
    animation: particle-orbit-rainbow 3s ease-in-out infinite;
}

.wizard-portrait.level-5 .wizard-particle:nth-child(odd) {
    background: radial-gradient(circle, #ffd700 0%, #ff6600 50%, transparent 100%);
}

.wizard-portrait.level-5 .wizard-particle:nth-child(even) {
    background: radial-gradient(circle, #ff00ff 0%, #00ffff 50%, transparent 100%);
}

@keyframes particle-orbit-rainbow {
    0% { 
        transform: rotate(var(--angle)) translateX(80px) rotate(calc(-1 * var(--angle))) scale(0.5);
        opacity: 0.5;
        filter: hue-rotate(0deg);
    }
    50% { 
        transform: rotate(calc(var(--angle) + 180deg)) translateX(100px) rotate(calc(-1 * (var(--angle) + 180deg))) scale(1.2);
        opacity: 1;
        filter: hue-rotate(180deg);
    }
    100% { 
        transform: rotate(calc(var(--angle) + 360deg)) translateX(80px) rotate(calc(-1 * (var(--angle) + 360deg))) scale(0.5);
        opacity: 0.5;
        filter: hue-rotate(360deg);
    }
}

/* ============================================
   SPELLS SECTION
   ============================================ */
.spells-section {
    background: 
        radial-gradient(ellipse at center, rgba(0, 255, 255, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at bottom left, rgba(155, 89, 182, 0.1) 0%, transparent 50%),
        var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

.spells-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 5L35 25H55L39 35L45 55L30 43L15 55L21 35L5 25H25L30 5Z' fill='none' stroke='%23ffd700' stroke-width='0.3' opacity='0.15'/%3E%3C/svg%3E");
    background-size: 120px 120px;
    pointer-events: none;
    animation: spell-pattern-float 30s linear infinite;
}

@keyframes spell-pattern-float {
    from { background-position: 0 0; }
    to { background-position: 120px 120px; }
}

.spells-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.spell-card {
    background: linear-gradient(145deg, var(--bg-card) 0%, rgba(10, 10, 15, 0.95) 100%);
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 2rem;
    position: relative;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

.spell-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(0, 255, 255, 0.1) 0%, 
        transparent 50%,
        rgba(155, 89, 182, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 10px;
}

.spell-card:hover::before {
    opacity: 1;
}

.spell-card.legendary {
    border-color: var(--legendary);
    box-shadow: 0 0 20px rgba(255, 128, 0, 0.2);
}

.spell-card.epic {
    border-color: var(--epic);
    box-shadow: 0 0 20px rgba(163, 53, 238, 0.2);
}

.spell-card.rare {
    border-color: var(--rare);
    box-shadow: 0 0 20px rgba(0, 112, 221, 0.2);
}

.spell-card:hover {
    transform: translateY(-8px) scale(1.02);
}

.spell-card.legendary:hover {
    box-shadow: 0 0 40px rgba(255, 128, 0, 0.4), 0 10px 40px rgba(0, 0, 0, 0.3);
}

.spell-card.epic:hover {
    box-shadow: 0 0 40px rgba(163, 53, 238, 0.4), 0 10px 40px rgba(0, 0, 0, 0.3);
}

.spell-card.rare:hover {
    box-shadow: 0 0 40px rgba(0, 112, 221, 0.4), 0 10px 40px rgba(0, 0, 0, 0.3);
}

.spell-icon-container {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
}

.spell-icon-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    border-radius: 50%;
    opacity: 0.5;
    filter: blur(20px);
    animation: spell-glow-pulse 3s ease-in-out infinite;
}

.spell-card.legendary .spell-icon-glow {
    background: radial-gradient(circle, var(--legendary) 0%, transparent 70%);
}

.spell-card.epic .spell-icon-glow {
    background: radial-gradient(circle, var(--epic) 0%, transparent 70%);
}

.spell-card.rare .spell-icon-glow {
    background: radial-gradient(circle, var(--rare) 0%, transparent 70%);
}

@keyframes spell-glow-pulse {
    0%, 100% { opacity: 0.3; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.6; transform: translate(-50%, -50%) scale(1.2); }
}

.spell-icon {
    position: relative;
    font-size: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    z-index: 1;
    animation: spell-float 3s ease-in-out infinite;
}

@keyframes spell-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.spell-runes {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border: 2px dashed var(--gold-dark);
    border-radius: 50%;
    animation: spell-rune-rotate 10s linear infinite;
    opacity: 0.4;
}

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

.spell-name {
    font-family: var(--font-title);
    font-size: 1.4rem;
    text-align: center;
    margin-bottom: 0.5rem;
}

.spell-card.legendary .spell-name {
    color: var(--legendary);
    text-shadow: 0 0 10px rgba(255, 128, 0, 0.5);
}

.spell-card.epic .spell-name {
    color: var(--epic);
    text-shadow: 0 0 10px rgba(163, 53, 238, 0.5);
}

.spell-card.rare .spell-name {
    color: var(--rare);
    text-shadow: 0 0 10px rgba(0, 112, 221, 0.5);
}

.spell-school {
    font-family: var(--font-fantasy);
    font-size: 0.85rem;
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.spell-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    font-style: italic;
}

.spell-stats {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.spell-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.spell-stat-icon {
    font-size: 1.2rem;
}

.spell-stat-value {
    font-family: var(--font-title);
    font-size: 0.9rem;
    color: var(--cyan);
}

.spell-stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.spell-cast-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    border: 2px solid var(--gold-dark);
    border-radius: 8px;
    font-family: var(--font-title);
    font-size: 1rem;
    color: var(--gold);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.spell-cast-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.2), transparent);
    transition: left 0.5s ease;
}

.spell-cast-btn:hover {
    border-color: var(--gold);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
    transform: translateY(-2px);
}

.spell-cast-btn:hover::before {
    left: 100%;
}

.spell-cast-btn:active {
    transform: translateY(0);
}

.spell-cast-icon {
    font-size: 1.2rem;
    animation: spell-btn-glow 2s ease-in-out infinite;
}

@keyframes spell-btn-glow {
    0%, 100% { filter: drop-shadow(0 0 2px var(--gold)); }
    50% { filter: drop-shadow(0 0 8px var(--gold)); }
}

/* ============================================
   SCREEN SHARE MODAL
   ============================================ */
.screen-share-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modal-fade-in 0.3s ease-out;
}

@keyframes modal-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.screen-share-modal {
    background: linear-gradient(145deg, var(--bg-card) 0%, var(--bg-primary) 100%);
    border: 2px solid var(--cyan);
    border-radius: 16px;
    width: 95%;
    max-width: 900px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 
        0 0 50px rgba(0, 255, 255, 0.3),
        0 0 100px rgba(155, 89, 182, 0.2);
    animation: modal-scale-in 0.3s ease-out;
}

@keyframes modal-scale-in {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.screen-share-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    background: linear-gradient(90deg, rgba(0, 255, 255, 0.1) 0%, rgba(155, 89, 182, 0.1) 100%);
    border-bottom: 1px solid var(--cyan-dark);
}

.screen-share-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.screen-share-title-icon {
    font-size: 2rem;
    animation: spell-float 2s ease-in-out infinite;
}

.screen-share-title h3 {
    font-family: var(--font-title);
    font-size: 1.5rem;
    color: var(--cyan);
    margin: 0;
}

.screen-share-close {
    background: transparent;
    border: 2px solid var(--text-muted);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.screen-share-close:hover {
    border-color: var(--red);
    color: var(--red);
    transform: rotate(90deg);
}

.screen-share-content {
    padding: 2rem;
    overflow-y: auto;
    max-height: calc(90vh - 80px);
}

/* Mode Selection */
.spell-mode-select {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.spell-mode-card {
    background: var(--bg-tertiary);
    border: 2px solid var(--gold-dark);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.spell-mode-card:hover {
    border-color: var(--gold);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.spell-mode-card.active {
    border-color: var(--cyan);
    background: linear-gradient(145deg, var(--bg-tertiary) 0%, rgba(0, 255, 255, 0.05) 100%);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.2);
}

.spell-mode-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.spell-mode-title {
    font-family: var(--font-title);
    font-size: 1.2rem;
    color: var(--gold);
    margin-bottom: 0.5rem;
}

.spell-mode-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Sharing Panel */
.sharing-panel {
    animation: panel-slide-in 0.3s ease-out;
}

@keyframes panel-slide-in {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.sharing-preview-container {
    background: var(--bg-primary);
    border: 2px solid var(--gold-dark);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sharing-preview-container video {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
}

.sharing-preview-placeholder {
    text-align: center;
    color: var(--text-muted);
}

.sharing-preview-placeholder .placeholder-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.sharing-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border-radius: 20px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: status-pulse 1.5s ease-in-out infinite;
}

.status-dot.live {
    background: var(--green);
    box-shadow: 0 0 10px var(--green);
}

.status-dot.waiting {
    background: var(--gold);
    box-shadow: 0 0 10px var(--gold);
}

.status-dot.offline {
    background: var(--text-muted);
}

@keyframes status-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.2); }
}

.status-text {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.share-url-container {
    background: var(--bg-tertiary);
    border: 1px solid var(--gold-dark);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.share-url-label {
    font-family: var(--font-title);
    font-size: 0.9rem;
    color: var(--gold);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.share-url-input-group {
    display: flex;
    gap: 0.5rem;
}

.share-url-input {
    flex: 1;
    background: var(--bg-primary);
    border: 1px solid var(--gold-dark);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--cyan);
    outline: none;
}

.share-url-input:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

.copy-url-btn {
    background: linear-gradient(135deg, var(--gold-dark) 0%, var(--legendary) 100%);
    border: none;
    border-radius: 6px;
    padding: 0.75rem 1.25rem;
    font-family: var(--font-title);
    font-size: 0.9rem;
    color: var(--bg-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.copy-url-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.4);
}

.copy-url-btn.copied {
    background: linear-gradient(135deg, var(--green) 0%, #1a9e4c 100%);
}

.sharing-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.spell-action-btn {
    padding: 1rem 2rem;
    border: 2px solid;
    border-radius: 8px;
    font-family: var(--font-title);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.spell-action-btn.primary {
    background: linear-gradient(135deg, var(--cyan-dark) 0%, var(--cyan) 100%);
    border-color: var(--cyan);
    color: var(--bg-primary);
}

.spell-action-btn.primary:hover {
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
    transform: translateY(-3px);
}

.spell-action-btn.danger {
    background: transparent;
    border-color: var(--red);
    color: var(--red);
}

.spell-action-btn.danger:hover {
    background: var(--red);
    color: var(--bg-primary);
    box-shadow: 0 0 30px rgba(231, 76, 60, 0.5);
}

/* Join Session Panel */
.join-panel {
    animation: panel-slide-in 0.3s ease-out;
}

.join-input-container {
    margin-bottom: 1.5rem;
}

.join-input-label {
    font-family: var(--font-title);
    font-size: 1rem;
    color: var(--gold);
    margin-bottom: 0.75rem;
    display: block;
}

.join-input {
    width: 100%;
    background: var(--bg-primary);
    border: 2px solid var(--gold-dark);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    font-family: monospace;
    font-size: 1rem;
    color: var(--cyan);
    outline: none;
    transition: all 0.3s ease;
}

.join-input:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
}

.join-input::placeholder {
    color: var(--text-muted);
}

.join-actions {
    display: flex;
    justify-content: center;
}

/* Viewer Panel */
.viewer-panel {
    animation: panel-slide-in 0.3s ease-out;
}

.viewer-video-container {
    background: var(--bg-primary);
    border: 2px solid var(--cyan);
    border-radius: 12px;
    padding: 1rem;
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.2);
}

.viewer-video-container video {
    max-width: 100%;
    max-height: 500px;
    border-radius: 8px;
}

/* Fullscreen button overlay */
.fullscreen-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid var(--cyan);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    color: var(--cyan);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.fullscreen-btn:hover {
    background: rgba(0, 255, 255, 0.2);
    box-shadow: var(--glow-cyan);
    transform: scale(1.1);
}

/* Fullscreen mode styles */
.viewer-video-container:fullscreen {
    padding: 0;
    border: none;
    border-radius: 0;
    background: #000;
}

.viewer-video-container:fullscreen video {
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0;
}

.viewer-video-container:fullscreen .fullscreen-btn {
    position: fixed;
    top: 1rem;
    right: 1rem;
}

.viewer-video-container:fullscreen .connecting-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.connecting-indicator {
    text-align: center;
    color: var(--text-secondary);
}

.connecting-indicator .connecting-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: connecting-pulse 1.5s ease-in-out infinite;
}

@keyframes connecting-pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

.connecting-indicator p {
    font-family: var(--font-fantasy);
    font-size: 1.1rem;
}

.connecting-hint {
    font-size: 0.85rem !important;
    color: var(--text-muted) !important;
    margin-top: 0.5rem;
}

.local-demo-notice {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid var(--gold-dark);
    border-radius: 8px;
}

.local-demo-notice p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
    text-align: center;
}

.local-demo-notice strong {
    color: var(--gold);
}

.local-demo-notice code {
    background: var(--bg-primary);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: monospace;
    color: var(--cyan);
    font-size: 0.85rem;
}

.viewer-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Spell Features List */
.spell-features {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gold-dark);
}

.spell-features-title {
    font-family: var(--font-title);
    font-size: 1rem;
    color: var(--gold);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.spell-features-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.spell-feature {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

.spell-feature-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.spell-feature-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .spell-mode-select {
        grid-template-columns: 1fr;
    }
    
    .screen-share-modal {
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }
    
    .share-url-input-group {
        flex-direction: column;
    }
    
    .sharing-actions {
        flex-direction: column;
    }
    
    .spell-action-btn {
        width: 100%;
        justify-content: center;
    }
}
