/* =============================================
   Exploradores da Rede – Design System
   ============================================= */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&family=Nunito:wght@400;600;700;800&display=swap');

/* === CSS Variables === */
:root {
    --blue-electric: #0066FF;
    --blue-dark: #0044BB;
    --blue-glow: #00AAFF;
    --green-lime: #39FF14;
    --green-dark: #22CC00;
    --orange: #FF6600;
    --orange-dark: #DD5500;
    --purple: #9B59B6;
    --purple-dark: #7D3C98;
    --yellow-gold: #FFD700;
    --yellow-dark: #E6C200;
    --red-soft: #FF4444;

    --bg-space: #0A0E27;
    --bg-space-light: #121640;
    --bg-card: rgba(20, 25, 60, 0.85);
    --bg-card-solid: #141940;
    --text-primary: #FFFFFF;
    --text-secondary: #B0B8E8;
    --text-dark: #1a1a2e;

    --font-title: 'Fredoka One', cursive;
    --font-body: 'Nunito', sans-serif;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --shadow-glow-blue: 0 0 20px rgba(0, 102, 255, 0.4);
    --shadow-glow-green: 0 0 20px rgba(57, 255, 20, 0.4);
    --shadow-glow-orange: 0 0 20px rgba(255, 102, 0, 0.4);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);

    --transition-fast: 0.2s ease;
    --transition-medium: 0.4s ease;
    --transition-slow: 0.6s ease;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

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

h1, h2, h3, h4 {
    font-family: var(--font-title);
    line-height: 1.2;
}

a {
    color: var(--blue-glow);
    text-decoration: none;
    transition: color var(--transition-fast);
}
a:hover { color: var(--yellow-gold); }

button, .btn {
    font-family: var(--font-body);
    font-weight: 700;
    cursor: pointer;
    border: none;
    outline: none;
    transition: all var(--transition-fast);
}

img { max-width: 100%; height: auto; }

/* === Utility Classes === */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: none;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

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

.btn-green {
    background: linear-gradient(135deg, var(--green-lime), var(--green-dark));
    color: var(--text-dark);
    box-shadow: var(--shadow-glow-green);
}

.btn-blue {
    background: linear-gradient(135deg, var(--blue-glow), var(--blue-electric));
    color: #fff;
    box-shadow: var(--shadow-glow-blue);
}

.btn-orange {
    background: linear-gradient(135deg, var(--orange), var(--orange-dark));
    color: #fff;
    box-shadow: var(--shadow-glow-orange);
}

.btn-purple {
    background: linear-gradient(135deg, var(--purple), var(--purple-dark));
    color: #fff;
}

.btn-yellow {
    background: linear-gradient(135deg, var(--yellow-gold), var(--yellow-dark));
    color: var(--text-dark);
}

.btn-lg {
    padding: 18px 36px;
    font-size: 1.25rem;
    border-radius: var(--radius-lg);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-icon {
    font-size: 1.4em;
}

/* Pulse animation for CTA */
.btn-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(57, 255, 20, 0.6); }
    50% { box-shadow: 0 0 0 12px rgba(57, 255, 20, 0); }
}

/* === Form Elements === */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    border: 2px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.form-control:focus {
    border-color: var(--blue-glow);
    background: rgba(255,255,255,0.08);
    box-shadow: 0 0 12px rgba(0, 170, 255, 0.3);
    outline: none;
}

.form-control::placeholder {
    color: rgba(176, 184, 232, 0.5);
}

/* === Cards === */
.card {
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-lg);
    padding: 24px;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-card);
}

/* === Alert Messages === */
.alert {
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.alert-error {
    background: rgba(255, 68, 68, 0.15);
    border: 1px solid rgba(255, 68, 68, 0.3);
    color: #ff6b6b;
}

.alert-success {
    background: rgba(57, 255, 20, 0.1);
    border: 1px solid rgba(57, 255, 20, 0.3);
    color: var(--green-lime);
}

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

.particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0;
    animation: floatParticle linear infinite;
}

@keyframes floatParticle {
    0% {
        opacity: 0;
        transform: translateY(100vh) scale(0);
    }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% {
        opacity: 0;
        transform: translateY(-10vh) scale(1);
    }
}

/* === Progress Bar === */
.progress-bar-container {
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--blue-electric), var(--green-lime), var(--yellow-gold));
    transition: width var(--transition-medium);
}

/* === HUD === */
.game-hud {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 10px 20px;
    background: linear-gradient(180deg, rgba(10, 14, 39, 0.95), rgba(10, 14, 39, 0.7));
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid rgba(0, 170, 255, 0.2);
}

.hud-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hud-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid var(--blue-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

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

.hud-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.hud-stars {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-title);
    color: var(--yellow-gold);
    font-size: 1.1rem;
}

.hud-phase {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 700;
}

.hud-progress {
    position: fixed;
    top: 62px;
    left: 0;
    right: 0;
    z-index: 999;
    padding: 0;
}

.hud-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.hud-btn:hover {
    background: rgba(255,255,255,0.2);
    color: var(--text-primary);
}

/* === Page Container (below HUD) === */
.page-with-hud {
    padding-top: 78px;
}

/* === Confetti === */
.confetti-piece {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    animation: confettiFall linear forwards;
}

@keyframes confettiFall {
    0% { opacity: 1; transform: translateY(-10vh) rotate(0deg); }
    100% { opacity: 0; transform: translateY(110vh) rotate(720deg); }
}

/* === Responsive === */
@media (max-width: 768px) {
    .btn-lg {
        padding: 14px 24px;
        font-size: 1.1rem;
    }

    .game-hud {
        padding: 8px 12px;
    }

    .hud-name {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .hud-phase {
        display: none;
    }
}
