/* ========================================
   NUMERIA WEBSITE - GLOBAL STYLES
   Theme: Starry Night
   ======================================== */

:root {
    /* Starry Night Theme Colors */
    --bg-primary: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    --bg-secondary: rgba(26, 26, 46, 0.95);
    --bg-card: rgba(13, 22, 41, 0.9);
    
    --text-primary: #ecf0f1;
    --text-secondary: #95a5a6;
    --text-accent: #d4af37;
    --text-highlight: #f4e5a1;
    
    --border-accent: #d4af37;
    --border-glow: rgba(212, 175, 55, 0.6);
    
    --shadow-gold: 0 0 20px rgba(212, 175, 55, 0.5);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-primary);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Starry Background Animation */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><circle cx="100" cy="100" r="1" fill="white" opacity="0.8"/><circle cx="300" cy="200" r="1.5" fill="white" opacity="0.6"/><circle cx="500" cy="150" r="1" fill="white" opacity="0.9"/><circle cx="700" cy="300" r="1.2" fill="white" opacity="0.7"/><circle cx="900" cy="250" r="1" fill="white" opacity="0.8"/><circle cx="200" cy="400" r="1.5" fill="white" opacity="0.6"/><circle cx="400" cy="500" r="1" fill="white" opacity="0.9"/><circle cx="600" cy="450" r="1.2" fill="white" opacity="0.7"/><circle cx="800" cy="550" r="1" fill="white" opacity="0.8"/><circle cx="150" cy="650" r="1.5" fill="white" opacity="0.6"/><circle cx="350" cy="700" r="1" fill="white" opacity="0.9"/><circle cx="550" cy="750" r="1.2" fill="white" opacity="0.7"/><circle cx="750" cy="800" r="1" fill="white" opacity="0.8"/><circle cx="950" cy="850" r="1.5" fill="white" opacity="0.6"/></svg>');
    animation: twinkle 3s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Magic Glow Effect */
body::after {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.1); }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* Header */
header {
    text-align: center;
    padding: 3rem 0;
    position: relative;
    z-index: 1;
}

.logo {
    font-size: 4rem;
    font-weight: bold;
    color: var(--text-accent);
    text-shadow: var(--shadow-gold);
    margin-bottom: 0.5rem;
    animation: logoGlow 2s ease-in-out infinite;
}

@keyframes logoGlow {
    0%, 100% { text-shadow: 0 0 20px rgba(212, 175, 55, 0.5); }
    50% { text-shadow: 0 0 40px rgba(212, 175, 55, 0.8), 0 0 60px rgba(212, 175, 55, 0.4); }
}

.tagline {
    font-size: 1.5rem;
    color: var(--text-highlight);
    font-style: italic;
}

/* Navigation */
nav {
    background: var(--bg-secondary);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--border-accent);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
}

nav a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

nav a:hover {
    color: var(--text-accent);
    background: rgba(212, 175, 55, 0.1);
    transform: translateY(-2px);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.language-switcher {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.language-switcher label {
    font-size: 0.95rem;
}

.language-switcher select {
    background: var(--bg-primary);
    border: 1px solid var(--border-accent);
    color: var(--text-primary);
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    min-width: 140px;
}

.language-switcher select:focus {
    outline: 2px solid var(--text-accent);
    outline-offset: 2px;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 2px solid var(--border-accent);
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: var(--shadow-card);
    transition: all 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.7), var(--shadow-gold);
}

.card-title {
    font-size: 2rem;
    color: var(--text-accent);
    margin-bottom: 1rem;
    text-shadow: var(--shadow-gold);
}

.card-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Grid Layout */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--text-accent);
    color: #1a1a2e;
    text-decoration: none;
    border-radius: 12px;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: var(--shadow-gold);
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
}

.btn:hover {
    background: var(--text-highlight);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.6);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 2px solid var(--border-accent);
}

.btn-secondary:hover {
    background: rgba(212, 175, 55, 0.2);
    color: var(--text-accent);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 2rem;
    position: relative;
}

