:root {
    --black: #1C1C1C;
    --red: #D8323A;
    --blue: #A5C6EC;
    --purple: #9B8FB6;
    --beige: #D7A786;
}

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

/* Scrollbar Styling */
@media (max-width: 767px) {
    ::-webkit-scrollbar {
        width: 8px;
        height: 8px;
    }
}

@media (min-width: 768px) {
    ::-webkit-scrollbar {
        display: none;
    }
    /* Hide scrollbar for Firefox */
    * {
        scrollbar-width: none;
    }
    /* Hide scrollbar for IE/Edge */
    * {
        -ms-overflow-style: none;
    }
}

::-webkit-scrollbar-track {
    background: var(--black);
}

::-webkit-scrollbar-thumb {
    background: var(--purple);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--blue);
}

/* Hide scrollbar for Chrome, Safari and Opera */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.hide-scrollbar {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

html {
    height: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    background-color: var(--black);
    color: var(--blue);
    font-family: "MedievalSharp", cursive;
    min-height: 100vh;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.background-scroll {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image: url('assets/images/moonpooltile2.png');
    background-repeat: repeat;
    animation: infiniteScroll 20s linear infinite;
    z-index: -1;
    transform: rotate(-45deg);
}

@keyframes infiniteScroll {
    0% {
        transform: translate(0, 0) rotate(-45deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(-45deg);
    }
}

.container {
    position: relative;
    z-index: 1;
    padding: 20px;
    width: 95%;
    max-width: 1200px;
    margin: 0 auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

@media (max-width: 768px) {
    body {
        height: auto;
        overflow-y: auto;
    }
    
    .container {
        position: relative;
        height: 2500px;
    }

    .content-wrapper {
        position: relative;
        height: 100%;
    }
}

.content-wrapper {
    position: relative;
    width: 100%;
    min-height: calc(100vh - 200px);
    z-index: 1;
    display: flex;
    flex-direction: column;
}

/* Desktop Layout */
@media (min-width: 769px) {
    .solar-system {
        position: relative;
        width: 100%;
        height: 80vh;
        min-height: 600px;
        max-height: 800px;
        margin: 0 auto;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .planets-container {
        position: absolute;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
    }

    .moon {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 2;
    }

    .moon img {
        width: 200px;
        height: 200px;
        filter: drop-shadow(0 0 20px rgba(165, 198, 236, 0.4));
    }

    .planet {
        position: absolute;
        z-index: 1;
        transform-origin: center center;
        animation: orbit 20s linear infinite;
    }

    .planet img {
        width: 60px;
        height: 60px;
        transition: transform 0.3s ease;
    }

    .planet:hover img {
        transform: scale(1.2);
    }

    .mars { 
        animation-delay: -5s;
        left: 50%;
        top: 50%;
        margin-left: -200px;
        margin-top: -200px;
    }

    .venus { 
        animation-delay: -10s;
        left: 50%;
        top: 50%;
        margin-left: -150px;
        margin-top: -150px;
    }

    .mercury { 
        animation-delay: -15s;
        left: 50%;
        top: 50%;
        margin-left: -100px;
        margin-top: -100px;
    }

    .saturn { 
        animation-delay: 0s;
        left: 50%;
        top: 50%;
        margin-left: -250px;
        margin-top: -250px;
    }

    @keyframes orbit {
        from { transform: rotate(0deg) translateX(200px) rotate(0deg); }
        to   { transform: rotate(360deg) translateX(200px) rotate(-360deg); }
    }

    .merch-section {
        position: fixed;
        bottom: 50%;
        right: 15%;
        transform: translateY(50%);
        z-index: 5;
        width: 160px;
    }

    .shows-widget {
        position: fixed;
        top: 40px;
        right: 40px;
        width: 300px;
        z-index: 5;
    }

    .twine-game {
        position: fixed;
        bottom: 40px;
        left: 40px;
        width: 300px;
        height: 300px;
        z-index: 5;
    }

    .twine-game iframe {
        width: 100%;
        height: 600px;
        border: none;
        margin-top: 2rem;
    }

    @media (max-width: 768px) {
        .twine-game iframe {
            height: 90vh;
            min-height: 800px;
            margin: 2rem 0;
            width: 100vw;
            max-width: 100vw;
            position: relative;
            left: 50%;
            transform: translateX(-50%);
        }
    }
}

/* Mobile Layout */
@media (max-width: 768px) {
    .content-wrapper {
        height: auto;
        overflow-y: auto;
        padding: 1rem;
    }

    .solar-system {
        position: relative;
        height: 400px;
        max-width: 400px;
        margin: 1rem auto 2rem;
        display: flex;
        justify-content: center;
        align-items: center;
        transform: translateX(-20px);
    }

    .planets-container {
        position: absolute;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
    }

    .moon {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        z-index: 2;
    }

    .moon img {
        width: 100px;
        height: 100px;
    }

    .planet {
        position: absolute;
        left: 50%;
        top: 50%;
        transform-origin: center center;
        animation: orbit-mobile 20s linear infinite;
    }

    .planet img {
        width: 40px;
        height: 40px;
    }

    .mars { 
        animation-delay: -5s;
        margin-left: -100px;
        margin-top: -100px;
    }

    .venus { 
        animation-delay: -10s;
        margin-left: -80px;
        margin-top: -80px;
    }

    .mercury { 
        animation-delay: -15s;
        margin-left: -60px;
        margin-top: -60px;
    }

    .saturn { 
        animation-delay: 0s;
        margin-left: -120px;
        margin-top: -120px;
    }

    @keyframes orbit-mobile {
        from { transform: rotate(0deg) translateX(100px) rotate(0deg); }
        to   { transform: rotate(360deg) translateX(100px) rotate(-360deg); }
    }

    .content-wrapper {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

@media (min-width: 769px) {
    .merch-section {
        position: relative;
        width: 160px;
        margin: 2rem auto;
        transform: translateX(-50%);
        margin-left: 80px;
    }
}

@media (max-width: 768px) {
    .merch-section {
        position: relative;
        width: 160px;
        margin: 2rem auto;
        transform: translateX(-60%) translateY(-100%);
    }
}

    .twine-game {
        margin-bottom: 2rem;
    }

    .merch-section img {
        width: 100%;
        height: auto;
    }

@media (min-width: 769px) {
    .shows-widget {
        position: relative;
        width: 90%;
        max-width: 400px;
        margin: 2rem auto;
        padding: 1rem;
        order: 2;
    }

    .twine-game {
        position: relative;
        width: 90%;
        max-width: 400px;
        margin: 2rem auto;
        order: 4;
    }
}

@media (max-width: 768px) {
    .shows-widget {
        position: absolute;
        width: 90%;
        max-width: 400px;
        left: calc(50% - 200px);
        top: 600px;
        padding: 1rem;
        transform: translateX(calc(-50% - 100px));
    }

    .twine-game {
        position: absolute;
        width: 90%;
        max-width: 400px;
        left: 50%;
        top: 600px;
        transform: translateX(-50%);
    }
}

    .merch-section {
        position: relative;
        width: 160px;
        margin: -4rem auto 8rem;
        transform: translateX(calc(-60% - 20px)) translateY(-250px);
    }

    .twine-game iframe {
        width: 100% !important;
        height: 400px !important;
        border: 2px solid var(--purple);
        border-radius: 8px;
        max-width: 100vw;
    }

    /* Header adjustments */
    header {
        margin-bottom: 1.5rem;
        padding: 1rem;
    }

    .glitch {
        font-size: clamp(2rem, 8vw, 3rem);
        border-width: 10px;
        padding: 1rem;
        margin-bottom: 1.5rem;
    }

    .marquee {
        font-size: 0.9rem;
        padding: 0.8rem;
        width: 100vw;
        margin-left: calc(-1rem - 2.5%);
        margin-right: calc(-1rem - 2.5%);
        overflow: hidden;
    }

    .marquee span {
        padding-left: 100%;
        display: inline-block;
        animation: marquee 20s linear infinite;
    }
}

/* Header Styles */
header {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
}

.glitch {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: bold;
    text-transform: lowercase;
    color: var(--blue);
    position: relative;
    text-shadow: 2px 2px var(--purple);
    animation: glitch 3s infinite;
    font-family: "UnifrakturMaguntia", "MedievalSharp", cursive;
    background: linear-gradient(to bottom, var(--black), #2C1810);
    padding: 2rem;
    border: 20px solid var(--purple);
    border-image: url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h100v100H0V0z" fill="%239B8FB6"/><path d="M10 10h80v80H10V10z" fill="none" stroke="%23A5C6EC" stroke-width="4"/></svg>') 30;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    margin: 40px auto;
    max-width: 800px;
    position: relative;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.glitch::before {
    content: '';
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 40px;
    background: var(--purple);
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.glitch::after {
    content: '';
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 10px;
    background: var(--beige);
    border-radius: 5px;
}

@keyframes signSwing {
    0%, 100% { transform: rotate(-1deg); }
    50% { transform: rotate(1deg); }
}

@keyframes glitch {
    0% { transform: skew(0deg); }
    20% { transform: skew(10deg); }
    40% { transform: skew(-10deg); }
    60% { transform: skew(5deg); }
    80% { transform: skew(-5deg); }
    100% { transform: skew(0deg); }
}

.marquee {
    background: rgba(155, 143, 182, 0.7);
    color: var(--black);
    padding: 10px;
    white-space: nowrap;
    overflow: hidden;
    margin-top: 2rem;
}

.marquee span {
    display: inline-block;
    animation: marquee 20s linear infinite;
    font-size: 1.2rem;
    font-family: "MedievalSharp", cursive;
}

@keyframes marquee {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* Navigation */
nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.nav-button {
    background: var(--red);
    color: var(--black);
    padding: 10px 20px;
    border: 2px solid var(--blue);
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
}

.nav-button:hover {
    background: var(--blue);
    color: var(--black);
    transform: scale(1.1) rotate(-2deg);
}

/* Hero Section */
.hero {
    margin-bottom: 2rem;
}

.hero-content {
    text-align: center;
    padding: 2rem;
}

/* Pixel Box Style */
.pixel-box {
    border: 2px solid var(--blue);
    padding: 20px;
    margin: 20px 0;
    position: relative;
    background: var(--black);
}

.pixel-box::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 2px solid var(--purple);
    z-index: -1;
}

/* Buttons */
.cyber-button {
    background: var(--red);
    color: var(--black);
    border: none;
    padding: 15px 30px;
    font-family: "Courier New", monospace;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    margin: 10px;
}

.cyber-button:hover {
    background: var(--blue);
    transform: translateY(-2px);
}

.cyber-button.small {
    padding: 8px 15px;
    font-size: 0.8rem;
}

/* Show Grid */
.show-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.show-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--purple);
}

/* Footer */
footer {
    text-align: center;
    margin-top: 3rem;
    padding: 20px;
    border-top: 2px solid var(--purple);
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .content-wrapper {
        height: auto;
        overflow-y: auto;
        padding: 1rem;
    }

    .solar-system {
        position: relative;
        height: auto;
        min-height: 300px;
        display: flex;
        flex-direction: column;
        align-items: center;
        margin: 1rem 0 2rem;
    }

    .planets-container {
        position: relative;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.5rem;
        padding: 1rem;
        margin-top: 1rem;
    }

    .moon {
        position: relative;
        margin: 0 auto;
        animation: none !important;
        transform: none !important;
    }

    .moon img {
        width: 150px;
        height: 150px;
    }

    .planet {
        position: relative;
        margin: 0;
    }

    .planet img {
        width: 40px;
        height: 40px;
    }

    .merch-section {
        position: relative;
        width: 90%;
        max-width: 250px;
        margin: 2rem auto;
    }

    .merch-guy {
        display: block;
        width: 100%;
    }

    .merch-guy img {
        width: 100%;
        height: auto;
        transition: transform 0.3s ease;
    }

    .shows-widget {
        position: relative;
        width: 90%;
        max-width: 400px;
        margin: 2rem auto;
        padding: 1rem;
        animation: none !important;
        transform: none !important;
    }

    .twine-game {
        position: relative;
        width: 90%;
        max-width: 400px;
        margin: 2rem auto;
    }

    .twine-game iframe {
        width: 100% !important;
        height: 400px !important;
        border: 2px solid var(--purple);
        border-radius: 8px;
        max-width: 100vw;
    }

    /* Adjust header for mobile */
    header {
        margin-bottom: 1.5rem;
        padding: 1rem;
    }

    .glitch {
        border-width: 10px;
        padding: 1rem;
        margin-bottom: 1.5rem;
    }

    .marquee {
        font-size: 0.9rem;
        padding: 0.8rem;
        margin: 0 -1rem;
    }
}


    .nav-button {
        padding: 12px 24px;
        font-size: 1.1rem;
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .shows-widget {
        width: 100% !important;
        max-width: 100% !important;
        margin: 1rem auto !important;
    }

    .twine-game iframe {
        width: 100% !important;
        max-width: 100% !important;

    .background-scroll {
        animation: infiniteScroll 30s linear infinite;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }

    header {
        margin-bottom: 2rem;
    }

    .glitch {
        padding: 1rem;
        border-width: 10px;
    }

    nav {
        gap: 10px;
    }

    .moon img {
        width: 80px;
        height: 80px;
    }
}

.social-links {
    margin-bottom: 1rem;
}

.social-icon {
    color: var(--beige);
    text-decoration: none;
    margin: 0 10px;
    font-size: 1.2rem;
}

.social-icon:hover {
    color: var(--red);
}

/* Cursor Trail Effect */
.cursor-trail {
    pointer-events: none;
    position: fixed;
    width: 10px;
    height: 10px;
    background: var(--red);
    border-radius: 50%;
    opacity: 0.6;
    z-index: 9999;
}

@media (max-width: 768px) {
    .shows-widget {
        position: relative;
        width: 90%;
        max-width: 400px;
        margin: 2rem auto;
        padding: 1rem;
        animation: none !important;
        transform: none !important;
    }

    .twine-game {
        position: relative;
        width: 90%;
        max-width: 400px;
        margin: 2rem auto;
    }

    .twine-game iframe {
        width: 100% !important;
        height: 400px !important;
        border: 2px solid var(--purple);
        border-radius: 8px;
        max-width: 100vw;
    }

    /* Adjust header for mobile */
    header {
        margin-bottom: 1.5rem;
        padding: 1rem;
    }

    .glitch {
        border-width: 10px;
        padding: 1rem;
        margin-bottom: 1.5rem;
    }

    .marquee {
        font-size: 0.9rem;
        padding: 0.8rem;
        margin: 0 -1rem;
    }

    /* Container adjustments */
    .container {
        padding: 1rem;
    }

    /* Smooth scrolling for mobile */
    html {
        scroll-padding-top: 1rem;
    }

    /* Add section spacing */
    .solar-system > * {
        margin-bottom: 2rem;
    }

    .solar-system > *:last-child {
        margin-bottom: 4rem;
    }
}

.moon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    transition: transform 0.3s ease;
    animation: moonFloat 4s ease-in-out infinite;
}

@keyframes moonFloat {
    0% { transform: translate(-50%, -50%); }
    50% { transform: translate(-45%, -45%); }
    100% { transform: translate(-50%, -50%); }
}

.moon img {
    width: 150px;
    height: 150px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
}

.moon:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

.planet {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-origin: 50% 50%;
}

.planet img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.4));
}

.planet:hover img {
    transform: scale(1.2);
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.6));
}

.mars {
    animation: orbit 20s linear infinite;
}

.mars img {
    filter: drop-shadow(0 0 8px rgba(255, 0, 0, 0.4));
}

.venus {
    animation: orbit 15s linear infinite reverse;
}

.venus img {
    filter: drop-shadow(0 0 8px rgba(255, 192, 203, 0.4));
}

.mercury {
    animation: orbit 10s linear infinite;
}

.mercury img {
    filter: drop-shadow(0 0 8px rgba(192, 192, 192, 0.4));
}

.saturn {
    animation: orbit 25s linear infinite reverse;
}

.saturn img {
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.4));
}

