/* ================================
   RESET
   ================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ================================
   PAGE
   ================================ */

body {
    min-height: 100vh;
    font-family: Arial, sans-serif;
    color: white;
}

/* Hide native scrollbar (custom one is used instead) */
html {
    scrollbar-width: none;

    /* Native scroll-snap drives page-to-page scrolling for every input
       method (wheel, trackpad, touch, keyboard) - see .page below. */
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

html::-webkit-scrollbar {
    display: none;
}

/* Background Video */
.background-video {
    position: fixed;
    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;

    z-index: -2;
}

/* Dark overlay */
body::before {
    content: "";

    position: fixed;
    inset: 0;

    background: rgba(0, 0, 0, 0.3);

    z-index: -1;
}

/* ================================
   HEADER
   ================================ */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 50px;
    background: rgba(55, 55, 55, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 2px solid #FFFF00;
    z-index: 10;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;

    color: white;
    text-decoration: none;

    font-size: 28px;
    font-weight: bold;
    letter-spacing: 4px;
}

.logo img {
    width: 60px;
    height: 60px;

    object-fit: contain;
}

/* ================================
   MAIN
   ================================ */

main {
    width: 100%;
}

@media (max-width: 768px) {
    main {
        padding-right: 0;
    }
}

.page {
    min-height: 100vh;
    width: 100%;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    /* Set side padding to 0 so 100% width children hit the screen edges */
    padding: 140px 0 60px;
    text-align: center;
}

/* ================================
   PAGE 1: ABOUT ME
   ================================ */

.page-about {
    padding: 140px 0 60px;
}

.about-strip {
    width: 100%;
    background: rgba(0, 0, 0, 0.55);
    border-top: 1px solid rgba(255, 255, 0, 1);
    border-bottom: 1px solid rgba(255, 255, 0, 1);
    padding: 60px 0;
}

.about-layout {
    display: flex;
    align-items: flex-start;
    gap: 30px;

    width: 90%;
    max-width: 1200px;
    margin: 0 auto;

    text-align: left;
}

.about-content {
    flex: 7;
}

.about-content h2 {
    margin-bottom: 20px;
    font-size: 32px;
    letter-spacing: 4px;
}

.about-content p {
    font-size: 15px;
    line-height: 1.7;
    opacity: 0.85;
}

/* ================================
   PAGE 2: TWITCH
   ================================ */

.page-twitch {
    gap: 30px;
}

.twitch-layout {
    display: flex;
    align-items: stretch;
    gap: 30px;

    width: 90%;
    max-width: 1200px;
    margin: 0 auto;

    text-align: left;
}

.twitch-layout.offline {
    width: 100%;
    max-width: 100%;
    margin: 0;
}

.twitch-player {
    flex: 7;
}

.twitch-player iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
    display: block;
}

/* Offline: player goes full width (stream-info panel is hidden below), but
   keeps the exact pixel height it had while live - JS sets that height
   inline before adding this class, so aspect-ratio is turned off here to
   avoid it fighting the frozen height. */
.twitch-layout.offline .twitch-player {
    flex: 1 1 100%;
    width: 100%;
}

.twitch-layout.offline .twitch-player iframe {
    width: 100%;
    aspect-ratio: auto;
}

.twitch-layout.offline .stream-info {
    display: none;
}

.schedule-panel {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

/* ================================
   STREAM INFO (Twitch API panel)
   ================================ */

.stream-info {
    flex: 3;

    display: flex;
    flex-direction: column;
    gap: 15px;

    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.2);

    padding: 25px;
}

.stream-title {
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 1px;
    line-height: 1.4;
}

.stream-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;

    font-size: 13px;
    font-weight: bold;
    letter-spacing: 2px;
    opacity: 0.75;
}

.stream-viewers::before {
    content: "\25CF ";
    color: #FFFF00;
}

.stream-info .donation-button-container {
    margin-top: auto;
    padding-top: 10px;
}

.stream-info .tip-button {
    display: block;
    text-align: center;
}

