:root {
    --primary: #ff4444;
    --primary-light: #ff6b6b;
    --dark-bg: #121212;
    --dark-card: rgba(40, 40, 40, 0.85);
    --light-bg: #f5f5f5;
    --light-card: rgba(255, 255, 255, 0.9);
    --text-dark: #e0e0e0;
    --text-light: #333333;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--dark-bg);
    color: var(--text-dark);
    margin: 0;
    padding: 20px;
    line-height: 1.6;
    transition: all 0.3s ease;
}

body.light-theme {
    background: var(--light-bg);
    color: var(--text-light);
}

header {
    text-align: center;
    padding: 40px 20px;
    max-width: 800px;
    margin: 0 auto;
}

h1 {
    color: var(--primary);
    margin: 0;
    font-size: 2.8em;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.subtitle {
    color: #aaa;
    font-style: italic;
    margin-top: 10px;
}

.theme-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(5px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    z-index: 100;
    transition: all 0.3s;
}

.theme-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

body.light-theme .theme-btn {
    color: #333;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.game-card {
    background: var(--dark-card);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
    transition: all 0.3s ease;
    border: 1px solid #444;
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 25px rgba(0,0,0,0.5);
}

body.light-theme .game-card {
    background: var(--light-card);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.game-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-bottom: 1px solid #444;
}

.game-content {
    padding: 25px;
}

.game-title {
    margin: 0 0 15px 0;
    color: var(--text-dark);
    font-size: 1.4em;
}

body.light-theme .game-title {
    color: var(--text-light);
}

.play-button {
    display: inline-block;
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--primary), #cc0000);
    color: white;
    text-decoration: none;
    border-radius: 35px;
    font-weight: bold;
    transition: all 0.3s;
}

.play-button:hover {
    background: linear-gradient(135deg, #ff5555, #dd0000);
    transform: scale(1.05);
}

.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s;
}

.loader {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255,68,68,0.3);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.project-info {
    background: rgba(30, 30, 30, 0.8);
    padding: 30px;
    border-radius: 12px;
    margin: 40px auto;
    max-width: 1200px;
    border: 1px solid #444;
}

body.light-theme .project-info {
    background: rgba(255,255,255,0.8);
}

.project-info h2 {
    color: var(--primary);
    margin-top: 0;
}

.project-info-content {
    background: rgba(40, 40, 40, 0.6);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #555;
    color: var(--text-dark);
    line-height: 1.7;
}

body.light-theme .project-info-content {
    background: rgba(255,255,255,0.6);
    color: var(--text-light);
}

/* Tekijätiedot osion tyylit */
.creator {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #444;
}

.creator:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.creator h3 {
    color: var(--primary);
    margin-top: 0;
}

.creator ul {
    list-style: none;
    padding: 0;
}

.creator li {
    margin-bottom: 8px;
}

.creator a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.creator a:hover {
    color: var(--primary);
}

body.light-theme .creator a {
    color: var(--text-light);
}

body.light-theme .creator a:hover {
    color: var(--primary);
}

.feedback-section {
    text-align: center;
    padding: 30px;
    margin: 40px auto;
    max-width: 1200px;
}

.email-button {
    display: inline-block;
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--primary), #cc0000);
    color: white;
    text-decoration: none;
    border-radius: 35px;
    font-weight: bold;
    transition: all 0.3s;
}

footer {
    text-align: center;
    padding: 25px;
    color: #aaa;
    margin-top: 60px;
    border-top: 1px solid #444;
}

@media (max-width: 768px) {
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    h1 {
        font-size: 2rem;
    }
}


  }

  /* Lisää tämä CSS:ään */
@media (max-width: 768px) {
    h1 { font-size: 2.2rem; }
    .game-card { margin-bottom: 20px; }
  }

/* LEGAL SECTION - SÄILYTTÄÄ NYKYISEN ULKOASUN */
.legal-section {
    background: var(--dark-card);
    padding: 30px;
    border-radius: 14px;
    margin: 40px auto;
    max-width: 800px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
    border: 1px solid #444;
}

body.light-theme .legal-section {
    background: var(--light-card);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* ASSET CREDITS - PELIKORTTIEN ALAREUNAAN */
.asset-credits {
    margin-top: 15px;
    font-size: 0.75em;
    color: #aaa;
    text-align: center;
    font-style: italic;
}

body.light-theme .asset-credits {
    color: #666;
}

/* COPYRIGHT NOTICE - FOOTERIN YLÄOSAAN */
.copyright-notice {
    font-size: 0.85em;
    line-height: 1.5;
    color: #aaa;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #444;
}

body.light-theme .copyright-notice {
    color: #666;
    border-bottom-color: #ddd;
}



/* Navbarin tyylit kaikille sivuille */
.navbar {
    background-color: var(--dark-card);
    padding: 1rem;
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    margin: 20px auto;
    max-width: 1200px;
    border: 1px solid #444;
}

body.light-theme .navbar {
    background-color: var(--light-card);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.navbar a {
    color: var(--text-dark);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 18px;
    font-weight: 500;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

body.light-theme .navbar a {
    color: var(--text-light);
}

.navbar a:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.navbar a.active {
    background-color: var(--primary);
    color: white;
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .navbar a {
        padding: 0.8rem 1.5rem;
        width: 100%;
        text-align: center;
    }
    
    .blog-title {
        font-size: 1.6em;
    }
}