:root {
    --bg-obsidian: #0D0D0F;
    --card-gray: #1A1A1C;
    --glass-border: rgba(255, 255, 255, 0.08);
    --spectrum-speed: 12s;
}

.top-nav {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.top-nav a {
    color: white;
    text-decoration: none;
}

.top-nav a:hover {
    opacity: 1;
    text-decoration: underline;
}

body.home-page .main-encapsulation {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 60px;
    border-radius: 20px;
    padding: 60px;
    width: 90%;
    max-width: 2000px;
    aspect-ratio: 16 / 8;
    max-height: 75vh;
    box-shadow: 0 30px 80px rgba(0,0,0,0.6);
    overflow: hidden;
    margin-top: 80px; /* Space for nav */
    margin-bottom: 80px; /* Space for footer */
}

@media (max-width: 1100px) {
    .top-nav {
        top: 20px;
    }
    
    body.home-page .main-encapsulation {
        margin-top: 20px; /* Adjust for mobile */
        margin-bottom: 20px;
        flex-direction: column;
        aspect-ratio: auto;
        height: auto;
        padding: 40px 20px;
        gap: 30px;
        text-align: center;
        border-radius: 50px;
    }
}

.footer-meta {
    margin-top: 40px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.3;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 20px; /* Space between the copyright text and link */
}

.footer-meta p {
    margin: 0; /* Remove bottom margin to avoid vertical stacking */
}

.footer-meta a {
    color: white;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.footer-meta a:hover {
    opacity: 1;
    text-decoration: underline;
}

body {
    margin: 0;
    background-color: var(--bg-obsidian);
    background: radial-gradient(circle at center, #16161D 0%, var(--bg-obsidian) 100%);
    color: white;
    font-family: 'Inter', -apple-system, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    padding: 20px;
    box-sizing: border-box;
}

body::before {
    content: "";
    position: fixed;
    top: 50%; left: 50%;
    width: 100vw; height: 100vh;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle at 50% 50%, currentColor 0%, transparent 60%);
    animation: ambientPulse 8s infinite ease-in-out, spectrum-lerp var(--spectrum-speed) infinite linear;
    z-index: 0;
    pointer-events: none;
    opacity: 0.45;
    filter: blur(40px);
    will-change: transform;
}

body.privacy-page::before {
    opacity: 0.3;
    filter: blur(60px);
}

@keyframes ambientPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.4); }
}

@keyframes spectrum-lerp {
    0%, 100% { border-color: #ff3c30; color: #ff3c30; box-shadow: 0 0 40px rgba(255, 60, 48, 0.5); }
    20% { border-color: #ff9500; color: #ff9500; box-shadow: 0 0 40px rgba(255, 149, 0, 0.5); }
    40% { border-color: #ffcc00; color: #ffcc00; box-shadow: 0 0 40px rgba(255, 204, 0, 0.5); }
    60% { border-color: #34c759; color: #34c759; box-shadow: 0 0 40px rgba(52, 199, 89, 0.5); }
    80% { border-color: #007aff; color: #007aff; box-shadow: 0 0 40px rgba(0, 122, 255, 0.5); }
}

.main-encapsulation {
    position: relative;
    background: var(--card-gray);
    border: 1px solid var(--glass-border);
    z-index: 10;
}

body.home-page .main-encapsulation {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 60px;
    border-radius: 20px;
    padding: 60px;
    width: 90%;
    max-width: 2000px;
    aspect-ratio: 16 / 8;
    max-height: 75vh;
    box-shadow: 0 30px 80px rgba(0,0,0,0.6);
    overflow: hidden;
}

body.privacy-page .main-encapsulation {
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 1200px; /* Increased from 800px for wider layout */
    height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 40px 100px rgba(0,0,0,0.8);
}

.hero-photo {
    position: absolute;
    right: 0; top: 0; bottom: 0;
    width: 60%;
    background-image: url('streakr/images/hero1.png');
    background-size: cover;
    background-position: right bottom;
    background-repeat: no-repeat;
    z-index: 1;
}

.hero-gradient-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, var(--card-gray) 25%, rgba(26, 26, 28, 0.8) 45%, rgba(26, 26, 28, 0) 75%);
    z-index: 2;
    pointer-events: none;
}

.phone-mockup {
    height: 70%;
    aspect-ratio: 8 / 17;
    border: 4px solid;
    border-radius: 20px;
    flex-shrink: 0;
    z-index: 5;
    animation: bounce 5s infinite ease-in-out, spectrum-lerp var(--spectrum-speed) infinite linear;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    box-sizing: border-box;
}

.phone-inner-screen {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    background-color: currentColor;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 50px rgba(0,0,0,0.2);
}

.phone-mockup img {
    max-width: 50%;
    height: auto;
    z-index: 10;
    filter: drop-shadow(0 0px 5px rgba(0,0,0,0.7));
}

.scale-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    animation: scaleLogo 5s infinite ease-in-out;
}

.rotating-logo {
    max-width: 50%;
    height: auto;
    filter: drop-shadow(0 0px 5px rgba(0,0,0,0.7));
    animation: rotateLogo 5s infinite linear;
}

@keyframes scaleLogo {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(0.75); } /* Pulse inward */
}

@keyframes rotateLogo {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(-360deg); }
}