.debug-toggle {
    flex-shrink: 0;

    padding: 10px 15px;

    background: rgba(0, 0, 0, 0.75);
    color: white;

    border: 1px solid #FFFF00;
    border-radius: 4px;

    font-size: 11px;
    font-weight: bold;
    letter-spacing: 1px;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.debug-toggle:hover {
    background: #FFFF00;
    color: black;
}

/* ================================
   DONATION BUTTON
   ================================ */

.donation-button-container {
    margin-top: 25px;
}

.tip-button {
    display: inline-block;

    padding: 14px 35px;

    color: white;
    background: rgba(0, 0, 0, 0.55);

    border: 1px solid #FFFF00;
    border-radius: 4px;

    text-decoration: none;

    font-size: 14px;
    font-weight: bold;
    letter-spacing: 3px;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.tip-button:hover {
    background: #FFFF00;
    color: black;
}

/* ================================
   PAGE 3: LEADERBOARD + SCHEDULE
   ================================ */

.leaderboard-section {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.leaderboard-section h2 {
    margin-bottom: 35px;
    font-size: 32px;
    letter-spacing: 4px;
}

.leaderboard-scroll {
    display: flex;
    gap: 15px;

    width: 100%;

    overflow-x: auto;
    overflow-y: hidden;

    padding-bottom: 10px;

    scrollbar-width: none;
}

.leaderboard-scroll::-webkit-scrollbar {
    display: none;
}

.leaderboard-panel {
    flex: 1;
    min-width: 300px;
    min-height: 480px;

    display: flex;
    flex-direction: column;

    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.2);

    padding: 35px 30px;
}

.leaderboard-panel h3 {
    margin-bottom: 30px;
    font-size: 22px;
    letter-spacing: 3px;
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.leaderboard-entry {
    display: flex;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.leaderboard-entry:last-child {
    border-bottom: none;
}

.rank {
    width: 35px;

    font-size: 13px;
    font-weight: bold;

    opacity: 0.5;
}

.username {
    flex: 1;

    text-align: left;

    font-size: 14px;
    font-weight: bold;
}

.amount {
    font-size: 14px;
    font-weight: bold;

    color: #FFFF00;
}

.schedule-panel {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.schedule-item {
    display: flex;
    align-items: center;
    text-align: left;

    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px 20px;
    transition: background 0.2s ease;
}

.schedule-item:hover {
    background: rgba(30, 30, 0, 0.75);
}

.schedule-date {
    width: 100px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.25);
}

.schedule-date .day {
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 2px;
}

.schedule-date .date {
    font-size: 20px;
    font-weight: bold;
}

.schedule-info {
    padding-left: 25px;
}

.schedule-info h3 {
    font-size: 17px;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.schedule-time {
    font-size: 13px;
    font-weight: normal;
    letter-spacing: 1px;
    opacity: 0.6;
}

.schedule-info .countdown {
    font-size: 14px;
    opacity: 0.7;
}

.schedule-info .countdown-live {
    font-weight: bold;
    opacity: 1;
}

/* SOCIALS */

.socials-section {
    flex: 3;
    text-align: left;
    padding-left: 120px;
}

.socials-section h2 {
    margin-bottom: 25px;
    font-size: 28px;
    letter-spacing: 4px;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.social-links a {
    display: block;

    padding: 14px 35px;

    color: white;
    background: rgba(0, 0, 0, 0.55);

    border: 1px solid #FFFF00;
    border-radius: 4px;

    text-decoration: none;

    font-size: 14px;
    font-weight: bold;
    letter-spacing: 3px;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.social-links a:hover {
    background: #FFFF00;
    color: black;
}

@media (max-width: 768px) {
    .about-layout,
    .twitch-layout {
        flex-direction: column;
    }

    .socials-section {
        width: 100%;
        padding-left: 0;   /* Resets horizontal padding when stacked */
        margin-top: 20px;  /* Adds vertical spacing on mobile views */
    }
}

/* ================================
   FLOATING SCROLL INDICATOR
   ================================ */

.scroll-indicator {
    position: fixed;
    right: 15px;
    top: calc(110px + 10%);
    bottom: 10%;
    width: 24px;
    z-index: 100;
    cursor: pointer;
    touch-action: none;
}

.scroll-track {
    position: absolute;

    left: 50%;
    top: 0;

    width: 2px;
    height: 100%;

    transform: translateX(-50%);

    background: rgba(255, 255, 255, 0.25);
}

.scroll-thumb {
    position: absolute;

    left: 0;
    top: 0;

    width: 24px;
    height: 8px;

    background: #FFFF00;
    border-radius: 10px;

    transform: translateY(0);

    transition: width 0.15s ease;
}

/* On mobile, move the indicator to a horizontal bar at the bottom */
@media (max-width: 768px) {
    .scroll-indicator {
        left: 15px;
        right: 15px;
        top: auto;
        bottom: 15px;
        width: auto;
        height: 24px;
    }

    .scroll-track {
        left: 0;
        top: 50%;

        width: 100%;
        height: 2px;

        transform: translateY(-50%);
    }

    .scroll-thumb {
        left: 0;
        top: 0;

        width: 8px;
        height: 24px;

        transform: translateX(0);

        transition: height 0.15s ease;
    }
}

html {
    scrollbar-width: none;
    scroll-snap-type: none;
}