@keyframes orbit {
    from {
        transform: rotate(0deg) translateX(180px) rotate(0deg);
    }
    to {
        transform: rotate(360deg) translateX(180px) rotate(-360deg);
    }
}

.planet.shows {
    width: 80px;
    height: 80px;
    position: absolute;
    top: 70%;
    left: 70%;
    transform-origin: -150px -150px;
    animation: orbit 20s linear infinite;
}

.planet.shows img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(216, 50, 58, 0.6));
    transition: transform 0.3s ease;
}

.planet.shows:hover img {
    transform: scale(1.2);
    filter: drop-shadow(0 0 15px rgba(216, 50, 58, 0.8));
}

.merch-guy {
    position: absolute;
    top: 20px;
    right: -180px;
    animation: breathe 4s ease-in-out infinite;
}

.merch-guy img {
    width: 360px;
    height: 360px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.4));
}

@keyframes breathe {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.merch-guy:hover img {
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.6));
}

.twine-game {
    position: relative;
    width: min(400px, 90vw);
    height: 300px;
    margin: 2rem auto;
    z-index: 2;
}

.twine-game iframe {
    border: none;
    background: transparent;
    overflow: hidden;
    display: block;
    margin: 0 auto;
    width: 100%;
    height: 100%;
}

.twine-game-title {
    font-family: "UnifrakturMaguntia", "MedievalSharp", cursive;
    color: var(--blue);
    text-align: center;
    margin-bottom: 10px;
    font-size: 1.2rem;
    text-shadow: 2px 2px var(--black);
    letter-spacing: 1px;
}