.content { flex: 1; z-index: 5; }

h1 {
    font-weight: 900;
    margin: 0;
}

body.home-page h1 {
    font-size: 4rem;
    letter-spacing: -3px;
    line-height: 0.95;
    color: #E0E0E0;
}

body.privacy-page h1 {
    font-size: 2.2rem;
    letter-spacing: -1px;
    margin: 0 0 10px 0;
}

.subtitle {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.45);
    margin: 20px 0 35px 0;
    line-height: 1.5;
    max-width: 400px;
}

.cta-button {
    display: inline-block;
    padding: 14px 40px;
    border-radius: 12px;
    border: 2px solid;
    background: transparent;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: spectrum-lerp var(--spectrum-speed) infinite linear;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s ease;
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
    .cta-button:hover { transform: translateY(-5px); }
}

.cta-button:active {
    transform: translateY(0) scale(0.98);
    background-color: currentColor;
    color: #000;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.breadcrumb {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.breadcrumb a { color: white; text-decoration: none; }

.breadcrumb a:hover { opacity: 1; text-decoration: underline; }

.scroll-area {
    flex: 1;
    overflow-y: auto;
    padding-right: 15px;
    margin-top: 20px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.7);
    scroll-behavior: smooth; /* For smooth scrolling on TOC links */
}

.scroll-area::-webkit-scrollbar { width: 4px; }

.scroll-area::-webkit-scrollbar-track { background: transparent; }

.scroll-area::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }

h3 { color: white; margin-top: 30px; font-weight: 700; }

p { margin-bottom: 15px; }

ul { padding-left: 20px; }

li { margin-bottom: 8px; }

.toc {
    margin: 20px 0;
    padding: 15px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
}

.toc h4 {
    margin: 0 0 10px 0;
    font-size: 1rem;
    color: white;
    font-weight: 600;
}

.toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc li {
    margin-bottom: 8px;
}

.toc a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
}

.toc a:hover {
    color: white;
    text-decoration: underline;
}

@media (max-width: 1100px) {
    body.home-page { overflow-y: auto; align-items: flex-start; padding: 40px 20px; }
    body.home-page .main-encapsulation { flex-direction: column; aspect-ratio: auto; height: auto; padding: 40px 20px; gap: 30px; text-align: center; border-radius: 20px; }
    .hero-photo { width: 100%; height: 100%; opacity: 0.5; background-position: center bottom; }
    .hero-gradient-overlay {
        background: linear-gradient(to top, var(--card-gray) 5%, rgba(26, 26, 28, 0.8) 35%, rgba(26, 26, 28, 0) 100%);
    }
    body.home-page h1 { font-size: 2.5rem; }
    .phone-mockup { width: 160px; height: 302px; padding: 6px; border-radius: 18px;}
    .phone-inner-screen {
        border-radius: 12px;
    }
    .cta-button { align-self: center; }
}

footer {
    position: absolute;
    bottom: 20px; /* Matches body's padding */
    left: 0;
    right: 0;
    z-index: 10; /* Above other elements if needed */
    text-align: center; /* Fallback centering */
}

@media (max-width: 1100px) {
    body.privacy-page {
        overflow-y: auto; /* Enable page scrolling */
        flex-direction: column; /* Stack elements vertically */
        justify-content: flex-start; /* Align content to top */
        align-items: center; /* Center horizontally */
        padding: 50px 25px; /* Increased for more space on mobile */
    }
   
    body.privacy-page .main-encapsulation {
        height: auto; /* Remove fixed height to let content dictate size */
        max-height: none; /* No cap on height */
        border-radius: 20px; /* Softer radius for mobile */
        padding: 30px 20px; /* Slightly tighter padding to save space */
    }
   
    body.privacy-page .scroll-area {
        padding-right: 10px; /* Reduce padding for narrower screens */
        margin-top: 15px; /* Tighten spacing */
    }
   
    body.privacy-page h1 {
        font-size: 1.8rem; /* Slightly smaller for mobile readability */
    }
   
    body.privacy-page .toc {
        margin: 15px 0; /* Reduce margins to save vertical space */
        padding: 10px;
    }
   
    body.privacy-page footer {
        position: relative; /* Switch to relative so it flows naturally at bottom */
        bottom: auto;
        left: auto;
        right: auto;
        width: 100%; /* Ensure full-width */
        margin-top: 20px; /* Add space above footer */
    }
}