/* ========================================
   RESET & BASE
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Game-like color palette */
    --primary: #FF6B6B;
    --secondary: #4ECDC4;
    --accent: #FFE66D;
    --success: #95E1D3;
    --danger: #F38181;
    --dark: #2D3561;
    --darker: #1A1F3A;
    --light: #F9F9F9;

    /* Shadows & effects */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px rgba(255, 107, 107, 0.4);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
    --transition-slow: 0.5s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--darker) 0%, var(--dark) 100%);
    color: var(--light);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ========================================
   SCREEN MANAGEMENT
   ======================================== */
.screen {
    display: none;
    opacity: 0;
    transition: opacity var(--transition-medium);
    min-height: 100vh;
    padding: 20px;
}

.screen.active {
    display: flex;
    opacity: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* ========================================
   MAIN MENU
   ======================================== */
.menu-container {
    max-width: 1200px;
    width: 100%;
    text-align: center;
}

.menu-title {
    font-size: 3.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    text-shadow: 0 0 30px rgba(255, 107, 107, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

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

.menu-subtitle {
    font-size: 1.2rem;
    color: var(--secondary);
    margin-bottom: 50px;
    opacity: 0.9;
}

.widgets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.widget-card {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1), rgba(78, 205, 196, 0.1));
    border: 2px solid rgba(255, 107, 107, 0.3);
    border-radius: 20px;
    padding: 30px;
    cursor: pointer;
    transition: all var(--transition-medium);
    position: relative;
    overflow: hidden;
}

.widget-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.6s;
}

.widget-card:hover::before {
    left: 100%;
}

.widget-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.widget-icon {
    font-size: 4rem;
    margin-bottom: 15px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    animation: float 3s ease-in-out infinite;
}

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

.widget-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--light);
}

.widget-card p {
    color: rgba(249, 249, 249, 0.7);
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.widget-tag {
    display: inline-block;
    background: var(--accent);
    color: var(--dark);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========================================
   COMMON WIDGET STYLES
   ======================================== */
.widget-container {
    max-width: 800px;
    width: 100%;
    background: rgba(26, 31, 58, 0.8);
    border-radius: 30px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 107, 107, 0.2);
}

.widget-header {
    text-align: center;
    margin-bottom: 30px;
}

.widget-title {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.widget-subtitle {
    color: var(--secondary);
    font-size: 1.1rem;
    opacity: 0.9;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all var(--transition-medium);
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:active {
    transform: scale(0.95);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #FF8E53);
    color: white;
}

.btn-primary:hover {
    box-shadow: var(--shadow-glow);
    transform: translateY(-3px);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary), #38B2AC);
    color: white;
}

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

.btn-back {
    position: fixed;
    top: 20px;
    left: 20px;
    padding: 12px 25px;
    font-size: 0.9rem;
    background: rgba(78, 205, 196, 0.2);
    color: var(--secondary);
    border: 2px solid var(--secondary);
    z-index: 1000;
}

.btn-back:hover {
    background: var(--secondary);
    color: var(--dark);
}

/* ========================================
   PROGRESS & STATS
   ======================================== */
.progress-container {
    margin: 20px 0;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(45, 53, 97, 0.5);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 10px;
    transition: width var(--transition-medium);
    box-shadow: 0 0 15px rgba(255, 107, 107, 0.5);
}

.stat-badge {
    display: inline-block;
    background: rgba(255, 107, 107, 0.2);
    border: 2px solid var(--primary);
    padding: 8px 20px;
    border-radius: 20px;
    margin: 5px;
    font-weight: 600;
}

/* ========================================
   CARDS & CHOICES
   ======================================== */
.choice-grid {
    display: grid;
    gap: 20px;
    margin: 30px 0;
}

.choice-card {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.1), rgba(255, 230, 109, 0.1));
    border: 2px solid rgba(78, 205, 196, 0.3);
    border-radius: 15px;
    padding: 25px;
    cursor: pointer;
    transition: all var(--transition-medium);
    text-align: left;
}

.choice-card:hover {
    transform: translateX(10px);
    border-color: var(--secondary);
    box-shadow: 0 0 20px rgba(78, 205, 196, 0.3);
}

.choice-card h4 {
    color: var(--accent);
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.choice-card p {
    color: rgba(249, 249, 249, 0.8);
    line-height: 1.6;
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes slideInUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

.animate-slide-in {
    animation: slideInUp 0.5s ease forwards;
}

.animate-fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .menu-title {
        font-size: 2.5rem;
    }

    .widgets-grid {
        grid-template-columns: 1fr;
    }

    .widget-container {
        padding: 25px;
    }

    .btn {
        padding: 12px 30px;
        font-size: 1rem;
    }
}
