:root {
    --background-light: #E4E6ED;
    --background-dark: #0F1117;
    --text-light: #1A1A1A;
    --text-dark: #EDEDED;
    --footer-padding: 1.2rem 2rem;
    --footer-border: rgba(0, 0, 0, 0.05);
    --font-family: 'Inter', sans-serif;
    --footer-bg-light: #F1F3F7;
    --footer-bg-dark: #1B1F2A;
    --hover-bg: rgba(100, 100, 100, 0.1);
    --link-text-colour: #3a6efc;
    --link-hover-dark: #7fa6ff;
    --credits-bg: #f9f9f9;
    --credits-bg-dark: #111;


}

* {
    user-select: none;
}

html,
body {
    cursor: none;
}

body {
    font-family: var(--font-family);
    transition: background-color 0.3s, color 0.3s;
}

body.light {
    background-color: var(--background-light);
    color: var(--text-light);
    background-image: linear-gradient(to right top, #f2f5ff, #e2eaff);
}

body.dark {
    background-color: var(--background-dark);
    color: var(--text-dark);
    background-image: linear-gradient(to right top, #0f1117, #1b1f2a);
}

.intro-top {
    display: flex;
    align-items: center;
    /* vertical center */
    justify-content: center;
    /* horizontal center */
    max-width: 900px;
    margin: 0 auto;
    /* center horizontally in viewport */
    padding: 0 1.5rem;
    gap: 2rem;
    flex-wrap: wrap;
    height: 100vh;
    /* full viewport height */
    box-sizing: border-box;
    /* include padding in height */
}

.intro-top {
    transform: scale(1.5);
}

/* Left side text */
.intro-text {
    flex: 1 1 320px;
    text-align: left;
}

/* Big title */
.intro-text h1 {
    font-weight: 700;
    font-size: 3rem;
    margin-bottom: 0.5rem;
    letter-spacing: 0.04em;
    color: var(--text-light);
    line-height: 1.1;
}

/* Tagline below title */
.tagline {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--text-light);
    margin-top: 0;
}

.continue-button {
    margin-top: 1.5rem;
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    background-color: var(--link-text-colour);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.continue-button:hover {
    background-color: #2f59e9;
    /* Slightly darker blue */
    transform: translateY(-1px);
}

.continue-button:focus-visible {
    outline: 2px solid white;
    outline-offset: 2px;
}

body.dark .continue-button {
    background-color: var(--link-text-colour);
    color: white;
}


.intro-image {
    width: 400px;
    position: relative;
    perspective: 1000px;
    display: inline-block;
}



.intro-image video {
    width: 100%;
    height: 100%;
    max-width: 700px;
    max-height: 600px;
    object-fit: contain;
    border-radius: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    transform-style: preserve-3d;
}

/* Style for placeholder */
.image-placeholder {
    width: 280px;
    height: 180px;
    background-color: #ddd;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #666;
    font-style: italic;
    font-weight: 500;
}

.intro-image video {
    transform: scale(1);
}


/* Dark mode colors */
body.dark .intro-text h1,
body.dark .tagline {
    color: var(--text-dark);
}

body.dark .image-placeholder {
    background-color: #444;
    color: #bbb;
}

@media (max-width: 1200px) {
    .intro-top {
        transform: scale(1.3);
    }

    .intro-image video {
        transform: scale(1);
    }
}

@media (max-width: 992px) {
    .intro-top {
        transform: scale(1.1);
        transform: scale(1.1);
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .intro-top {
        transform: scale(1);
        gap: 0.75rem;
    }

    .intro-image video {
        transform: scale(1);
    }
}

@media (max-width: 480px) {
    .intro-top {
        transform: scale(0.95);
        gap: 0.5rem;

    }

    .intro-image video {
        transform: scale(0.99);
    }
}




.site-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--footer-padding);
    font-size: 0.95rem;
    border-top: 1px solid var(--footer-border);
    background-color: var(--footer-bg-light);
    color: var(--text-light);
    transition: background-color 0.3s ease, color 0.3s ease;
    flex-wrap: wrap;
}

body.dark .site-footer {
    background-color: var(--footer-bg-dark);
    color: var(--text-dark);
}

.footer-left button {
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: background 0.3s;
}

.footer-left button:hover {
    background-color: var(--hover-bg);
}

.footer-right {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.footer-right a {
    text-decoration: none;
    color: inherit;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-right a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .site-footer {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .footer-left,
    .footer-right {
        justify-content: center;
        width: 100%;
    }

    .footer-right {
        flex-direction: column;
        gap: 0.75rem;
    }

    .footer-left button {
        justify-content: center;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .footer-left button {
        padding: 0.5rem;
        font-size: 0.9rem;
    }

    .footer-right a {
        font-size: 0.9rem;
    }
}


/* Base link styles */
a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease, text-decoration 0.3s ease;
    cursor: pointer;
}

a:hover,
a:focus {
    text-decoration: underline;
    color: var(--link-text-colour);
}

/* Dark mode links */
body.dark a {
    color: var(--text-dark);
}

body.dark a:hover,
body.dark a:focus {
    color: var(--link-hover-dark);
}

/* Optional: Focus outline for accessibility */
a:focus-visible {
    outline: 2px solid var(--link-text-colour);
    outline-offset: 2px;
}

.link-blue {
    color: var(--link-text-colour);
}

.features-wrapper {
    max-width: 1000px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}



.features-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-light);
}

/* Dark mode */
body.dark .features-title {
    color: var(--text-dark);
}


.features-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    max-width: 1000px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}

