@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

/* CSS Custom Properties */
:root {
    /* Colors */
    --color-primary: #45f528;
    --color-secondary: #458128;
    --color-dark: #000;
    --color-gray-dark: #666;
    --color-gray-medium: #999;
    --color-gray-light: #ccc;
    --color-gray-lighter: #ddd;
    --color-gray-lightest: #eee;
    --color-background: #eee;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 2.5rem;
    
    /* Layout */
    --content-max-width: 800px;
    --icon-size: 32px;
    --border-width: 2px;
    
    /* Typography */
    --font-primary: "Press Start 2P", "Menlo", "Roboto", "Source Code Pro", "Consolas", monospace;
    --font-secondary: "Menlo", "Roboto", "Source Code Pro", "Consolas", monospace;
    
    /* Transitions */
    --transition-fast: 0.3s ease;
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Base Styles */
html, body {
    font-family: var(--font-primary);
    font-weight: 400;
    font-style: normal;
    line-height: 1.5rem;
    background-color: var(--color-background);
    margin: 0;
}

header {
    text-align: center;
}

header a {
    color: var(--color-primary);
    text-decoration: none;
}

header ul {
    line-height: 4rem;
}

header li:before, header li:after {
    content: " | ";
    color: var(--color-primary);
}

h1 {
    display: block;
    margin: 0 auto;
    text-transform: uppercase;
    color: var(--color-gray-dark);
}

ul {
    list-style: none;
}

li {
    display: inline-block;
    padding: 0 0.5rem;
}

li a {
    color: var(--color-dark);
    text-decoration: none;
}

li a:hover, li a:active {
    text-shadow: 0 0 10px var(--color-primary);
}

nav {
    background-color: var(--color-gray-light);
}

main {
    width: var(--content-max-width);
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: var(--space-lg) var(--space-sm);
}

footer {
    font-family: var(--font-secondary);
    border-top: var(--border-width) solid var(--color-gray-light);
    text-align: center;
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
}

footer ul {
    font-size: 0;
}

/* Social Icons */
footer svg, footer .socialicon, footer .social-icon {
    border-radius: 50%;
    width: var(--icon-size);
    height: var(--icon-size);
    margin: 0 0.25rem;
    fill: var(--color-gray-dark);
    transition: fill var(--transition-fast);
}

footer svg:hover, footer .socialicon:hover, footer .social-icon:hover {
    fill: var(--color-primary);
}

/* Bluesky icon special styling - inverted colors */
footer .icon-bluesky {
    background-color: var(--color-gray-dark);
    fill: var(--color-gray-lightest);
    padding: 4px;
    box-sizing: border-box;
}

footer .icon-bluesky:hover {
    background-color: var(--color-primary);
    fill: var(--color-gray-lightest);
}

#wrapper {
    padding: var(--space-sm) 0;
}

#logo {
    width: 192px;
    height: auto;
}

#subtitle {
    line-height: 60px;
    font-size: 35px;
    -webkit-font-smoothing: antialiased;
    -webkit-text-stroke-color: var(--color-dark);
    -webkit-text-stroke-width: 1px;
    color: var(--color-primary);
}

