/* Custom CSS Variables for easy updates */
:root {
    --sonic-blue: #004cff;
    --sonic-red: #ff3838;
    --text-color: #ffffff;
    --base-padding-desktop: 100px;
}

/* Base Reset and Typography */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--sonic-blue);
    overflow: hidden;
    position: relative; 
}

/* --- ADVANCED EFFECT 1: SCANLINE/NOISE OVERLAY --- */
body:after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100; 
    pointer-events: none; 
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    opacity: 0.1; 
    mix-blend-mode: overlay; 
}


/* --- ADVANCED EFFECT 2: GLITCH KEYFRAME ANIMATION --- */
@keyframes glitch-effect {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}


/* --- LANDING PAGE CONTAINER (Desktop Grid) --- */
.landing-page {
    background-color: var(--sonic-blue); 
    color: var(--text-color);
    width: 100vw;
    height: 100vh;
    display: grid;
    grid-template-columns: 40% 60%;
    position: relative;
}

/* --- 1. SOCIAL SIDEBAR (Desktop) --- */
.social-sidebar {
    position: absolute;
    left: 80px; 
    top: 50%;
    transform: rotate(-90deg) translate(-50%); 
    transform-origin: left bottom; 
    white-space: nowrap;
    letter-spacing: 4px; 
    font-size: 14px;
    opacity: 0.7;
    z-index: 20;
    display: block;
    padding: 10px 0; 
    max-height: 100vh;
}
.social-sidebar a {
    color: var(--text-color);
    text-decoration: none;
    padding: 0 15px;
    transition: all 0.3s ease-in-out;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3); 
}
.social-sidebar a:hover {
    color: var(--sonic-red); 
    text-shadow: 
        0 0 5px var(--sonic-red),
        0 0 10px var(--sonic-red),
        0 0 20px rgba(255, 56, 56, 0.8);
    letter-spacing: 6px; 
}

/* --- 2. CONTENT AREA (Desktop) --- */
.content-area {
    grid-column: 1 / 2;
    padding: 40px 0 40px 150px; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 10;
    position: relative;
}

/* Long Logo (Desktop only) */
.logo {
    position: absolute;
    top: 40px;
    font-size: 20px;
    font-weight: 700; 
    letter-spacing: 2px;
    color: var(--text-color);
    text-shadow: 1px 0 0 rgba(255, 255, 255, 0.4), -1px 0 0 rgba(255, 255, 255, 0.4), -2px 0 5px rgba(0, 76, 255, 0.8); 
    transition: all 0.2s ease-in-out;
    cursor: default;
}
/* Short Logo (Hidden on Desktop) */
.logo-mobile-short {
    display: none;
}

.now-playing {
    font-size: 16px;
    letter-spacing: 5px;
    margin-bottom: 5px;
    font-weight: 300;
    opacity: 0.8;
}
h1 {
    font-family: 'Bebas Neue', sans-serif; 
    font-size: 10vw; 
    line-height: 0.9;
    margin: 0;
    font-weight: 900;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    margin-bottom: 10px;
}

/* Subtitle with Glitch Effect Styling */
.subtitle {
    color: var(--sonic-red); 
    font-size: 2.5vw; 
    letter-spacing: 5px;
    font-weight: bold;
    margin-top: 10px;
    position: relative;
    text-shadow: 0 0 10px var(--sonic-red); 
}
.subtitle:before,
.subtitle:after {
    content: attr(data-text); 
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    text-shadow: 2px 2px 0 var(--sonic-blue), -2px -2px 0 var(--sonic-blue);
    clip: rect(44px, 450px, 56px, 0); 
}
.subtitle:after {
    left: 2px;
    text-shadow: -1px 0 var(--sonic-red);
    color: var(--sonic-blue);
    animation: glitch-effect 5s infinite linear alternate-reverse; 
}
.subtitle:before {
    left: -2px;
    text-shadow: 1px 0 var(--text-color);
    color: var(--sonic-red);
    animation: glitch-effect 5s infinite linear alternate-reverse; 
}

