* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: #f7f9fc;
    color: #333;
    font-family: 'Quicksand', sans-serif;
    font-weight: 500;
    line-height: 1.6;
}

header {
    height: 254px;
    background: #ff9acd url('images/header.webp') no-repeat center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
nav {
    background-color: #f9e14d;
    text-align: center;
    padding: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    column-gap: 30px;
    row-gap: 10px;
}
nav a {
    color: #7130a0;
    text-decoration: none;
    margin: 0;
    font-family: 'Quicksand', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
}
nav a:hover,
nav a:focus-visible,
nav a[aria-current='page'] { text-decoration: underline; }

.container { max-width: 900px; margin: 25px auto; padding: 0 20px; }
.panel {
    background: white;
    border-radius: 12px;
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: 0 4px 8px #0000000d;
}
h1, h2 { color: #7130a0; line-height: 1.3; font-weight: 700; }
h1 { margin-top: 0; }
.intro, .count { color: #555; }
.search-label { display: block; margin-bottom: 8px; font-weight: 700; }
.search {
    display: block;
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #7130a0;
    border-radius: 10px;
    font: inherit;
    font-size: 1.1rem;
}
.search:focus { outline: 3px solid #ff9acd; outline-offset: 2px; }
.count { margin: 12px 0; }
.filter-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.filter-row label { font-weight: 700; }
.category-select {
    padding: 10px 12px;
    border: 2px solid #7130a0;
    border-radius: 9px;
    background: white;
    color: #333;
    font: inherit;
    max-width: 100%;
}
.song-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: 16px;
}
.song-link {
    display: block;
    background: #fff9db;
    border: 2px solid #ffe066;
    border-radius: 12px;
    padding: 18px;
    color: #7130a0;
    text-decoration: none;
    transition: transform .15s, box-shadow .15s;
}
.song-link:hover, .song-link:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px #0002;
}
.song-link strong { display: block; font-size: 1.2rem; }
.song-link span { display: block; color: #555; font-size: .92rem; }
.back { display: inline-block; margin-bottom: 15px; color: #7130a0; }
.lyrics, .notice {
    background: #fff9db;
    border-left: 5px solid #ffe066;
    border-radius: 6px;
    padding: 20px;
}
.lyrics { white-space: pre-line; font-size: 1.1rem; }
iframe.spotify { display: block; width: 100%; height: 352px; border: 0; border-radius: 12px; margin: 12px 0 24px; }
#empty { padding: 20px; text-align: center; }
[hidden] { display: none !important; }
footer { background: #333; color: white; text-align: center; padding: 24px; font-size: .9rem; }
footer a { color: #f9e14d; }

@media screen and (max-width: 600px) {
    header {
        height: 180px;
        background-size: cover;
        background-position: center center;
        background-repeat: no-repeat;
    }
    nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        padding: 12px;
    }
    nav a { margin: 0; font-size: 1.3rem; }
    .container { margin: 15px auto; padding: 0 12px; }
    .panel { padding: 18px; }
    .song-grid { grid-template-columns: 1fr; }
    .lyrics { padding: 15px; }
}

.social-links { display: flex; align-items: center; justify-content: center; gap: 15px; flex-wrap: wrap; margin-bottom: 20px; }
.social-icon { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; flex: 0 0 42px; line-height: 0; background-color: #444; border-radius: 50%; transition: background-color .25s ease, transform .2s ease; }
.social-icon svg { display: block; width: 22px; height: 22px; flex-shrink: 0; fill: #fff; }
.social-icon.youtube:hover { background-color: #ff0000; transform: scale(1.1); }
.social-icon.spotify:hover { background-color: #1ed760; transform: scale(1.1); }
.social-icon.facebook:hover { background-color: #1877f2; transform: scale(1.1); }
.social-icon.instagram:hover { background-color: #e1306c; transform: scale(1.1); }
.social-icon.tiktok:hover { background-color: #010101; transform: scale(1.1); }
footer a, footer a:visited { color: #f9e14d; }
footer a:hover { color: #ff9acd; }
.social-icon:focus-visible { outline: 3px solid #f9e14d; outline-offset: 3px; }

.social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    line-height: 0;
    transform: none;
}

.social-icon svg {
    display: block;
    width: 22px;
    height: 22px;
    margin: 0;
    transform: none;
}

.song-description { white-space: pre-line; }

.home-page nav a { margin: 0; }
.home-page .container { max-width: 800px; margin: 20px auto; padding: 0 20px; }
.home-page .ad-placeholder { background-color: #eaeaea; border: 2px dashed #bbb; color: #666; text-align: center; padding: 20px; margin: 20px 0; font-size: .9rem; }
.home-page .song-card { background: white; border-radius: 12px; padding: 30px; box-shadow: 0 4px 6px rgba(0,0,0,.05); margin-bottom: 30px; }
.home-page .song-title { color: #1a535c; margin-top: 0; }
.home-page .song-description { color: #666; font-style: italic; margin-bottom: 20px; }
.home-page .about-card { background-color: #fff; border: 3px solid #7130a0; border-radius: 12px; padding: 35px; margin-top: 40px; margin-bottom: 30px; box-shadow: 0 4px 6px rgba(0,0,0,.05); }
.home-page .about-title { color: #444; margin-top: 0; font-size: 1.8rem; border-bottom: 2px dashed #444; padding-bottom: 8px; }
.home-page .about-text { font-size: 1.15rem; color: #444; line-height: 1.7; }
.home-page .song-link { display: inline-block; background: #7130a0; color: white; padding: 13px 25px; border: 0; border-radius: 28px; font-weight: 700; text-decoration: none; margin-top: 8px; transition: none; }
.home-page .song-link:hover, .home-page .song-link:focus-visible { background: #55227c; text-decoration: underline; transform: none; box-shadow: none; }
.home-page footer { padding: 20px; margin-top: 40px; }
.home-page footer a, .home-page footer a:visited { text-decoration: none; }
.home-page footer a:hover { color: #ff9acd; }
@media screen and (max-width: 600px) {
    .home-page .container { padding: 0 12px; margin: 15px auto; }
    .home-page .song-card { padding: 18px; }
    .home-page .about-card { padding: 20px; margin-top: 25px; }
    .home-page .about-title { font-size: 1.5rem; }
    .home-page .about-text { font-size: 1rem; }
    .home-page .lyrics-box { padding: 15px; font-size: 1rem; }
    .home-page .social-links { gap: 12px; }
}

.about-card { background-color: #fff; border: 3px solid #7130a0; border-radius: 12px; padding: 35px; margin-top: 40px; margin-bottom: 30px; box-shadow: 0 4px 6px rgba(0,0,0,.05); }
.about-title { color: #444; margin-top: 0; font-size: 1.8rem; border-bottom: 2px dashed #444; padding-bottom: 8px; }
.about-text { font-size: 1.15rem; color: #444; line-height: 1.7; }
@media screen and (max-width: 600px) {
    .about-card { padding: 20px; margin-top: 25px; }
    .about-title { font-size: 1.5rem; }
    .about-text { font-size: 1rem; }
}

/* Pudding-TV-logo sentrert over toppcollagen på alle sider. */
header::after {
    content: "";
    display: block;
    width: 215px;
    height: 215px;
    max-height: 88%;
    background: url('images/puddingtv-logo.png') center / contain no-repeat;
    filter: drop-shadow(0 3px 8px rgba(0,0,0,.35));
    pointer-events: none;
}
@media screen and (max-width: 600px) {
    header::after { width: 145px; height: 145px; max-height: 86%; }
}