.feature-card {
    background-color: var(--footer-bg-light);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.feature-card h3 {
    margin-top: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-light);
}

.feature-card p {
    margin: 0.5rem 0 0;
    font-size: 1rem;
    color: var(--text-light);
}

/* Dark mode styles */
body.dark .feature-card {
    background-color: var(--footer-bg-dark);
}

body.dark .feature-card h3,
body.dark .feature-card p {
    color: var(--text-dark);
}

.streaming-support {
    text-align: center;
    padding: 3rem 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.streaming-support h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.streaming-tagline {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.streaming-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    align-items: center;
}

.streaming-logos img {
    height: 48px;
    max-width: 120px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.streaming-logos img:hover {
    transform: scale(1.05);
}

/* Dark mode support */
body.dark .streaming-support h2,
body.dark .streaming-tagline {
    color: var(--text-dark);
}


#rowCount {
    position: fixed;
    top: 10px;
    left: 10px;
    background: var(--footer-bg-light);
    /* fallback for light mode */
    color: var(--text-light);
    padding: 8px 12px;
    font-family: var(--font-family);
    font-size: 14px;
    border-radius: 6px;
    z-index: 9999;
    transition: background 0.3s, color 0.3s;
}

/* Dark theme override */
body.dark #rowCount {
    background: var(--footer-bg-dark);
    color: var(--text-dark);
}

#row-count {
    color: var(--link-text-colour);
}




/* Base heading style */
.credits-heading {
    text-align: left;
    margin: 80px auto 40px;
    font-family: 'Segoe UI', sans-serif;
    position: relative;
    padding-left: 20px;
}

.credits-heading h2 {
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--text-light);
    margin-top: 8px;
    position: relative;
    display: inline-block;
}

