/* ============================================
   Common Styles - Simplications Transfer 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;

    /* Card skin */
    --card-bg: rgba(255, 255, 255, 0.94);
    --card-border: rgba(180, 185, 193, 0.45);
    --card-radius: 20px;

    /* Page layout */
    --page-max-width: 1200px;
}

/* ============================================
   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);
}

/* Top action links (e.g. "Zurueck zum Hub") */
.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: 0.7rem 1.1rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.action-button:hover,
.action-button:focus-visible {
    transform: translateY(-1px);
}

.action-button-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
}

.action-button-primary:hover,
.action-button-primary:focus-visible {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--dark-color) 100%);
}

.action-button-secondary {
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(180, 185, 193, 0.45);
    color: var(--dark-color);
}

.action-button-secondary:hover,
.action-button-secondary:focus-visible {
    border-color: rgba(191, 66, 84, 0.35);
    color: var(--primary-dark);
}

.eyebrow {
    color: var(--primary-dark);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.4rem;
}

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

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

/* ============================================
   Global Prototype Ribbon
   ============================================ */
body::before {
    content: "PROTOTYPE";
    position: fixed;
    top: 20px;
    right: -64px;
    z-index: 9999;
    padding: 0.35rem 5rem;
    background: linear-gradient(135deg, #f57c00 0%, #c62828 100%);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transform: rotate(40deg);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
    pointer-events: none;
}

@media (max-width: 640px) {
    body::before {
        top: 14px;
        right: -70px;
        padding: 0.3rem 4.4rem;
        font-size: 0.62rem;
    }
}

@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;
        filter: grayscale(1);
    }
}
