:root {
    --bg: #141414;
    --card: #222;
    --accent: #e50914;
    /* Netflix red */
    --muted: #8c8c8c;
    --text: #ffffff;
}

/* Light theme overrides */
html[data-theme="light"]{
    --bg: linear-gradient(180deg,#f8f8f8 0%, #ececec 100%);
    --card: #ffffff;
    --text: #111111;
    --muted: #666666;
    --accent: #e50914;
}

* {
    box-sizing: border-box
}

html,
body {
    height: 100%
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
    background: linear-gradient(180deg, var(--bg) 0%, #0f0f0f 100%);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

main {
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center
}

h1 {
    font-size: 2.25rem;
    margin: 0 0 1.5rem;
    font-weight: 700
}

.profiles {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    padding: 0;
    margin: 0;
    list-style: none;
    justify-content: center
}

/* Remove marker from outer wrapper when using nested lists */
.profiles-wrapper{list-style:none;padding:0;margin:0}
.profiles-wrapper li{list-style:none;padding:0;margin:0}

/* Theme toggle button */
.theme-toggle{
    position:fixed;
    top:1rem;
    right:1rem;
    width:44px;
    height:44px;
    border-radius:999px;
    border:1px solid rgba(255,255,255,0.06);
    background:rgba(0,0,0,0.25);
    color:var(--text);
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    font-size:1.1rem;
    backdrop-filter: blur(6px);
}
.theme-toggle:focus{outline:none;box-shadow:0 0 0 3px rgba(229,9,20,.14)}

/* Light theme for toggle */
html[data-theme="light"] .theme-toggle{
    background: rgba(255,255,255,0.7);
    border-color: rgba(0,0,0,0.08);
    color: var(--text);
}

.profile {
    width: 160px
}

.profile button {
    width: 100%;
    background: transparent;
    border-radius: 6px;
    padding: 0;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    color: var(--text)
}

.profile button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(229, 9, 20, .18);
    border-color: var(--accent)
}

.profile img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    border: 4px solid rgba(255, 255, 255, 0.03);
    transition: transform .18s ease, box-shadow .18s ease
}

.profile button:hover img {
    transform: translateY(-6px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .6)
}

.profile span {
    display: block;
    font-size: 0.95rem;
    color: var(--muted)
}

/* Styles for profile links (navigation) */
.profile-link{
    width: 100%;
    background: transparent;
    border-radius: 6px;
    padding: 0;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    color: var(--text);
    text-decoration: none;
}
.profile-link:focus{
    outline: none;
    box-shadow: 0 0 0 3px rgba(229, 9, 20, .18);
    border-color: var(--accent);
}
.profile-link:hover img{
    transform: translateY(-6px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .6);
}

footer {
    margin-top: 2rem;
    color: var(--muted);
    font-size: 0.875rem;
    text-align: center
}


/* Mobile adjustments */
@media (max-width:600px) {
    body {
        padding: 1.25rem
    }

    .profiles {
        gap: .75rem
    }

    .profile {
        width: 110px
    }

    .profile img {
        width: 96px;
        height: 96px
    }

    h1 {
        font-size: 1.5rem
    }
}

/* Small tablets */
@media (min-width:601px) and (max-width:900px) {
    body {
        padding: 1.5rem
    }

    .profiles {
        gap: 1rem
    }

    .profile {
        width: 140px
    }

    .profile img {
        width: 100px;
        height: 100px
    }

    h1 {
        font-size: 1.75rem
    }
}

/* Large tablets / small desktops */
@media (min-width:901px) and (max-width:1200px) {
    main {
        max-width: 1000px
    }

    .profiles {
        gap: 1.5rem
    }

    .profile {
        width: 160px
    }

    .profile img {
        width: 120px;
        height: 120px
    }

    h1 {
        font-size: 2rem
    }
}

/* Desktop and larger */
@media (min-width:1201px) {
    main {
        max-width: 1200px
    }

    .profiles {
        gap: 2rem
    }

    .profile {
        width: 180px
    }

    .profile img {
        width: 140px;
        height: 140px
    }

    h1 {
        font-size: 2.5rem
    }
}

/* Utility: screen-reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0
}
