/* General Styles for Index Page */
body.index-page {
    background-color: #000;
    color: #808080;
    font-family: 'Lucida Console', 'Courier New', monospace;
    font-size: 12px;
    margin: 0;
    padding: 0;
    overflow: hidden; /* Prevent scrollbars when scaled to fit */
}

.container {
    /* Use a natural design width/height as the base size for scaling */
    width: 1000px;
    max-width: none;
    /* Center via absolute positioning to allow transform scale */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.main-image {
    width: 100%;
    height: auto; /* Keep intrinsic aspect ratio */
    margin-bottom: 20px;
    border-radius: 15px;
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent),
                linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
    mask-size: cover;
    mask-composite: intersect;
}

.enter-text a {
    color: #FFFFFF;
    font-size: 3em; /* Desktop default; overridden on small screens */
    text-decoration: none;
    font-family: 'Lucida Console', 'Courier New', monospace;
}

.enter-text a:hover {
    color: #F0F0F0;
}

.instructions a {
    color: #CCCCCC;
    text-decoration: none;
}

.instructions a:hover {
    color: #D4D4D4;
}

.instructions a:visited {
    color: #666666;
}

.instructions {
    color: #808080;
    font-size: 0.9em; /* Desktop default; overridden on small screens */
}

/* Responsive adjustments for small viewports */
@media (max-width: 768px) {
    body.index-page {
        overflow: auto; /* Allow normal scrolling on mobile */
        /* Flex layout to enable vertical centering when there's extra space */
        display: flex;
        flex-direction: column;
        min-height: 100vh;  /* Fallback */
        min-height: 100svh; /* Mobile-friendly viewport height */
    }

    .container {
        position: static;         /* Disable absolute centering */
        width: 100%;              /* Fill viewport width */
        max-width: 100%;
        transform: none;          /* Disable JS scaling effects */
        margin: 0 auto;           /* Center horizontally in flow */
        margin-block: auto;       /* Vertically center when there's extra space */
        padding: 16px;            /* Comfortable breathing room */
        box-sizing: border-box;   /* Prevent right-side overflow */
    }

    .main-image {
        display: block;
        width: 100%;
        height: auto;             /* Preserve aspect ratio */
        margin: 0 0 12px 0;       /* Remove side margins to avoid gaps */
    }

    /* Fluid, readable typography on mobile */
    .enter-text a {
        font-size: clamp(1.5rem, 8vw, 2.25rem);
    }
    .instructions {
        /* Roughly half the previous size for better balance on narrow screens */
        font-size: clamp(0.5rem, 1.75vw, 0.6rem);
    }
}

/* Scoped Styles for altmain.html */
body.alt-page {
    margin: 0;
    padding: 0;
    overflow: auto;
    width: 100vw;
    height: 100vh;
}

.test-container {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.alt-top-section {
    height: 200px; /* Fixed height for top section */
    box-sizing: border-box; /* Includes padding and border in the element's total width and height */
}

.alt-content-section {
    flex: 1;
    min-height: 0;
    overflow: auto;
    box-sizing: border-box;
}

.alt-content-section iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    overflow: auto;
}

.alt-walker-section {
    height: 220px; /* Slightly increased height to eliminate bottom gap */
    box-sizing: border-box;
}

.alt-top-section {
    padding: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    background: url('http://www.ahopelessmotive.com/images/skyline.jpg') no-repeat center center; 
    background-size: cover;
    background-position: top center;
}

.alt-right-content {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 10px;
}

.alt-logo {
    height: auto;
    margin-top: 33px;
    margin-left: 10px;
}

.alt-navbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 25px;
}

.alt-navbar a {
    margin: 0 5px;
}

.alt-walker-section {
    width: 100%;
    height: 220px; /* Slightly increased height to eliminate bottom gap */
    overflow: hidden;
    background-image: url('http://www.ahopelessmotive.com/images/sidescroller.jpg');
    background-repeat: repeat-x;
    animation: slide 100s linear infinite; /* Shortened duration for faster animation */
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: relative;
}

.walker-content {
    position: relative; /* Adjust to allow proper inline positioning of images */
    display: flex;
    align-items: center;
}

.walker-image {
    height: 100%;
    width: auto;
}

.tv-container {
    width: 812px; /* Adjust width to match iframe */
    max-width: 100%; /* Ensure container does not exceed screen width */
    background-color: #43443e;
    border: 10px solid #43443e;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center; /* Center content horizontally */
    justify-content: center; /* Center content vertically */
}

.tv-screen {
    width: 100%; /* Make iframe take full width of container */
    height: 612px;
    background-color: #43443e; 
    border: none; /* Remove default border of iframe */
}

.tv-controls {
    text-align: center;
    padding: 10px 0;
    background-color: #43443e;
}

.tv-controls img {
    width: 100%;
    height: auto;
}

.tv-logo {
    display: none; /* Hidden by default, shown if conditionally needed */
    height: 100%; /* Ensure same height as walker-image */
    position: relative; /* Enable positioning adjustments */
    top: -20px; 
    left: 80px;
    opacity: 0.9;
}

.soundcloud-player {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    width: 100%;
    margin: 0;
    padding: 0;
}

.archive-container {
    width: 300px;
    margin: 20px auto;
    padding: 5px;
    border: 2px solid #FF0000;
    background-color: rgba(255, 0, 0, 0.1);
    text-align: center;
    font-family: 'OCR A Extended', 'Lucida Console', 'Courier New', 'MS Sans-Serif', 'Times New Roman';
}

.archive-link {
    color: #FFFFFF;
    font-size: 16px;
    text-decoration: none;
    padding: 5px;
    cursor: pointer;
}

.archive-link:hover {
    color: #FF0000;
}

.archive-separator {
    color: #FFFFFF;
    font-size: 16px;
}

.current-page {
    color: #FFFFFF;
    font-weight: bold;
    text-decoration: none;
}

.archive-section {
    text-align: center;
    margin-top: 20px;
}

.archive-box {
    display: inline-block;
    border: 2px solid #FFFFFF;
    padding: 10px 50px; /* Adding more padding for width */
    background-color: rgba(255, 0, 0, 0.1); /* Very transparent red */
}

.archive-title {
    display: block; /* Make the title a block element */
    font-family: 'Lucida Console', 'Courier New', monospace;
    color: #FFFFFF;
    font-weight: bold;
    text-align: center; /* Center the title text */
    margin-bottom: 5px; /* Space between title and numbers */
}

.archive-links {
    font-family: 'Lucida Console', 'Courier New', monospace;
    color: #FFFFFF;
    text-align: center; /* Center the links */
}

.archive-links a {
    color: #FFFFFF;
    text-decoration: none;
    margin: 0 5px; /* Spacing between the numbers */
}

.archive-links a:hover {
    color: #FF0000; /* Red on hover */
}

@keyframes slide {
    from {
        background-position: 0 0;
    }
    to {
        background-position: -800px 0; /* Adjusted for seamless loop; value should match image width */
    }
}
