/* I AM THE ONE! (I am the one, I am the one) */
/* forcequitOS to be exactly. I was here */

/* ===== VARIABLES ===== */

/* Variables for light mode colors */
:root {
    color-scheme: light dark;
    --width: 100vw;
    --height: 100vh;
    --background-image: url('Sources/Backgrounds/TahoeLight.jpg');
    --text-color: #000000;
    --tab-bar-background: #0fb515;
    --link-color: #2b00ff;
    --tab-bar-link: #2b00ff;
    --nav-opacity: 0.7;
}

/* Variables for dark mode colors */
@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: light dark;
        --background-image: url('Sources/Backgrounds/TahoeDark.jpg');
        --text-color: #ffffff;
        --tab-bar-background: #4255ff;
        --link-color: #7299ff;
        --tab-bar-link: #7299ff;
        --nav-opacity: 0.5;
    }
}

/* ===== MISC STYLES ===== */

ul {
    list-style-type: none;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-image: var(--background-image);
    background-size: 100% 150%;
    color: var(--text-color);
    border-radius: 5px;
    text-align: left;
    border: 25px solid transparent;
}

h1, h2, h3, h4 {
    color: var(--text-color);
}

ol {
    list-style-position: outside;
    text-align: left;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

li {
    text-align: left;
    margin-right: 30px;
}

a:link {
    color: var(--link-color);
    text-decoration: none;
}

a:visited {
    color: var(--link-color);
}

a:hover {
    text-decoration: none; /* Remove underline globally */
}

/* ===== FROSTED GLASS NAVBAR ===== */

nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10;
    padding: 12px;
    text-align: center;
    border-radius: 0; /* Square navbar */

    /* Liquid Glass effect */
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(12px) saturate(1.2) brightness(1.05);
    -webkit-backdrop-filter: blur(12px) saturate(1.2) brightness(1.05);

    border: 1px solid rgba(255,255,255,0.3);
}

/* Navbar links with rounded square hover bubble */
nav a {
    position: relative;
    display: inline-block;
    color: var(--tab-bar-link);
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 0; /* keep link square, bubble will be rounded */
    transition: color 0.2s ease;
    overflow: visible; /* allow pseudo-element to overflow */
    z-index: 1;
}

/* Rounded square hover bubble under icons/text */
nav a::before {
    content: '';
    position: absolute;
    bottom: 50%; /* sit under text/icon */
    left: 50%;
    width: 110%;  /* slightly bigger than link height */
    height: 90%;  /* slightly bigger */
    border-radius: 12px; /* rounded square */
    background: rgba(255, 255, 255, 0.15); /* light mode default */
    backdrop-filter: blur(10px) saturate(1.2) brightness(1.05);
    -webkit-backdrop-filter: blur(10px) saturate(1.2) brightness(1.05);
    transform: translate(-50%, 50%) scale(0);
    transition: width 0.25s ease, height 0.25s ease, transform 0.25s ease, background 0.25s ease;
    z-index: 0; /* behind text */
}

nav a:hover::before {
    transform: translate(-50%, 50%) scale(1); /* expand bubble */
}

/* Ensure link text stays above bubble */
nav a:hover {
    color: var(--tab-bar-link);
    z-index: 1;
}

/* Mobile-specific adjustments */
@media screen and (max-width: 650px) {
    nav {
        font-size: 16px;
        padding: 10px 0;
    }

    nav a {
        padding: 8px 12px;
    }
}

/* Dark mode tweaks: darker bubbles */
@media (prefers-color-scheme: dark) {
    nav {
        background-color: rgba(0,0,0,0.3);
        border: 1px solid rgba(255,255,255,0.1);
    }

    nav a::before {
        background: rgba(255, 255, 255, 0.08); /* darker bubble */
    }
}

/* ===== BACKGROUND IMAGE & COLOR MODES ===== */

/* Mobile-specific light mode */
@media (prefers-color-scheme: light) and (max-width: 650px) {
    body {
        --background-image: url('Sources/Backgrounds/iOS26Light.jpg');
        --text-color: #ffffff;
        --tab-bar-background: #0fb515;
        --link-color: #2b00ff;
        --tab-bar-link: #2b00ff;
        --nav-opacity: 0.7;
    }

    nav a::before {
        background: rgba(255, 255, 255, 0.18); /* slightly lighter bubble */
    }
}

/* Mobile-specific dark mode */
@media (prefers-color-scheme: dark) and (max-width: 650px) {
    body {
        --background-image: url('Sources/Backgrounds/iOS26Dark.jpg');
        --text-color: #ffffff;
        --tab-bar-background: #0fb515;
        --link-color: #8ee9e0;
        --tab-bar-link: #8ee9e0;
        --nav-opacity: 0.5;
    }

    nav a::before {
        background: rgba(255, 255, 255, 0.1); /* slightly darker bubble */
    }
}

/* ===== GENERAL IMAGE STYLING ===== */

img {
    max-width: 100%;
    height: auto;
}

@media (max-width: 600px) {
    .headerlink img, main img {
        width: 15px;
        height: 15px;
    }

    .device-img {
        width: auto !important;
        height: auto !important;
    }
}
