/* =========================================
   ESCAPE ROOM PORTAL - NETFLIX STYLE
   ========================================= */

:root {
    --bg-main: #0b0c10;
    --bg-secondary: #1f2833;
    --text-main: #ffffff;
    --text-muted: #c5c6c7;
    --accent: #45a29e;
    --accent-hover: #66fcf1;
    --card-bg: #151a21;
    --card-hover: #1e2630;
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    background-image: linear-gradient(to bottom, rgba(11, 12, 16, 0.6), rgba(11, 12, 16, 0.85)), url('assets/portal_bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3 {
    font-family: 'Outfit', sans-serif;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--accent-hover);
    outline-offset: 3px;
}

/* ===== NAVIGASJON ===== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 0;
    background: linear-gradient(to bottom, rgba(11,12,16,0.9) 0%, rgba(11,12,16,0) 100%);
    z-index: 100;
    transition: background var(--transition-speed);
}

.navbar.scrolled {
    background: rgba(11, 12, 16, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.nav-container {
    width: 100%;
    margin: 0 auto;
    padding: 0 4vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-main);
}

.logo-highlight {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-actions {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition-speed);
}

.nav-link:hover {
    color: var(--text-main);
}

.nav-link-divider {
    margin-left: 10px;
    border-left: 1px solid rgba(255,255,255,0.2);
    padding-left: 20px;
}

.filter-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: color var(--transition-speed);
}

.filter-btn:hover, .filter-btn.active {
    color: var(--text-main);
}

/* ===== HERO CAROUSEL ===== */
.keyword-map,
.portal-bottom-copy {
    position: relative;
    z-index: 20;
    padding: 0 4vw 28px;
}

.portal-bottom-inner,
.keyword-map-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 32px 30px;
    background: rgba(11, 12, 16, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
}

.portal-bottom-header,
.keyword-map-header {
    margin-bottom: 20px;
}

.portal-bottom-header h2,
.keyword-map-header h2 {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    line-height: 1.15;
    margin-bottom: 12px;
    color: var(--text-main);
}

.portal-bottom-header p,
.keyword-map-header p {
    max-width: 76ch;
    color: var(--text-muted);
    font-size: 1rem;
}

.keyword-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.keyword-card {
    padding: 18px 18px 20px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(21, 26, 33, 0.96), rgba(21, 26, 33, 0.82));
    border: 1px solid rgba(255, 255, 255, 0.06);
    min-height: 170px;
}

.keyword-card h3 {
    font-size: 1.05rem;
    margin-bottom: 10px;
    color: var(--accent-hover);
}

.keyword-card p {
    color: var(--text-muted);
    font-size: 0.96rem;
    line-height: 1.7;
}

.hero-carousel {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 110px 4vw 24px;
    overflow: visible;
}

.hero-panel {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(240px, 340px);
    gap: 24px;
    align-items: stretch;
    padding: 28px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(135deg, rgba(69, 162, 158, 0.18), rgba(21, 26, 33, 0.88)),
        rgba(21, 26, 33, 0.96);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(12px);
}

.hero-panel-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
}

.hero-kicker {
    color: var(--accent-hover);
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-panel-copy h1 {
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 1.05;
    font-weight: 800;
    color: var(--text-main);
    max-width: 13ch;
}

.hero-summary {
    max-width: 60ch;
    color: var(--text-muted);
    font-size: 1.02rem;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.hero-btn-secondary {
    background: transparent;
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--accent-hover);
    box-shadow: 0 0 20px rgba(102, 252, 241, 0.2);
}

.hero-panel-info {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 20px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-chip {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 600;
}

@media (max-width: 900px) {
    .hero-carousel {
        padding-top: 96px;
    }

    .hero-panel {
        grid-template-columns: 1fr;
    }

    .hero-panel-copy h1 {
        max-width: none;
    }
}

@media (max-width: 640px) {
    .hero-carousel {
        padding: 90px 4vw 18px;
    }

    .hero-panel {
        padding: 20px;
        border-radius: 20px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-btn {
        width: 100%;
        text-align: center;
    }
}

/* ===== HOVEDINNHOLD / GRID ===== */
.main-content {
    width: 100%;
    margin: 40px auto 0;
    padding: 0 4vw 80px;
    position: relative;
    z-index: 20;
}

.category-row {
    margin-bottom: 50px;
}

.category-row-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--text-main);
    border-left: 4px solid var(--accent);
    padding-left: 12px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-header h2 {
    font-size: 1.8rem;
    font-weight: 600;
}

.search-bar {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    font-size: 0.9rem;
    pointer-events: none;
}

#search-input {
    padding: 10px 16px 10px 36px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.2);
    background-color: rgba(0,0,0,0.5);
    color: white;
    width: 250px;
    transition: all var(--transition-speed);
}

#search-input:focus-visible {
    border-color: var(--accent);
    width: 300px;
    background-color: rgba(0,0,0,0.8);
}

.room-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 320px));
    gap: 25px;
    justify-content: center;
}

/* ===== ROM-KORT ===== */
.room-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    transition: all var(--transition-speed);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255,255,255,0.05);
    cursor: pointer;
}

.room-card:focus-visible {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(102, 252, 241, 0.35), 0 0 30px rgba(69, 162, 158, 0.4);
}

.room-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 0 30px rgba(69, 162, 158, 0.4);
    border-color: var(--accent);
    z-index: 30;
}

.card-image-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    overflow: hidden;
}

.card-image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    background: rgba(0,0,0,0.6);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    opacity: 0;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    border: 2px solid var(--accent);
    z-index: 10;
}

.room-card:hover .play-overlay {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 0 20px var(--accent);
}

.room-card:hover .card-image-container img {
    transform: scale(1.1);
}

.card-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 5px;
}