/* Layout Utilities */
.centered {
    text-align: center;
    padding: var(--space-sm) 0;
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-justify {
    text-align: justify;
}

.text-center-clear {
    text-align: center;
    clear: both;
}

.text-left-centered {
    text-align: left;
    max-width: 600px;
    margin: 0 auto;
}

.text-left-centered-reduced {
    text-align: left;
    max-width: 600px;
    margin: var(--space-sm) auto;
}

.small-centered {
    text-align: center;
    margin: var(--space-lg) 0;
    font-size: 0.8rem;
}

/* Spacing Utilities */
.spacing-top {
    margin-top: var(--space-sm);
}

.spacing-top-large {
    margin-top: var(--space-lg);
}

/* Component Styles */
.mainimage {
    float: right;
    margin: 0 0 20px 20px;
}

.mainimage>img {
    width: 256px;
    padding: 10px;
    border: 1px solid var(--color-gray-light);
    margin: 32px;
}

.ruler {
    clear: both;
    text-align: center;
    width: 100%;
}

.copyright {
    font-size: 0.7rem;
    line-height: 1.2rem;
    color: var(--color-gray-dark);
    margin-top: var(--space-sm);
}

/* Page-specific styles */
.page-header {
    text-align: center;
    color: var(--color-gray-dark);
    margin-bottom: var(--space-lg);
}

.page-header h1 {
    font-size: 1.7rem;
    margin-bottom: var(--space-sm);
}

.content-section {
    margin-bottom: var(--space-lg);
    text-align: justify;
}

.content-section h2 {
    color: var(--color-secondary);
    font-size: 1rem;
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
}

.section-subtitle {
    color: var(--color-secondary);
    margin-top: var(--space-lg);
}

/* Card Components */
.card {
    background-color: var(--color-gray-lighter);
    padding: var(--space-md);
    padding-top: 0;
    border: var(--border-width) solid var(--color-gray-light);
    margin: var(--space-lg) 0;
}

.card--primary-border {
    border-color: var(--color-primary);
}

.card--centered {
    text-align: center;
}

.card h2 {
    color: var(--color-secondary);
    text-align: center;
    margin-bottom: var(--space-sm);
}

.card h3 {
    font-size: 0.8rem;
    margin-bottom: var(--space-xs);
    color: var(--color-gray-dark);
}

.card p {
    font-size: 0.9rem;
    line-height: 1.2rem;
}

/* Adaptive Grid Layouts - Vimeo-style responsive behavior */
.gaming-grid {
    display: grid;
    gap: var(--space-sm);
    margin: var(--space-lg) 0;
    
    /* Mobile: 1 column */
    grid-template-columns: 1fr;
}

/* Responsive breakpoints for adaptive grid */
/* Small tablets: 2 columns */
@media (min-width: 500px) {
    .gaming-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Large tablets: 3 columns */
@media (min-width: 750px) {
    .gaming-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Desktop: 4 columns - break out of container */
@media (min-width: 1000px) {
    .gaming-grid {
        grid-template-columns: repeat(4, 1fr);
        width: calc(100vw - 2 * var(--space-lg));
        margin-left: calc((100vw - 100%) / -2);
        margin-right: calc((100vw - 100%) / -2);
        padding-left: var(--space-lg);
        padding-right: var(--space-lg);
    }
    
    /* Align heading with full-width grid */
    .gaming-grid + .content-section h2,
    .content-section:has(.gaming-grid) h2 {
        width: calc(100vw - 2 * var(--space-lg));
        margin-left: calc((100vw - 100%) / -2);
        margin-right: calc((100vw - 100%) / -2);
        padding-left: var(--space-lg);
        padding-right: var(--space-lg);
        box-sizing: border-box;
        text-align: center;
    }
}

/* Large desktop: 5 columns */
@media (min-width: 1300px) {
    .gaming-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Extra large: 6 columns */
@media (min-width: 1600px) {
    .gaming-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Gaming thumbnails with 16:9 aspect ratio */
.gaming-item {
    background-color: var(--color-gray-lighter);
    border: var(--border-width) solid var(--color-gray-light);
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.game-thumbnail {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background-color: var(--color-gray-light);
    border: 1px solid var(--color-gray-medium);
    display: block;
    transition: transform var(--transition-fast);
}

/* Hover overlay with alt text */
.gaming-item::after {
    content: attr(data-title);
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.7) 70%, rgba(0, 0, 0, 0.9));
    color: white;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: var(--space-sm);
    font-size: 0.8rem;
    line-height: 1.2;
    text-align: center;
    transform: translateY(100%);
    transition: transform var(--transition-fast);
    pointer-events: none;
}

.gaming-item:hover::after {
    transform: translateY(0);
}

.gaming-item:hover .game-thumbnail {
    transform: scale(1.05);
}

/* Legacy styles for backward compatibility */
.gaming-item h3 {
    font-size: 0.8rem;
    margin-bottom: var(--space-xs);
    color: var(--color-gray-dark);
}

.gaming-item p {
    font-size: 0.7rem;
    line-height: 1.1rem;
}

.event-details {
    background-color: var(--color-gray-lighter);
    padding: var(--space-md);
    border: var(--border-width) solid var(--color-primary);
    margin: var(--space-lg) 0;
}

.event-details h2 {
    color: var(--color-secondary);
    text-align: center;
    margin-bottom: var(--space-sm);
}

.event-highlight-box {
    background-color: var(--color-gray-lighter);
    padding: var(--space-md);
    border: var(--border-width) solid var(--color-gray-light);
    margin: var(--space-lg) 0;
}

.event-highlight-title {
    color: var(--color-secondary);
    margin-bottom: var(--space-sm);
}

/* Image Components */
.banner-image {
    max-width: 100%;
    height: auto;
    background-color: var(--color-gray-lighter);
    border: var(--border-width) solid var(--color-gray-light);
}

.event-image {
    background-color: var(--color-gray-light);
    border: 1px solid var(--color-gray-medium);
    margin: var(--space-xs);
}


/* Main content link styling */
main a {
    color: var(--color-secondary);
    text-decoration: none;
}

main a:hover,
main a:active {
    color: var(--color-primary);
}

/* Video Player Styles */
.video-player-container {
    max-width: 100%;
}

.video-player-container .page-header h1 {
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    text-align: center;
}

.video-wrapper {
    width: 100vw;
    margin-left: calc((100vw - 100%) / -2);
    margin-right: calc((100vw - 100%) / -2);
    padding: 0 6.5rem;
    margin-top: var(--space-lg);
    margin-bottom: var(--space-lg);
    box-sizing: border-box;
}

.vimeo-container {
    max-width: 100%;
    margin: 0 auto;
}

/* Responsive video player */
@media (max-width: 800px) {
    .video-wrapper {
        padding: 0 var(--space-sm);
    }
}

/* Utility Classes */
.hidden {
    display: none;
}

.primary {
    color: var(--color-primary);
}

.secondary {
    color: var(--color-secondary);
}

.darkgrey {
    color: var(--color-gray-dark);
}

/* Bulleted lists for content sections */
.event-highlights-list,
.requirements-list {
    list-style: disc outside;
    padding-left: var(--space-md);
}

.event-highlights-list li,
.requirements-list li {
    display: list-item;
    margin-bottom: var(--space-xs);
}

/* Hamburger Menu */
.hamburger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
}

.hamburger-menu span {
    width: 25px;
    height: 3px;
    background-color: var(--color-dark);
    transition: all var(--transition-fast);
    transform-origin: center;
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.nav-menu {
    display: flex;
}

/* Desktop navigation styling */
@media (min-width: 801px) {
    .hamburger-menu {
        display: none;
    }
    
    .nav-menu {
        display: flex !important;
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        background-color: var(--color-gray-light);
        border: none;
        width: auto;
        margin: 0;
        padding: 0;
    }
    
    .nav-menu li {
        border: none;
        display: inline-block;
        padding: 0 0.25rem;
    }
    
    .nav-menu li:before,
    .nav-menu li:after {
        content: " | ";
        color: var(--color-primary);
        display: inline;
    }
    
    .nav-menu li a {
        padding: 0;
        font-size: 0.9rem;
        line-height: 4rem;
        white-space: nowrap;
    }
}

/* Better spacing for larger screens */
@media (min-width: 1000px) {
    .nav-menu li {
        padding: 0 var(--space-xs);
    }
    
    .nav-menu li a {
        font-size: inherit;
    }
}

/* Responsive design */
@media (max-width: 800px) {
    body {
        margin: 0;
        padding: 0;
    }
    
    main {
        width: 100%;
        padding: var(--space-sm);
        padding-top: var(--space-lg);
        box-sizing: border-box;
    }
    
    .mainimage {
        float: none;
        text-align: center;
        margin: var(--space-sm) 0;
    }
    
    .mainimage>img {
        width: 200px;
        margin: var(--space-sm);
    }
    
    #subtitle {
        font-size: 16px;
        line-height: 30px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    #logo {
        max-width: 150px;
    }
    
    .hamburger-menu {
        display: flex;
        margin: var(--space-sm) auto;
    }
    
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: calc(-1 * var(--space-sm));
        right: calc(-1 * var(--space-sm));
        width: calc(100% + 2 * var(--space-sm));
        background-color: var(--color-gray-light);
        border-top: var(--border-width) solid var(--color-gray-medium);
        border-bottom: var(--border-width) solid var(--color-gray-medium);
        z-index: 1000;
        box-sizing: border-box;
        margin: 0;
        padding: 0;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu li {
        display: block;
        padding: 0;
        margin: 0;
        border-bottom: 1px solid var(--color-gray-medium);
    }
    
    .nav-menu li:before,
    .nav-menu li:after {
        content: "" !important;
        display: none;
    }
    
    .nav-menu li:last-child {
        border-bottom: none;
    }
    
    .nav-menu li a {
        display: block;
        padding: var(--space-xs) var(--space-sm);
        text-align: center;
        text-decoration: none;
        transition: background-color var(--transition-fast);
        font-size: 0.8rem;
        line-height: 1.2;
    }
    
    .nav-menu li a:hover,
    .nav-menu li a:active {
        background-color: var(--color-gray-medium);
        text-shadow: none;
    }
    
    header {
        position: relative;
        overflow: visible;
    }
    
    nav {
        position: relative;
        width: 100%;
    }
    
    .gaming-grid {
        gap: var(--space-xs);
    }
    
    .page-header h1 {
        font-size: 1.2rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    h1 {
        font-size: 1.2rem;
        line-height: 1.3;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .content-section h2 {
        font-size: 0.9rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .gaming-item {
        margin: var(--space-xs) 0;
    }
    
    .gaming-item h3 {
        font-size: 0.75rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .gaming-item p {
        font-size: 0.65rem;
    }
    
    .text-left-centered,
    .text-left-centered-reduced {
        max-width: 100%;
        padding: 0 var(--space-xs);
        box-sizing: border-box;
    }
    
    .event-highlight-box {
        margin: var(--space-sm) 0;
        padding: var(--space-sm);
    }
    
    .banner-image {
        width: 100%;
        height: auto;
    }
    
    .event-image {
        max-width: 100%;
        height: auto;
        margin: 0.25rem;
    }
    
    footer {
        padding: var(--space-sm) var(--space-xs);
    }
    
    footer ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: var(--space-xs);
        margin: 0;
        padding: 0;
    }
    
    footer li {
        display: flex;
        padding: 0;
        margin: 0;
    }
    
    footer svg,
    footer .socialicon,
    footer .social-icon {
        width: var(--icon-size);
        height: var(--icon-size);
        margin: 0;
    }
    
    .copyright {
        padding: 0 var(--space-xs);
        text-align: center;
        font-size: 0.6rem;
        line-height: 1.1rem;
    }
}

/* Video Backup Link Styles */
.video-backup-link {
    text-align: center;
    margin-top: var(--space-sm);
}

.backup-link-box {
    display: inline-block;
    border: var(--border-width) solid var(--color-gray-medium);
    background-color: var(--color-gray-lightest);
    padding: var(--space-sm);
    border-radius: 4px;
    transition: all var(--transition-fast);
}

.backup-link-box:hover {
    border-color: var(--color-primary);
    background-color: white;
    transform: translateY(-1px);
}

.backup-link-box a {
    text-decoration: none;
    color: var(--color-secondary);
    font-size: 0.8rem;
    font-weight: bold;
}

.backup-link-box a:hover {
    color: var(--color-secondary);
}