/* --- YOUTUBE CTA BUTTON STYLING (Desktop) --- */
.youtube-cta-link {
    text-decoration: none; 
    display: inline-block;
    margin-top: 35px; 
    z-index: 10;
}
.youtube-button {
    background-color: var(--sonic-red); 
    color: var(--text-color);
    border: 2px solid var(--sonic-red);
    padding: 12px 25px;
    font-size: 16px;
    font-weight: bold;
    letter-spacing: 2px;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 0 10px rgba(255, 56, 56, 0.4); 
}
.youtube-button:hover {
    background-color: var(--text-color); 
    color: var(--sonic-red); 
    border-color: var(--sonic-red);
    box-shadow: 
        0 0 5px var(--sonic-red),
        0 0 15px var(--sonic-red),
        0 0 30px rgba(255, 56, 56, 0.8),
        0 0 40px rgba(255, 56, 56, 0.5);
    transform: scale(1.05);
}


/* --- 3. HERO VISUAL (Desktop - Image is stable) --- */
.hero-visual {
    grid-column: 2 / 3;
    position: relative;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    overflow: hidden;
}

.sonic-image {
    position: absolute;
    right: 0; 
    bottom: 0; 
    height: 100vh; 
    width: auto;
    transform: none; 
    object-fit: cover; 
    z-index: 5;
}


/* =========================================== */
/* === SONIC RINGS STYLING (Desktop) === */
/* =========================================== */
.sonic-ring {
    position: absolute;
    background-image: url('golden-ring.webp');
    background-size: contain;
    background-repeat: no-repeat;
    width: 80px;
    height: 80px;
    z-index: 8; 
    animation: rotateAndFloat 10s linear infinite;
    opacity: 0.8;
}
.ring-1 { top: 20%; left: 40%; width: 60px; height: 60px; animation-delay: 0s; }
.ring-2 { bottom: 10%; left: 20%; width: 100px; height: 100px; animation-delay: 3s; }
.ring-3 { top: 15%; right: 5%; width: 70px; height: 70px; animation-delay: 6s; }
.ring-4 { bottom: 30%; right: 25%; width: 90px; height: 90px; animation-delay: 2s; }
.ring-5 { top: 50%; left: 60%; width: 50px; height: 50px; animation-delay: 8s; z-index: 6; }

@keyframes rotateAndFloat {
    0% { transform: translate(0, 0) rotate(0deg); opacity: 0.8; }
    25% { transform: translate(5px, -5px) rotate(90deg); opacity: 0.9; }
    50% { transform: translate(0, 0) rotate(180deg); opacity: 0.8; }
    75% { transform: translate(-5px, 5px) rotate(270deg); opacity: 0.9; }
    100% { transform: translate(0, 0) rotate(360deg); opacity: 0.8; }
}


