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

html, body {
    margin: 0;
    padding: 0;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

body {
    background-color: #2E4057;
    background: repeating-linear-gradient(60deg,
        #2E4057,
        #2E4057 20px,
        #3B5373 20px,
        #3B5373 40px);
}

div.container {
    display: grid;
    height: 100vh;
    width: 100vw;

    grid-template:
        "nav nav nav nav nav nav"8% 
        "title title title title title title"8% 
        "canvas canvas canvas canvas canvas canvas"1fr 
        "footer footer footer footer footer footer"12% / 1fr 1fr 1fr 1fr 1fr 1fr;

    padding: 0;
    box-sizing: border-box;
}

/* Navigation */
.navigation {
    grid-area: nav;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding: 0 40px;
    position: relative;
}

/* Logo Styles */
.nav-logo {
    position: absolute;
    left: 40px;
    display: flex;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-image {
    height: 40px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo-image:hover {
    transform: scale(1.05);
}

/* Title Section */
.title-section {
    grid-area: title;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
}

.game-title {
    color: #ffffff;
    font-size: 2.2rem;
    font-weight: bold;
    text-align: center;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.nav-link {
    padding: 10px 16px;
    text-decoration: none;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.nav-link.active {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-color: #667eea;
    color: white;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.4);
}

/*
info
*/

.stitched {
    margin-top: 10px;
    margin-left: 10px;
    font-weight: bold;
    border: 1px dashed grey;
    border-radius: 6px; /* Hexagonal corners */
    font-weight: normal;
    background: #00bfa5;
    box-shadow: 0 0 0 4px #00bfa5, 2px 1px 6px 4px rgba(0, 191, 165, 0.5);
}

#info {
    position: absolute;
    right: 20px;
    top: 0px;
    width: 40px;
    height: 40px;
    z-index: 1;
    grid-area: header;
    color: #000;
    text-align: center;
    vertical-align: middle;
    line-height: 40px;
    font-size: 30px;
    transition: 0.5s;
    cursor: pointer;
}

/* Mobile positioning for info button */
@media (max-width: 768px) {
    #info {
        right: 80px; /* Move further left to avoid toggle button */
        background: #ffffff; /* White background */
        border: 1px solid #ddd; /* Light border */
        border-radius: 4px; /* Slightly rounded corners like toggle button */
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); /* Subtle shadow */
        width: 32px; /* Match toggle button size */
        height: 32px; /* Match toggle button size */
        line-height: 32px; /* Center the question mark */
        font-size: 18px; /* Adjust font size for smaller button */
        color: #333; /* Dark text for white background */
    }
}

#info:hover {
    transform: translate(0px, 2px);
    box-shadow: 0 0 0 2px #00bfa5, 2px 1px 6px 4px rgba(0, 191, 165, 0.5);
}

/*
Canvas
*/
.canvasContainer {
    grid-area: canvas;
    background-color: #1e3a4a;
    margin-left: 1%;
    margin-right: 1%;
    overflow: hidden;
    border: 1px dashed #00bfa5;
    border-radius: 8px;
}

/*
footer
*/
.footer {
    grid-area: footer;
    display: grid;
    grid-template: 1fr / 1fr;
    justify-items: center;
    align-items: center;
}

/*
Progress bar and score display
*/
.score-container {
    width: 100%;
    max-width: 600px;
    margin: auto;
}

.score-text {
    color: white;
    font-size: 1.2em;
    text-align: center;
    margin-bottom: 10px;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

#progress-bar {
    margin: auto;
}

.label-center {
    color: white;
    text-shadow: none;
}

/* Responsive Title Styles */
@media (max-width: 768px) {
    .game-title {
        font-size: 1.8rem;
    }
    
    div.container {
        grid-template:
            "nav nav nav nav nav nav"8% 
            "title title title title title title"8% 
            "canvas canvas canvas canvas canvas canvas"1fr 
            "footer footer footer footer footer footer"12% / 1fr 1fr 1fr 1fr 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .game-title {
        font-size: 1.5rem;
        padding: 0 10px;
    }
    
    div.container {
        grid-template:
            "nav nav nav nav nav nav"8% 
            "title title title title title title"8% 
            "canvas canvas canvas canvas canvas canvas"1fr 
            "footer footer footer footer footer footer"12% / 1fr 1fr 1fr 1fr 1fr 1fr;
    }
}

@media (max-width: 360px) {
    .game-title {
        font-size: 1.3rem;
        padding: 0 5px;
    }
}

