:root {
    --primary-color: #667eea;
    --primary-dark: #5a67d8;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --success-color: #48bb78;
    --warning-color: #ed8936;
    --background-color: #f7fafc;
    --background-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-background: #ffffff;
    --text-color: #2d3748;
    --text-light: #718096;
    --shadow-light: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-large: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius: 12px;
    --radius-large: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --background-color: #1a202c;
    --background-gradient: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    --card-background: #2d3748;
    --text-color: #e2e8f0;
    --text-light: #a0aec0;
    --shadow-light: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    --shadow-large: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--background-color);
    overflow-x: hidden;
    transition: var(--transition);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
header {
    background: var(--background-gradient);
    color: white;
    padding: 4rem 0;
    text-align: center;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-medium);
    position: relative;
    overflow: hidden;
}

.header-content {
    position: relative;
    z-index: 2;
}

/* Theme Toggle Button */
.theme-toggle {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10;
}

.theme-toggle i {
    pointer-events: none;
    transition: var(--transition);
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.theme-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.5);
}

.theme-toggle:active {
    transform: scale(0.95);
}

/* Verbesserte Clickability für alle Kinder-Elemente */
.theme-toggle * {
    pointer-events: none;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}

header h1 i {
    margin-right: 0.5rem;
    animation: bounce 2s infinite, glow 3s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 0 0 5px rgba(255, 119, 198, 0.5);
    }
    to {
        text-shadow: 0 0 15px rgba(255, 119, 198, 0.8);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

header p {
    font-size: 1.25rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

/* Section Styles */
.games-section {
    margin-bottom: 4rem;
}

.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-header h2 {
    font-size: 2.2rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-weight: 700;
    transition: var(--transition);
}

.section-header h2 i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.section-header p {
    color: var(--text-light);
    font-size: 1.1rem;
    transition: var(--transition);
}

/* Game Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Game Card */
.game-card {
    background: var(--card-background);
    border-radius: var(--radius-large);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    padding: 2rem;
    border: 2px solid transparent;
    will-change: transform;
}

.game-card:hover {
    transform: translateY(-8px) scale(1.02) !important;
    box-shadow: var(--shadow-large);
    border-color: var(--primary-color);
    background: linear-gradient(135deg, 
        var(--card-bg) 0%, 
        rgba(114, 67, 218, 0.05) 100%);
}

.game-card.development-card {
    background: var(--card-background);
    border-color: #e2e8f0;
    opacity: 0.9;
}

[data-theme="dark"] .game-card.development-card {
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    border-color: #4a5568;
}

.game-card.development-card:hover {
    border-color: var(--warning-color);
}

.game-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: transform 0.3s ease;
}

.game-card:hover .game-icon {
    transform: scale(1.05);
}

.game-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    font-weight: 600;
    transition: var(--transition);
}

.game-card p {
    flex-grow: 1;
    margin-bottom: 2rem;
    color: var(--text-light);
    line-height: 1.6;
    transition: var(--transition);
}

.game-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

/* Play Button */
.play-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    box-shadow: var(--shadow-light);
    border: none;
    cursor: pointer;
}

.play-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.play-button.disabled {
    background: linear-gradient(135deg, var(--text-light), #a0aec0);
    cursor: not-allowed;
    opacity: 0.7;
}

.play-button.disabled:hover {
    transform: none;
    box-shadow: var(--shadow-light);
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
}

.badge.ready {
    background: linear-gradient(135deg, var(--success-color), #38a169);
    color: white;
    animation: readyPulse 2s ease-in-out infinite;
}

.badge.development {
    background: linear-gradient(135deg, var(--warning-color), #dd6b20);
    color: white;
    animation: devPulse 2s ease-in-out infinite;
}

@keyframes readyPulse {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(56, 161, 105, 0.7); 
    }
    50% { 
        box-shadow: 0 0 0 4px rgba(56, 161, 105, 0); 
    }
}

@keyframes devPulse {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(221, 107, 32, 0.7); 
    }
    50% { 
        box-shadow: 0 0 0 4px rgba(221, 107, 32, 0); 
    }
}

@keyframes floatCard {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-3px); }
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* Footer */
footer {
    background: var(--text-color);
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-top: 4rem;
    transition: var(--transition);
}

[data-theme="dark"] footer {
    background: #1a202c;
    color: var(--text-light);
}

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

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.game-card {
    animation: fadeInUp 0.6s ease forwards;
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    header {
        padding: 3rem 0;
    }
    
    header h1 {
        font-size: 2.5rem;
    }
    
    .theme-toggle {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }
    
    .game-card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    header {
        padding: 2rem 0;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    header p {
        font-size: 1rem;
    }
    
    .section-header h2 {
        font-size: 1.6rem;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .game-card {
        padding: 1.25rem;
    }
    
    .game-footer {
        flex-direction: column;
        gap: 1rem;
    }
    
    .play-button {
        width: 100%;
        justify-content: center;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .game-card {
        border: 2px solid var(--text-color);
    }
    
    .play-button {
        border: 2px solid currentColor;
    }
}

/* Animierter Hintergrund für mehr Lebendigkeit */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(120, 219, 226, 0.1) 0%, transparent 50%);
    animation: backgroundFloat 20s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: -1;
}

@keyframes backgroundFloat {
    0% {
        transform: translateX(-10px) translateY(-5px);
    }
    100% {
        transform: translateX(10px) translateY(5px);
    }
}

[data-theme="dark"] body::before {
    background: 
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(120, 219, 226, 0.05) 0%, transparent 50%);
} 