:root {
    --bg-color: #050508;
    --text-color: #f3f4f6;
    --accent-blue: #00d2ff;
    --accent-pink: #ff007f;
    --card-bg: rgba(17, 17, 25, 0.7);
    --neon-glow: 0 0 15px rgba(0, 210, 255, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    background-image: 
        radial-gradient(at 10% 12%, rgba(255, 0, 127, 0.08) 0px, transparent 50%),
        radial-gradient(at 90% 88%, rgba(0, 210, 255, 0.08) 0px, transparent 50%);
}

/* TOP MENY */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 0.2rem 10%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(5, 5, 8, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 100;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 80px;
    width: auto;
    display: block;
}

nav button {
    background: none;
    border: none;
    color: var(--text-color);
    margin-left: 2.5rem;
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    opacity: 0.8;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

nav button:hover {
    opacity: 1;
    color: var(--accent-blue);
    text-shadow: var(--neon-glow);
}

/* HOVEDINNHOLD & HERO */
section {
    padding: 220px 10% 4rem 10%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero {
    text-align: center;
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.splash-container {
    width: 100%;
    max-width: 800px;
    margin-bottom: 2rem;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0, 210, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.splash-img {
    width: 100%;
    height: auto;
    display: block;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
    line-height: 1.2;
    background: linear-gradient(135deg, #fff 30%, var(--accent-blue) 70%, var(--accent-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.6;
    margin-bottom: 2rem;
    max-width: 600px;
}

/* POP-UP MODALER */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 8, 0.85);
    backdrop-filter: blur(15px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: #0f0f15;
    padding: 3rem;
    border-radius: 24px;
    max-width: 650px;
    width: 100%;
    border: 1px solid rgba(255, 0, 127, 0.2);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.modal.active .modal-content {
    transform: scale(1);
}

.close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.8rem;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s;
    line-height: 1;
}

.close-btn:hover {
    opacity: 1;
    color: var(--accent-pink);
}

.modal h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--accent-blue);
}

.modal p {
    opacity: 0.7;
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
}

.project-screenshot {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-top: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: block;
}

/* MOBIL-TILPASNING */
@media (max-width: 768px) {
    header { 
        padding: 0.2rem 5%; 
        flex-direction: column;
        gap: 0.5rem;
    }
    .logo-img { height: 120px; }
    section { padding: 180px 5% 3rem 5%; }
    .hero h1 { font-size: 2.2rem; }
    .modal-content { padding: 2rem; }
    nav button { margin: 0 1rem; font-size: 1rem; }
}


/* W3C Badge fiksert nede i høyre hjørne */
.w3c-badge {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 2000; /* Sørger for at den ligger over modaler og menyer */
    opacity: 0.7;
    transition: opacity 0.3s ease, transform 0.2s ease;
    display: block;
}

.w3c-badge:hover {
    opacity: 1;
    transform: scale(1.05); /* Gir en liten, ren animasjon når man hovrer over */
}

.w3c-badge img {
    height: 35px; /* Juster høyden slik at merket forblir diskret og profesjonelt */
    width: auto;
    display: block;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Spesifikk utvidelse av spill-modalen for å gi plass til to kolonner */
#games-modal .modal-content {
    max-width: 900px;
}

/* System for å legge spillene side om side */
.games-container {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.game-item {
    flex: 1;
    min-width: 0; /* Hindrer bildene i å sprenge containeren */
}

.game-item a {
    display: block;
    text-decoration: none;
}

/* Hover-effekt på bildene for en mer interaktiv følelse */
.games-container a:hover .project-screenshot {
    transform: scale(1.02);
    border-color: rgba(0, 210, 255, 0.4);
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.2);
}

/* Sørger for at den eksisterende bildestylingen oppfører seg optimalt i kolonnene */
.games-container .project-screenshot {
    width: 100%;
    height: auto;
    margin-top: 0; /* Fjerner den gamle standard-marginen */
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Responsiv tilpasning for mobilskjermer */
@media (max-width: 768px) {
    .games-container {
        flex-direction: column; /* Legger spillene oppå hverandre på mobil */
        gap: 1.5rem;
    }
}
