* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    min-width: 800px;
}

header {
    grid-area: header;
    background-color: #000000;
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

header h1 {
    margin: 0;
    flex: 1;
    text-align: left;
    min-width: 200px;
}

.header-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.header-btn {
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
}

.header-btn:hover {
    background-color: #4a6741;
    border-color: #5a7c50;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

.header-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.header-btn.start {
    background-color: #27ae60;
    border-color: #2ecc71;
}

.header-btn.start:hover {
    background-color: #2ecc71;
    border-color: #58d68d;
}

.header-btn.start:disabled {
    background-color: #000000;
    border-color: #58d68d;
}

.header-btn.reset {
    background-color: #e74c3c;
    border-color: #ec7063;
}

.header-btn.reset:hover {
    background-color: #ec7063;
    border-color: #f1948a;
}

.difficulty {
    grid-area: diffnav;
    background-color: #3498db;
    color: white;
    padding: 1rem;
}

.category {
    grid-area: catnav;
    background-color: #e74c3c;
    color: white;
    padding: 1rem;
}

.nav-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-section h2 {
    margin: 0;
    font-size: 1.2rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.button-list {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    flex-wrap: nowrap;
    min-width: max-content;
    max-height: 77vh;
    overflow-y: auto;
    scrollbar-width: none;
}

.button-list li {
    flex-shrink: 0;
}

.nav-button {
    background-color: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    display: block;
    text-decoration: none;
    box-sizing: border-box;
    white-space: nowrap;
    min-width: 140px;
}

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

.nav-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.nav-button.active {
    background-color: rgba(255, 255, 255, 0.4);
    border-color: white;
    font-weight: bold;
}

.category .nav-button:disabled {
    background-color: rgb(255, 0, 0);
    border-color: rgb(255, 0, 0);
    font-weight: bold;
}

.category .active.nav-button:disabled {
    border-color: white;
}

.difficulty .nav-button:disabled {
    background-color: rgb(0, 119, 255);
    border-color: rgb(0, 119, 255);
    font-weight: bold;
}

.difficulty .active.nav-button:disabled {
    background-color: rgb(0, 119, 255);
    border-color: white;
    font-weight: bold;
}

.nav-content {
    flex-direction: column;
    align-items: stretch;
}

.nav-section h2 {
    text-align: center;
    margin-bottom: 1rem;
}

.button-list {
    flex-direction: column;
}

.nav-button {
    width: 100%;
    min-width: unset;
}

@media (max-width: 1023px) {
    .nav-button {
        font-size: 0.85rem;
        padding: 0.6rem 0.8rem;
    }
}

.trivia {
    grid-area: trivia;
    background-color: #ecf0f1;
    padding: 2rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.trivia>div>.button-list {
    padding: 1rem;
}

.trivia>button {
    margin-top: 2rem;
    background-color: rgba(255, 255, 255, 0.432);
    border: 2px solid rgba(0, 0, 0, 0.685);
    color: black;
    padding: 0.75rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    min-width: 20%;
}

.trivia>button:hover {
    background-color: rgba(119, 118, 118, 0.432);
    transform: translateY(-2px);
}

.trivia>button.hidden {
    display: none;
}

.trivia-button {
    background-color: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(0, 0, 0, 0.3);
    color: black;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    display: block;
    text-decoration: none;
    box-sizing: border-box;
    white-space: nowrap;
    min-width: 100%;
}

.trivia-button:hover {
    transform: translateY(-2px);
}

.trivia-button.correct {
    background-color: rgb(138, 247, 219);
    border: 2px solid rgb(72, 255, 200);
}

.trivia-button.incorrect {
    background-color: rgb(245, 101, 101);
    border: 2px solid rgb(252, 50, 50);
}

footer {
    grid-area: footer;
    background-color: #000000;
    color: white;
    padding: 1rem;
    text-align: center;
}

.content-container {
    font-family: 'Trebuchet MS', sans-serif;
    display: grid;
    min-height: 100vh;
    max-height: 100vh;
    grid-template-columns: 200px 200px 1fr;
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
        "header header header"
        "diffnav catnav trivia"
        "footer footer footer";
}

@media (min-width: 1024px) {
    .content-container {
        grid-template-columns: 250px 250px 1fr;
    }
}

@media (max-width: 1023px) {
    .nav-button {
        font-size: 0.85rem;
        padding: 0.6rem 0.8rem;
    }
}