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

body {
    font-family: Arial, sans-serif;
    background-color: #020f23;
    color: #fff;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

.difficulty-selector {
    margin-bottom: 15px;
    margin-top: 15px;
}

.difficulty-selector label {
    color: #b4c7d9;
    font-size: 14px;
    margin-right: 10px;
}

.difficulty-selector select {
    background: #1f3c67;
    color: #b4c7d9;
    border: 1px solid #2b538e;
    padding: 6px 12px;
    border-radius: 3px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.difficulty-selector select:hover {
    background: #25477b;
    color: #e9f2fa;
}

.difficulty-selector select:focus {
    outline: none;
    border-color: #3e9e49;
    box-shadow: 0 0 0 2px rgba(62, 158, 73, 0.2);
}

.category-toggles {
    margin-bottom: 15px;
}

.category-toggles > label {
    color: #b4c7d9;
    font-size: 14px;
    display: block;
    margin-bottom: 8px;
}

.category-radios {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: left;
}

.category-radios label {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #b4c7d9;
    font-size: 13px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.category-radios label:hover {
    color: #e9f2fa;
}

.category-radios input[type="radio"] {
    accent-color: #3e9e49;
}

h1 {
    color: #fff;
    margin-bottom: 10px;
}

.score {
    font-size: 18px;
    font-weight: bold;
    color: #3e9e49;
}

#quiz-container {
    background: #152f56;
    border-radius: 0;
    padding: 30px;
    box-shadow: none;
    text-align: left;
}

#question-section h2 {
    margin-bottom: 30px;
    color: #fff;
    text-align: center;
}

.tags-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

.tag-button {
    background: none;
    color: #b4c7d9;
    border: none;
    /* padding: 4px 8px; */
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: normal;
    transition: all 0.2s ease;
    text-align: left;
    width: auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.tag-button:hover {
    background: #1f3c67;
    color: #e9f2fa;
}

.tag-button:active {
    color: #e8c446;
}

.wiki-link {
    color: inherit;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: normal;
    /* padding: 0 .25rem; */
}

.wiki-link:hover {
    color: #e9f2fa;
}

.tag-link {
    color: inherit;
    text-decoration: none;
    padding: 0 .25rem;
}

/* Tag category colors */
.tag-general { color: #b4c7d9; }
.tag-general:hover { color: #2e76b4; }
.tag-artist { color: #f2ac08; }
.tag-artist:hover { color: #fbd67f; }
.tag-copyright { color: #d0d; }
.tag-copyright:hover { color: #ff5eff; }
.tag-character { color: #0a0; }
.tag-character:hover { color: #2bff2b; }
.tag-species { color: #ed5d1f; }
.tag-species:hover { color: #f6b295; }
.tag-invalid { color: #ff3d3d; }
.tag-invalid:hover { color: #ffbdbd; }
.tag-meta { color: #fff; }
.tag-meta:hover { color: #666; }
.tag-lore { color: #282; }
.tag-lore:hover { color: #5fdb5f; }

.vs {
    display: none;
}

#result-section {
    text-align: left;
}

#result-text {
    display: none;
}

.correct {
    color: #3e9e49;
}

.incorrect {
    color: #e45f5f;
}

.tag-counts {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 30px;
    align-items: flex-start;
}

.tag-count {
    background: none;
    padding: 4px 8px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    gap: 4px;
    width: auto;
}

.tag-name {
    padding: 0 .25rem;
}

.tag-count .tag-name {
    color: #b4c7d9;
    font-weight: normal;
    font-size: 0.85rem;
}

/* Tag category colors for result display */
.tag-count .tag-name.tag-general { color: #b4c7d9; }
.tag-count .tag-name.tag-artist { color: #f2ac08; }
.tag-count .tag-name.tag-copyright { color: #d0d; }
.tag-count .tag-name.tag-character { color: #0a0; }
.tag-count .tag-name.tag-species { color: #ed5d1f; }
.tag-count .tag-name.tag-invalid { color: #ff3d3d; }
.tag-count .tag-name.tag-meta { color: #fff; }
.tag-count .tag-name.tag-lore { color: #282; }

.tag-count .count {
    color: #999;
    font-size: 0.85rem;
    font-weight: normal;
}

.button-box {
  display: flex; /* Enables CSS flexbox */
  justify-content: center; /* Centers horizontally */
  align-items: center; /* Centers vertically */
}

#next-button {
    background: #1f3c67;
    color: #b4c7d9;
    border: 1px solid #2b538e;
    padding: 8px 16px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    font-weight: normal;
    transition: all 0.2s ease;
}

#next-button:hover {
    background: #25477b;
    color: #e9f2fa;
}

#loading, #error {
    text-align: center;
    font-size: 18px;
    padding: 20px;
    background: #152f56;
    border-radius: 0;
    box-shadow: none;
    color: #fff;
}

#error {
    color: #e45f5f;
}

/* Game Mode Selector */
.game-mode-selector {
    margin-bottom: 15px;
}

.game-mode-selector label {
    color: #b4c7d9;
    font-size: 14px;
    margin-right: 10px;
}

.game-mode-selector select {
    background: #1f3c67;
    color: #b4c7d9;
    border: 1px solid #2b538e;
    padding: 6px 12px;
    border-radius: 3px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.game-mode-selector select:hover {
    background: #25477b;
    color: #e9f2fa;
}

.game-mode-selector select:focus {
    outline: none;
    border-color: #3e9e49;
    box-shadow: 0 0 0 2px rgba(62, 158, 73, 0.2);
}

/* Family Feud Styles */
#family-feud-section {
    text-align: center;
}

#feud-question {
    margin-bottom: 30px;
    color: #fff;
    font-size: 24px;
}

.feud-board {
    background: #1f3c67;
    border: 2px solid #2b538e;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 30px;
    min-height: 400px;
}

.feud-answers {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 600px;
    margin: 0 auto;
}

.feud-answer {
    display: flex;
    align-items: center;
    background: #152f56;
    border: 1px solid #2b538e;
    border-radius: 3px;
    padding: 12px 15px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.feud-answer.revealed {
    background: #3e9e49;
    border-color: #4fb85a;
    animation: reveal 0.5s ease-out;
}

.feud-answer.incorrect-answer {
    background: #e45f5f !important;
    border-color: #f07a7a !important;
    animation: reveal-incorrect 0.5s ease-out;
}

@keyframes reveal {
    0% {
        background: #152f56;
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        background: #3e9e49;
        transform: scale(1);
    }
}

@keyframes reveal-incorrect {
    0% {
        background: #152f56;
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        background: #e45f5f;
        transform: scale(1);
    }
}

.feud-rank {
    background: #020f23;
    color: #e9f2fa;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 15px;
    font-size: 14px;
}

.feud-answer.revealed .feud-rank {
    background: #2a7834;
    color: #fff;
}

.feud-answer.incorrect-answer .feud-rank {
    background: #c54545 !important;
    color: #fff !important;
}

.feud-answer-text {
    flex: 1;
    color: #b4c7d9;
    font-weight: bold;
    text-align: left;
    font-size: 18px;
}

.feud-answer.revealed .feud-answer-text {
    color: #fff;
}

.feud-answer.incorrect-answer .feud-answer-text {
    color: #fff !important;
}

.feud-count {
    color: #999;
    font-size: 16px;
    min-width: 60px;
    text-align: right;
}

.feud-answer.revealed .feud-count {
    color: #e9f2fa;
}

.feud-answer.incorrect-answer .feud-count {
    color: #ffe9e9 !important;
}

.feud-input-section {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

#feud-input {
    background: #1f3c67;
    color: #e9f2fa;
    border: 1px solid #2b538e;
    padding: 10px 15px;
    border-radius: 3px;
    font-size: 16px;
    width: 250px;
    transition: all 0.2s ease;
}

#feud-input:focus {
    outline: none;
    border-color: #3e9e49;
    box-shadow: 0 0 0 2px rgba(62, 158, 73, 0.2);
}

#feud-input:disabled {
    background: #0f1f3a;
    color: #666;
    cursor: not-allowed;
}

#feud-submit, #feud-next {
    background: #3e9e49;
    color: #fff;
    border: 1px solid #4fb85a;
    padding: 10px 20px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.2s ease;
}

#feud-submit:hover, #feud-next:hover {
    background: #4fb85a;
    transform: translateY(-1px);
}

#feud-submit:active, #feud-next:active {
    transform: translateY(0);
}

#feud-give-up {
    background: #e45f5f;
    color: #fff;
    border: 1px solid #f07a7a;
    padding: 10px 20px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.2s ease;
}

#feud-give-up:hover {
    background: #f07a7a;
    transform: translateY(-1px);
}

#feud-give-up:active {
    transform: translateY(0);
}

.feud-strikes {
    font-size: 18px;
    font-weight: bold;
}

#feud-strikes-display {
    color: #e45f5f;
}