.badge {
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

.card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-content h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.card-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    margin-top: 15px;
    display: flex;
    gap: 15px;
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
}

/* ===== HOME SECTIONS & STATUS BADGES ===== */
.home-section {
    margin-bottom: 52px;
}

.home-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 18px;
}

.home-section-heading {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.home-section-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-main);
    border-left: 4px solid var(--accent);
    padding-left: 12px;
}

.home-section-description {
    max-width: 72ch;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

.home-section-count {
    flex: 0 0 auto;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.status-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    font-weight: 800;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 4px;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    letter-spacing: 1px;
    white-space: nowrap;
    backdrop-filter: blur(10px);
}

.status-badge.status-idea {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.96), rgba(244, 63, 94, 0.9));
    color: #fffaf4;
}

.status-badge.status-beta {
    background: #ffb703;
    color: #023047;
}

.status-badge.status-funksjonelt {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.96), rgba(16, 185, 129, 0.9));
    color: #f0fff4;
}

/* ===== ROOM LOBBY PAGE ===== */
.lobby-hero {
    position: relative;
    height: 60vh;
    display: flex;
    align-items: center;
    padding: 0 40px;
    background-size: cover;
    background-position: center;
    margin-top: 80px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(11, 12, 16, 0.84), rgba(11, 12, 16, 0.38));
}

.lobby-hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.lobby-main {
    margin-top: -80px;
}

.lobby-content {
    max-width: 800px;
    margin: 40px auto;
    padding: 40px;
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.05);
}

.lobby-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    color: var(--accent);
    font-weight: 600;
    flex-wrap: wrap;
}

.lobby-tags {
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.lobby-hero-content h1 {
    max-width: 14ch;
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.05;
    font-weight: 800;
    color: var(--text-main);
}

.stage-status {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    padding: 8px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.94), rgba(244, 63, 94, 0.88));
    color: #fffaf4;
    font-weight: 800;
    letter-spacing: 0.04em;
    box-shadow: 0 14px 30px rgba(249, 115, 22, 0.28);
    width: fit-content;
}

.stage-status.status-funksjonelt {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.96), rgba(16, 185, 129, 0.9));
    color: #f0fff4;
    box-shadow: 0 14px 30px rgba(34, 197, 94, 0.28);
}

.stage-status.status-idea {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.94), rgba(244, 63, 94, 0.88));
    color: #fffaf4;
    box-shadow: 0 14px 30px rgba(249, 115, 22, 0.28);
}

.lobby-seo-text {
    color: var(--text-muted);
    line-height: 1.8;
    font-size: 1.1rem;
    margin-bottom: 40px;
    display: grid;
    gap: 14px;
}

.lobby-seo-text p {
    margin: 0;
}

.lobby-lede {
    color: var(--text-main);
    font-weight: 600;
}

.lobby-lede-detail {
    max-width: 68ch;
}

.start-btn {
    display: block;
    text-align: center;
    padding: 20px;
    font-size: 1.5rem;
    background-color: var(--accent);
    color: #000;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 800;
    transition: all 0.3s;
}

.start-btn:hover {
    background-color: var(--accent-hover);
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(102, 252, 241, 0.4);
}

.start-btn-note {
    display: block;
    font-size: 0.6em;
    opacity: 0.8;
    margin-top: 4px;
}

/* ===== ROOM DETAIL SEO BOX ===== */
.seo-info-box {
    margin-top: 40px;
    padding: 25px;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

.seo-info-box p {
    margin-bottom: 15px;
}

.seo-info-box p:last-child {
    margin-bottom: 0;
}

.seo-info-box strong {
    color: var(--text-main);
    font-weight: 600;
}

.seo-info-box a {
    color: var(--accent);
    text-decoration: underline;
}

.seo-info-box a:hover {
    color: var(--accent-hover);
}

/* ===== FOOTER ===== */
.footer {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    border-top: 1px solid rgba(255,255,255,0.05);
    margin-top: 40px;
}

.footer a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition-speed);
}

.footer a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* ===== ANIMATIONS & SKELETONS ===== */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton-card {
    background: linear-gradient(90deg, var(--card-bg) 25%, #1e2630 50%, var(--card-bg) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
    height: 300px;
    width: 100%;
    border: 1px solid rgba(255,255,255,0.05);
}

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

.fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

/* ===== ABOUT PAGE ===== */
.about-main {
    padding: 120px 4vw 80px;
    min-height: calc(100vh - 80px);
}

.about-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--card-bg);
    padding: 50px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.about-title {
    font-size: 3rem;
    margin-bottom: 40px;
    text-align: center;
    color: var(--text-main);
}

.about-section {
    margin-bottom: 40px;
}

.about-section:last-child {
    margin-bottom: 0;
}

.about-section h2 {
    font-size: 1.8rem;
    color: var(--accent);
    margin-bottom: 20px;
}

.about-section p {
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.about-section p:last-child {
    margin-bottom: 0;
}

.about-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.about-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.contact-details p {
    margin-bottom: 10px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .keyword-map,
    .portal-bottom-copy {
        padding-inline: 4vw;
    }

    .keyword-map-inner,
    .portal-bottom-inner {
        padding: 20px 18px 22px;
    }

    .keyword-grid {
        grid-template-columns: 1fr;
    }

    .nav-container { padding: 0 20px; }
    .main-content { padding: 0 20px 40px; margin-top: 100px; }
    .section-header { flex-direction: column; align-items: flex-start; gap: 15px; }
    .home-section-header { flex-direction: column; align-items: flex-start; gap: 12px; }
    .home-section-title { font-size: 1.4rem; }
    .home-section-count { align-self: flex-start; }
    #search-input { width: 100%; }
    #search-input:focus { width: 100%; }
}