.hero h1 {
    font-size: 3.5rem;
    color: var(--text-accent);
    text-shadow: var(--shadow-gold);
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.3rem;
    color: var(--text-highlight);
    max-width: 800px;
    margin: 0 auto 2rem;
    line-height: 1.8;
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.feature {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.feature:hover {
    border-color: var(--border-accent);
    transform: translateY(-5px);
    box-shadow: var(--shadow-gold);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-title {
    font-size: 1.3rem;
    color: var(--text-accent);
    margin-bottom: 0.5rem;
}

/* Footer */
footer {
    background: var(--bg-secondary);
    padding: 3rem 0;
    text-align: center;
    border-top: 2px solid var(--border-accent);
    margin-top: 4rem;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--text-accent);
}

/* Theme Badge */
.theme-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 2px solid var(--border-accent);
    border-radius: 20px;
    margin: 0.5rem;
    font-weight: 600;
    transition: all 0.3s;
}

.theme-badge:hover {
    background: rgba(212, 175, 55, 0.2);
    transform: scale(1.05);
}

/* Power-ups shared Starry layouts */
.powerups-page .starry-hero {
    background: var(--bg-card);
    border: 2px solid var(--border-accent);
    border-radius: 24px;
    padding: 4rem 2rem;
    box-shadow: var(--shadow-card);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.powerups-page .starry-hero::after {
    content: '';
    position: absolute;
    top: -20%;
    left: -10%;
    width: 120%;
    height: 140%;
    background: radial-gradient(circle at top, rgba(212, 175, 55, 0.15), transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.powerups-page .starry-hero > * {
    position: relative;
    z-index: 1;
}

.powerups-page .starry-section {
    background: rgba(13, 22, 41, 0.92);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 20px;
    padding: 4rem 2rem;
    margin: 3rem 0;
    box-shadow: var(--shadow-card);
}

.powerups-page .starry-section.centered {
    text-align: center;
}

.powerups-page .starry-section--accent {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95), rgba(15, 52, 96, 0.95));
    border: 2px solid var(--border-accent);
}

.powerups-page .starry-section--cta {
    text-align: center;
    background: radial-gradient(circle at top, rgba(22, 34, 66, 0.95), rgba(9, 14, 28, 0.95));
    border: 2px solid rgba(212, 175, 55, 0.4);
    position: relative;
    overflow: hidden;
}

.powerups-page section[style*="background"] {
    background: rgba(13, 22, 41, 0.92) !important;
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 20px;
    box-shadow: var(--shadow-card);
}

.powerups-page .card.card--contrast {
    background: linear-gradient(135deg, rgba(12, 18, 34, 0.95), rgba(6, 9, 22, 0.95));
    border: 2px solid rgba(212, 175, 55, 0.45);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
}

.powerups-page .card.card--contrast .card-title {
    color: var(--text-accent);
}

.powerups-page .card .theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.powerups-page .theme-card {
    background: rgba(10, 16, 34, 0.95) !important;
    border: 1px solid rgba(212, 175, 55, 0.35) !important;
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: var(--shadow-card);
    color: var(--text-primary);
}

.powerups-page .theme-card h3 {
    color: var(--text-accent);
    margin-bottom: 0.75rem;
}

.powerups-page .theme-card p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.powerups-page .theme-card .theme-icon {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: var(--text-highlight);
    text-shadow: var(--shadow-gold);
}

.powerups-page .mechanics-card {
    --mechanics-accent: rgba(212, 175, 55, 0.7);
    background: linear-gradient(135deg, rgba(12, 18, 34, 0.95), rgba(5, 8, 20, 0.95));
    border: 2px solid var(--mechanics-accent);
    border-radius: 18px;
    padding: 2rem;
    box-shadow: var(--shadow-card);
}

.powerups-page .mechanics-card h3 {
    color: var(--mechanics-accent);
    margin-bottom: 1rem;
}

.powerups-page .mechanics-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.powerups-page .mechanics-card li {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    line-height: 1.8;
}

.powerups-page .mechanics-card li:last-child {
    border-bottom: none;
}

.powerups-page .mechanics-card strong {
    color: var(--text-highlight);
}

.powerups-page .mechanics-card span {
    color: var(--text-secondary);
}

/* World Sections */
.world-section {
    margin: 4rem 0;
    padding: 3rem;
    background: var(--bg-card);
    border-radius: 16px;
    border: 2px solid var(--border-accent);
}

.world-header {
    text-align: center;
    margin-bottom: 2rem;
}

.world-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.world-title {
    font-size: 2.5rem;
    color: var(--text-accent);
    margin-bottom: 0.5rem;
}

.world-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .logo {
        font-size: 2.5rem;
    }

    .tagline {
        font-size: 1.2rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .nav-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    nav ul {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0;
    }

    nav a {
        padding: 0.75rem 1rem;
        text-align: center;
    }

    .language-switcher {
        justify-content: center;
        padding: 0.5rem 0;
    }

    .grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .features {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .card {
        padding: 1.5rem;
        margin: 1.5rem 0;
    }

    .card-title {
        font-size: 1.5rem;
    }

    .world-section {
        padding: 2rem 1rem;
    }

    .world-title {
        font-size: 2rem;
    }

    .btn {
        width: 100%;
        text-align: center;
        font-size: 1rem;
        padding: 0.875rem 1.5rem;
    }

    .hero .btn {
        margin: 0.5rem 0 !important;
        display: block;
    }
}

/* Mobile Touch Optimization */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch target sizes */
    nav a,
    .btn,
    .language-switcher select {
        min-height: 44px;
        min-width: 44px;
    }

    /* Remove hover effects on touch devices */
    .card:hover,
    .feature:hover,
    .btn:hover {
        transform: none;
    }

    /* Add active states for touch feedback */
    .btn:active {
        transform: scale(0.98);
        opacity: 0.9;
    }

    nav a:active {
        background: rgba(212, 175, 55, 0.2);
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .logo {
        font-size: 2rem;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .card-title {
        font-size: 1.3rem;
    }

    .world-icon {
        font-size: 3rem;
    }

    .world-title {
        font-size: 1.75rem;
    }

    .feature-icon {
        font-size: 2.5rem;
    }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
    header {
        padding: 1.5rem 0;
    }

    .hero {
        padding: 2rem 1rem;
    }

    .logo {
        font-size: 2rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.8s ease-out;
}

/* Number Blocks Colors (for visual reference) */
.number-1 { color: #e74c3c; }
.number-2 { color: #f39c12; }
.number-3 { color: #f1c40f; }
.number-4 { color: #2ecc71; }
.number-5 { color: #3498db; }
.number-6 { color: #9b59b6; }
.number-7 { color: #e91e63; }
.number-8 { color: #1abc9c; }
.number-9 { color: #34495e; }
