/**
 * Dark Realms - Base Styles
 * Zmienne CSS, fonty, reset, animacje bazowe
 */

/* =============================================
   CSS RESET & BOX-SIZING
============================================= */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* =============================================
   CSS VARIABLES
============================================= */
:root {
    /* Gold palette */
    --gold: #c9a227;
    --gold-bright: #e8d068;
    --gold-dim: #6b5a1e;
    --gold-50: #fdf8e1;
    --gold-100: #f9edb8;
    --gold-200: #f4e08a;
    --gold-300: #efd35c;
    --gold-400: #e9c638;
    --gold-500: #d4a417;
    --gold-600: #a67c12;
    --gold-700: #78590d;
    --gold-800: #4a3708;
    
    /* Blood/Danger palette */
    --blood: #8b1e1e;
    --blood-bright: #c62828;
    --danger: #ef4444;
    
    /* Health/Success */
    --health-green: #2e7d32;
    --health-bright: #4caf50;
    --success: #22c55e;
    
    /* Mana/Info */
    --mana-blue: #1565c0;
    --mana-bright: #42a5f5;
    --info: #3b82f6;
    
    /* Dark palette */
    --void: #050508;
    --obsidian: #0c0c12;
    --obsidian-900: #0a0a0f;
    --obsidian-800: #12121a;
    --obsidian-700: #1a1a25;
    --obsidian-600: #222230;
    --slate: #1a1a24;
    --ash: #2a2a38;
    --smoke: #8888a0;
    
    /* Card dimensions */
    --card-width: 260px;
    --card-height: 380px;
    
    /* Transitions */
    --transition-fast: 150ms;
    --transition-normal: 300ms;
    --transition-slow: 500ms;
}

/* =============================================
   BASE TYPOGRAPHY
============================================= */
html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Cormorant Garamond', 'Crimson Text', Georgia, serif;
    background: var(--void);
    color: #e0e0e0;
    line-height: 1.5;
}

/* Cinzel for headings */
h1, h2, h3, h4, h5, h6,
.font-cinzel {
    font-family: 'Cinzel', serif;
}

/* =============================================
   BACKGROUND NOISE OVERLAY
============================================= */
.bg-noise::before,
.has-noise::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    z-index: 0;
}

/* =============================================
   BASE ANIMATIONS
============================================= */

/* Title glow animation */
@keyframes titleGlow {
    0%, 100% { 
        text-shadow: 0 0 20px rgba(212,164,23,0.3), 0 0 40px rgba(212,164,23,0.2); 
    }
    50% { 
        text-shadow: 0 0 30px rgba(212,164,23,0.5), 0 0 60px rgba(212,164,23,0.3); 
    }
}
.animate-title-glow { 
    animation: titleGlow 3s ease-in-out infinite; 
}

/* Pulse animation */
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.02); }
}
.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* Pop in animation */
@keyframes popIn {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
.animate-pop-in {
    animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Fade in animation */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.animate-fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Slide up animation */
@keyframes slideUp {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}
.animate-slide-up {
    animation: slideUp 0.4s ease-out;
}

/* Particle float animation */
@keyframes particleFloat {
    0% { opacity: 0; transform: translateY(100vh) scale(0); }
    10% { opacity: 0.5; }
    90% { opacity: 0.5; }
    100% { opacity: 0; transform: translateY(-100vh) scale(1); }
}

/* Status pulse */
@keyframes statusPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.9; }
}

/* Badge pulse */
@keyframes badgePulse {
    0%, 100% { box-shadow: 0 0 10px currentColor; }
    50% { box-shadow: 0 0 25px currentColor; }
}

/* Coin spin */
@keyframes coinSpin {
    0%, 100% { transform: rotateY(0deg); }
    50% { transform: rotateY(180deg); }
}

/* Spinner */
@keyframes spin {
    to { transform: rotate(360deg); }
}
.animate-spin {
    animation: spin 1s linear infinite;
}

/* =============================================
   PARTICLES
============================================= */
.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--gold-500);
    border-radius: 50%;
    pointer-events: none;
    animation: particleFloat 8s linear infinite;
}

#particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

/* =============================================
   SCROLLBAR STYLING
============================================= */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--obsidian);
}

::-webkit-scrollbar-thumb {
    background: var(--ash);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--smoke);
}

/* =============================================
   SELECTION
============================================= */
::selection {
    background: rgba(201, 162, 39, 0.3);
    color: var(--gold-bright);
}

/* =============================================
   UTILITY CLASSES
============================================= */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-gold { color: var(--gold); }
.text-gold-bright { color: var(--gold-bright); }
.text-blood { color: var(--blood-bright); }
.text-success { color: var(--success); }
.text-mana { color: var(--mana-bright); }

.bg-void { background: var(--void); }
.bg-obsidian { background: var(--obsidian); }
.bg-slate { background: var(--slate); }