/* ========================================================= */
/* ================  MOBILE  (0 – 768px)  ================== */
/* ========================================================= */
@media (max-width: 768px) {

    body {
        overflow-y: auto;
    }

    /* Sonic as background */
    .landing-page {
        display: flex;
        flex-direction: column;
        width: 100vw;
        min-height: 100vh;
        height: auto;
        background-color: var(--sonic-blue);
        background-image: url('../images/sonic-placeholder.webp');
        background-repeat: no-repeat;
        background-position: bottom right -20px;
        background-size: 105% auto;     /* fills width, nice and big */
    }

    /* HERO VISUAL now only used for rings overlay */
    .hero-visual {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        pointer-events: none;
        background: transparent;
        z-index: 3;                     /* behind text, above bg */
    }

    /* hide foreground Sonic, we use background instead */
    .sonic-image {
        display: none;
    }

    /* TEXT AREA */
    .content-area {
        height: auto;
        width: 100%;
        padding: 28px 20px 150px 20px;   /* bottom padding so text doesn’t hit Sonic */
        justify-content: flex-start;
        position: relative;
        z-index: 5;                      /* above rings + bg */
    }

    .logo {
        display: block;
        font-size: 4vw;
        line-height: 1.4;
        position: relative;
        top: 0;
        left: 0;
        margin-bottom: 18px;
        max-width: 90%;
        text-shadow: 1px 0 0 rgba(255,255,255,0.4),
                     -1px 0 0 rgba(255,255,255,0.4);
    }

    .logo-mobile-short {
        display: none;
    }

    .now-playing {
        font-size: 3.1vw;
        letter-spacing: 0.25em;
        margin-bottom: 6px;
        opacity: 0.85;
    }

    h1 {
        font-family: 'Bebas Neue', sans-serif;
        font-size: 13vw;                /* tuned for mobile */
        line-height: 0.9;
        margin: 0 0 4px 0;
        font-weight: 900;
        text-shadow: 0 0 10px rgba(0, 0, 0, 0.25);
    }

    .subtitle {
        color: var(--sonic-red);
        font-size: 5.2vw;
        letter-spacing: 0.18em;
        font-weight: bold;
        margin-top: 2px;
        position: relative;
        text-shadow: 0 0 8px var(--sonic-red);
    }

    .subtitle:before,
    .subtitle:after {
        content: attr(data-text);
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

    .subtitle:after {
        left: 2px;
        text-shadow: -1px 0 var(--sonic-red);
        color: var(--sonic-blue);
        animation: glitch-effect 5s infinite linear alternate-reverse;
    }

    .subtitle:before {
        left: -2px;
        text-shadow: 1px 0 var(--text-color);
        color: var(--sonic-red);
        animation: glitch-effect 5s infinite linear alternate-reverse;
    }

    .youtube-cta-link {
        margin-top: 18px;
        display: inline-block;
    }

    .youtube-button {
        padding: 12px 24px;
        font-size: 4vw;
        border-radius: 6px;
    }

    /* SOCIAL SIDEBAR */
    .social-sidebar {
        display: block;
        position: absolute;
        top: 38%;
        left: -55px;
        transform: rotate(-90deg);
        transform-origin: left bottom;
        font-size: 3vw;
        letter-spacing: 0.22em;
        opacity: 0.8;
        z-index: 4;
    }

    /* RINGS – visible again & positioned for mobile */
    .sonic-ring {
        display: block;
        width: 42px;
        height: 42px;
        animation: rotateAndFloat 7s linear infinite;
        opacity: 0.9;
        z-index: 4;
    }
    .ring-1 { top: 60%; left: 8%; }
    .ring-2 { top: 63%; left: 55%; }
    .ring-3 { top: 71%; left: 30%; }
    .ring-4 { top: 75%; left: 76%; }
    .ring-5 { display: none; }          /* optional – to avoid clutter */
}


/* ========================================================= */
/* ==============  TABLET  (769 – 1199px)  ================= */
/* ========================================================= */
@media (min-width: 769px) and (max-width: 1199px) {

    body {
        overflow-y: auto;
    }

    /* Sonic as background on tablets */
    .landing-page {
        display: grid;
        grid-template-columns: 1fr;
        width: 100vw;
        min-height: 100vh;
        height: auto;
        background-color: var(--sonic-blue);
        background-image: url('../images/sonic-placeholder.webp');
        background-repeat: no-repeat;
        background-position: bottom right;
        background-size: 100% auto;     /* fits to width */
    }

    /* Rings overlay: hero-visual stays, only Sonic image hidden */
.hero-visual {
    position: fixed;          /* <-- IMPORTANT: stays above background */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: transparent;
    z-index: 4;               /* above background, below text */
}


    .sonic-image {
        display: none;
    }

    .content-area {
        grid-column: 1 / 2;
        padding: 50px 40px 180px 40px;  /* extra bottom padding */
        justify-content: flex-start;
        position: relative;
        z-index: 5;
    }

    .logo {
        position: relative;
        top: 0;
        left: 0;
        margin-bottom: 22px;
        max-width: 520px;
        font-size: 24px;
    }

    .logo-mobile-short {
        display: none;
    }

    .now-playing {
        font-size: 15px;
        letter-spacing: 0.25em;
        margin-bottom: 6px;
    }

    h1 {
        font-size: 8.5vw;               /* slightly smaller than mobile */
        line-height: 0.9;
        margin-bottom: 6px;
    }

    .subtitle {
        font-size: 3vw;
        letter-spacing: 0.18em;
        margin-top: 4px;
    }

    .youtube-cta-link {
        margin-top: 22px;
    }

    .youtube-button {
        font-size: 15px;
        padding: 12px 30px;
        border-radius: 6px;
    }

    .social-sidebar {
        position: absolute;
        top: 45%;
        left: -40px;
        transform: rotate(-90deg);
        transform-origin: left bottom;
        font-size: 12px;
        letter-spacing: 0.18em;
        opacity: 0.8;
        z-index: 4;
    }

    /* RINGS – tablet sizing & positions */
.sonic-ring {
    display: block;
    position: absolute;       /* <-- REQUIRED */
    width: 56px;
    height: 56px;
    animation: rotateAndFloat 8s linear infinite;
    opacity: 0.9;
    z-index: 4;
}

.ring-1 { top: 55%; left: 18%; }
.ring-2 { top: 60%; left: 60%; }
.ring-3 { top: 70%; left: 34%; }
.ring-4 { top: 75%; left: 78%; }

    .ring-5 { display: none; }
}