@media screen {
    .twine-game iframe {
        zoom: 0.8;
        transform: scale(0.8);
        transform-origin: 0 0;
        -moz-transform: scale(0.8);
        -moz-transform-origin: 0 0;
        -o-transform: scale(0.8);
        -o-transform-origin: 0 0;
        -webkit-transform: scale(0.8);
        -webkit-transform-origin: 0 0;
        -ms-transform: scale(0.8);
        -ms-transform-origin: 0 0;
    }
}

/* Planet pages common styles */
.planet-page {
    min-height: 100vh;
    padding: 2rem;
    color: var(--beige);
    font-family: "MedievalSharp", cursive;
    position: relative;
    overflow: hidden;
}

.planet-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-size: cover;
    background-position: center;
    animation: subtlePulse 5s ease-in-out infinite;
}

@keyframes subtlePulse {
    0% { opacity: 0.8; }
    50% { opacity: 1; }
    100% { opacity: 0.8; }
}

.back-to-moon {
    position: fixed;
    top: 20px;
    left: 20px;
    color: var(--beige);
    text-decoration: none;
    font-size: 1.2rem;
    z-index: 10;
}

.back-to-moon:hover {
    color: var(--red);
}

.shows-widget {
    position: relative;
    width: min(400px, 90vw);
    height: 300px;
    margin: 2rem auto;
    z-index: 2;
    background: rgba(28, 28, 28, 0.8);
    border-radius: 10px;
    border: 2px solid var(--purple);
    box-shadow: 0 0 20px rgba(216, 50, 58, 0.3);
    animation: orbit 30s linear infinite reverse;
    transform-origin: -300px 50%;
}
