body {
    background-color: #000;
}

/* GyroWars page fullscreen layout */
body.gyrowars-page {
    overflow-x: hidden; /* keep vertical scroll */
}
body.gyrowars-page main {
    padding: 0;
}
body.gyrowars-page .container {
    max-width: 100%;
    padding: 0;
}
body.gyrowars-page .demo-section {
    margin: 0;
    width: 100%;
    min-height: calc(100dvh - var(--header-h, 0px));
    margin-left: 0;
}
/* Optional: hide heading/screenshot above the demo to free space */
/* Keep headings and screenshot visible so the rest of the page is accessible */

h1 {
    color: #ff00ff;
    text-shadow: 0 0 15px #ff00ff;
}

.game-content {
    display: grid;
    grid-template-columns: 1040px auto;
    gap: 40px;
    align-items: flex-start;
    justify-content: center; /* Center the whole grid layout */
}

.demo-section {
    margin-bottom: 40px;
    text-align: center;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

.controls-section {
    margin-bottom: 40px;
    display: flex;
    justify-content: center;
}

.game-demo {
    background: transparent;
    padding: 0;
    border: 0;
    border-radius: 0;
    width: 100%;
    min-height: calc(100dvh - var(--header-h, 0px));
    margin: 0;
    box-sizing: border-box;
}

.game-details {
    background-color: #1a1a1a;
    padding: 20px;
    border: 1px solid #00ffff;
    border-radius: 10px;
}

.screenshot-gallery {
    grid-column: 1 / -1; /* Span across both columns */
    background-color: #1a1a1a;
    padding: 20px;
    border: 1px solid #ff00ff;
    border-radius: 10px;
    margin-top: 20px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.gallery-grid img {
    width: 100%;
    border: 2px solid #00ffff;
    border-radius: 5px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.gallery-grid img:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px #ff00ff;
}

/* Game screenshot section */
.game-screenshot {
    text-align: center;
    margin-bottom: 40px;
    background: rgba(255, 0, 255, 0.1);
    border: 2px solid #ff00ff;
    border-radius: 10px;
    padding: 25px;
}

.game-screenshot h2 {
    color: #ff00ff;
    font-size: 1.6em;
    margin-bottom: 20px;
    text-shadow: 0 0 10px #ff00ff;
}

.preview-image {
    max-width: 100%;
    height: auto;
    max-height: 400px;
    border: 3px solid #00ff88;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
}

.preview-image:hover {
    transform: scale(1.02);
    box-shadow: 0 0 30px rgba(255, 0, 255, 0.5);
}

/* Style the iframe directly */
.game-demo iframe {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
    overflow: hidden;
}

.controls-info {
    background: rgba(0, 255, 136, 0.1);
    border: 2px solid #00ff88;
    border-radius: 10px;
    padding: 25px;
    max-width: 600px;
    width: 100%;
}

/* Documents Section Styling */
.documents-section {
    margin: 40px 0;
    text-align: center;
}

.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.document-card {
    background: rgba(255, 0, 255, 0.1);
    border: 2px solid #ff00ff;
    border-radius: 10px;
    padding: 25px;
    text-align: center;
}

.document-card h3 {
    color: #ff00ff;
    margin-bottom: 15px;
}

.document-card p {
    margin-bottom: 20px;
    color: #ddd;
}

.document-card .btn {
    background: linear-gradient(45deg, #ff00ff, #00ffff);
    color: #000;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: transform 0.3s, box-shadow 0.3s;
}

.document-card .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 0, 255, 0.3);
}

/* Build section layout (match Checkmate Gambit) */
.build-section h2 {
    color: #00ff88;
    font-size: 1.6em;
    margin: 20px 0 12px;
    text-align: center;
}
.build-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    align-items: start;
}
.build-frame {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 2px solid #00ff88;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 10px 30px rgba(0,255,136,0.12);
}
.build-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}
.howto {
    background: rgba(0, 255, 136, 0.1);
    border: 2px solid #00ff88;
    border-radius: 12px;
    padding: 20px;
}
.howto h3 { color: #00ff88; margin-top: 0; margin-bottom: 10px; }
.howto ul { list-style: none; padding: 0; margin: 0; }
.howto li { color: #ddd; margin-bottom: 10px; padding-left: 18px; position: relative; }
.howto li:before { content: "▶"; color: #00ff88; position: absolute; left: 0; }

@media (max-width: 900px) {
    .build-layout { grid-template-columns: 1fr; }
    .build-section h2 { text-align: left; }
}