.credits-heading h2::after {
    content: '';
    display: block;
    width: 50%;
    height: 4px;
    background: linear-gradient(to right, #3a6efc, #3a6efc);
    margin: 10px auto 0;
    border-radius: 999px;
}

body.dark .credits-heading h2 {
    color: var(--text-dark);
}

.credits-heading-right {
    text-align: right;
    padding-left: 0;
    padding-right: 20px;
}

/* Grid styles */
.grid-credits {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 24px;
    justify-items: start;
    padding: 20px;
    max-width: 800px;
    margin-left: 20px;
    margin-right: auto;
}

.grid-credits-right {
    justify-items: end;
    margin-left: auto;
    margin-right: 20px;
}

/* Grid items */
.grid-credits a {
    text-decoration: none;
    text-align: center;
    transition: transform 0.3s ease;
}

.grid-credits a:hover {
    transform: scale(1.1);
}

.grid-credits img {
    height: 80px;
    width: 80px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.grid-credits a:hover img {
    box-shadow: 0 0 20px rgba(66, 133, 244, 0.4);
}

/* Responsive behavior */
@media screen and (max-width: 768px) {

    .credits-heading,
    .credits-heading-right {
        text-align: center;
        padding: 0 10px;
    }

    .grid-credits,
    .grid-credits-right {
        justify-items: center;
        margin-left: auto;
        margin-right: auto;
        padding: 10px;
    }

    .credits-heading h2::after {
        margin-left: auto;
        margin-right: auto;
    }
}


.controller:hover {
    cursor: url("../images/cursors/gamepad.png") 16 16, auto;
}

.css:hover {
    cursor: url("../images/cursors/css-3.png") 16 16, auto;
}

div.realistic:hover {
    cursor: url("../images/cursors/realistic.png") 16 16, auto;
}

.cloud:hover {
    cursor: url("../images/cursors/cloud.png") 16 16, auto;
}

.ai:hover {
    cursor: url("../images/cursors/brain.png") 16 16, auto;
}

.gamepad-focus {
    outline: 3px solid var(--primary-color, #3a6efc);
    outline-offset: 4px;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(58, 110, 252, 0.5);
}

#gamepad-hint {
    position: absolute;
    background-color: #222;
    color: #fff;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: var(--font-family);
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    border: 1px solid #444;
    display: flex;
    align-items: center;
}

#gamepad-hint::before {
    font-weight: 700;
    color: #fff;
    border-radius: 50%;
    width: 1.2em;
    height: 1.2em;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin-right: 0.5em;
}

.gamepad-hint--xbox::before,
.gamepad-hint--generic::before {
    content: 'A';
    background-color: #0e7a0e;
    border: 1px solid #8fdf8f;
}

.gamepad-hint--playstation::before {
    content: '×';
    font-size: 1.2em;
    line-height: 1;
    background-color: #0055c4;
    border: 1px solid #a3c5ff;
}

@media (hover: hover) and (pointer: fine) {
    #gamepad-cursor {
        position: fixed;
        top: 50%;
        left: 50%;
        width: 20px;
        height: 20px;
        background-color: rgba(0, 123, 255, 0.5);
        border: 2px solid #ffffff;
        border-radius: 50%;
        transform: translate(-50%, -50%);
        pointer-events: none;
        z-index: 10001;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
        transition: transform 0.1s ease-out;
    }

    #gamepad-cursor:active {
        transform: translate(-50%, -50%) scale(0.8);
    }
}

/* Styles for the tutorial banner */
#tutorial-banner {
    background: linear-gradient(90deg, #3a6efc, #5e8cff);
    color: white;
    text-align: center;
    padding: 0.8rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    width: 100%;
    box-sizing: border-box;

    /* --- NEW: Animation Properties --- */
    opacity: 0;
    /* Start fully transparent */
    visibility: hidden;
    /* Start hidden */
    transform: translateY(-100%);
    /* Start completely off-screen (above the page) */
    transition: opacity 0.5s ease, transform 0.5s ease, visibility 0.5s;
    /* Animate these properties smoothly */
}

/* NEW: This class is added by JavaScript to trigger the fade-in */
#tutorial-banner.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    /* Move it to its final position on-screen */
}

/* --- (You can delete the old #tutorial-banner.hidden class) --- */

#tutorial-banner p {
    margin: 0;
}

#tutorial-banner a {
    color: white;
    font-weight: 700;
    text-decoration: underline;
    transition: opacity 0.2s;
}

#tutorial-banner a:hover {
    opacity: 0.8;
    text-decoration: none;
}

#close-banner-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0.5rem;
    margin-left: 1.5rem;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

#close-banner-btn:hover {
    opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    #tutorial-banner {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
        text-align: left;
        justify-content: space-between;
    }

    #close-banner-btn {
        margin-left: 1rem;
    }
}