/* ============================================
   Common Styles - Simplications Outreach Games
   Shared styles across all games
   ============================================ */

/* ============================================
   CSS Custom Properties - Brand Colors
   ============================================ */
:root {
    /* Primary brand colors */
    --primary-color: #BF4254;
    --primary-dark: #9B3544;
    --primary-light: #D96578;
    
    /* Neutral colors */
    --dark-color: #2C2E35;
    --gray-color: #84888E;
    --gray-light: #B4B9C1;
    --light-color: #F7F7F8;
    --lighter-color: #EEF2F8;
    --white: #FFFFFF;
    --black: #000000;
    
    /* Semantic colors */
    --success-color: #2E7D32;
    --warning-color: #F57C00;
    --danger-color: #C62828;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Border radius */
    --border-radius: 8px;
    --border-radius-sm: 4px;
    --border-radius-lg: 16px;
}

/* ============================================
   Base Reset
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ============================================
   Typography & Body
   ============================================ */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', Arial, sans-serif;
    color: var(--dark-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   Common Header Styles
   ============================================ */
header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    text-align: center;
    padding: 2rem 1rem;
    box-shadow: var(--shadow-md);
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   Common Footer Styles
   ============================================ */
footer {
    background: var(--dark-color);
    color: var(--white);
    text-align: center;
    padding: 1.5rem 1rem;
    margin-top: auto;
}

footer p {
    margin: 0.5rem 0;
}

footer a {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition-fast);
}

footer a:hover {
    color: var(--white);
}

.footer-note {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* ============================================
   Common Button Styles
   ============================================ */
button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    outline: none;
    transition: all var(--transition-medium);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--white);
    color: var(--dark-color);
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--gray-color);
    border-radius: var(--border-radius);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--light-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* ============================================
   Common Animations
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

/* ============================================
   Utility Classes
   ============================================ */
.fade-in {
    animation: fadeInUp 0.5s ease forwards;
}

.text-center {
    text-align: center;
}

.hidden {
    display: none !important;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ============================================
   Responsive Design - Mobile First
   ============================================ */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    header {
        padding: 1.5rem 1rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.75rem;
    }
    
    header {
        padding: 1.25rem 1rem;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    header,
    footer,
    button,
    .no-print {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
}
