/* General styles */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/icon?family=Material+Icons');

:root {
    --color1: #1e90ff;
    /* DodgerBlue */
    --color2: #32cd32;
    /* LimeGreen */
    --color3: #ff1493;
    /* DeepPink */
    --color4: #ff6347;
    /* Tomato */
    --color5: #9370db;
    /* MediumPurple */
    --color6: #ff69b4;
    /* HotPink */
    --color7: #ffa500;
    /* Orange */
    --color8: #ffd700;
    /* Gold */
    --color9: #00ced1;
    /* DarkTurquoise */
    --color10: #8a2be2;
    /* BlueViolet */
    --color11: #6a5acd;
    /* SlateBlue (additional purple) */
    --color12: #db7093;
    /* PaleVioletRed (additional pink) */
}

/* Dark theme styles */
html.dark {
    background-color: #333;
    color: #FFF;
}

html.light {
    background-color: #f0f8ff;
    color: #333;
}

body {
    font-family: 'Roboto', Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    flex-direction: column;
}

#app {
    text-align: center;
    width: 90%;
    max-width: 800px;
    margin-top: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

h1 {
    color: var(--color1);
    margin-bottom: 20px;
}

textarea {
    width: 100%;
}

.report-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #1e90ff;
    margin-top: 10px;
}

.report-link .material-icons {
    margin-right: 5px;
}

.error-message {
    color: red;
    font-size: 14px;
    margin-top: 5px;
}

/* New table styles */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.table th,
.table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

.table th {
    background-color: #f2f2f2;
}


/* Stats table styles */
#statsTable {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

#statsTable th,
#statsTable td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

#statsTable th {
    background-color: #f2f2f2;
}

.category-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.category-tile {
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s;
    margin-bottom: 10px;
    flex: 1 1 calc(25% - 20px);
    box-sizing: border-box;
    color: white;
}

.category-tile:nth-child(10n+1) {
    background-color: var(--color1);
}

.category-tile:nth-child(10n+2) {
    background-color: var(--color2);
}

.category-tile:nth-child(10n+3) {
    background-color: var(--color3);
}

.category-tile:nth-child(10n+4) {
    background-color: var(--color4);
}

.category-tile:nth-child(10n+5) {
    background-color: var(--color5);
}

.category-tile:nth-child(10n+6) {
    background-color: var(--color6);
}

.category-tile:nth-child(10n+7) {
    background-color: var(--color7);
}

.category-tile:nth-child(10n+8) {
    background-color: var(--color8);
}

.category-tile:nth-child(10n+9) {
    background-color: var(--color9);
}

.category-tile:nth-child(10n+10) {
    background-color: var(--color10);
}

.category-tile:hover {
    background-color: white;
    border: 2px solid currentColor; /* Keep this line */
}

/* Explicitly set hover text colors to match initial background colors */
.category-tile:nth-child(10n+1):hover {
    color: var(--color1);
}

.category-tile:nth-child(10n+2):hover {
    color: var(--color2);
}

.category-tile:nth-child(10n+3):hover {
    color: var(--color3);
}

.category-tile:nth-child(10n+4):hover {
    color: var(--color4);
}

.category-tile:nth-child(10n+5):hover {
    color: var(--color5);
}

.category-tile:nth-child(10n+6):hover {
    color: var(--color6);
}

.category-tile:nth-child(10n+7):hover {
    color: var(--color7);
}

.category-tile:nth-child(10n+8):hover {
    color: var(--color8);
}

.category-tile:nth-child(10n+9):hover {
    color: var(--color9);
}

.category-tile:nth-child(10n+10):hover {
    color: var(--color10);
}

.answer-button,
.control-button {
    background-color: var(--color1);
    color: white;
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s;
    border: 2px solid var(--color1);
    margin-bottom: 10px;
}

.answer-button:hover,
.control-button:hover {
    background-color: white;
    color: var(--color1);
    border: 2px solid var(--color1);
}

.answer-button {
    display: block;
    width: 100%;
    max-width: 200px;
    margin: 10px auto;
}

.control-button {
    display: inline-block;
    width: auto;
    margin-right: 10px;
}

#new-question {
    display: none;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: rgba(240, 240, 240, 0.85);
    color: #333;
    margin: 10% auto;
    padding: 20px;
    width: 90%;
    max-width: 800px;
    border-radius: 10px;
}

.modal-content h2 {
    color: var(--color1);
}

.modal-content h3 {
    color: var(--color2);
}

.correct {
    color: green !important;
}

.incorrect {
    color: red !important;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Menu styles */
#menu {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    position: absolute;
    top: 10px;
    right: 10px;
}

#menu .material-icons {
    font-size: 28px;
    /* Increase icon size */
    cursor: pointer;
    color: var(--color1);
    /* Set icon color to blue */
}


.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    /* Position below the icons */
    background-color: white;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1;
    border-radius: 8px;
    overflow: hidden;
}

.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    cursor: pointer;
}

.dropdown-content a:hover {
    background-color: #ddd;
}

/* 
#menu:hover .dropdown-content {
    display: block;
}
    */

/* Add this to ensure tablinks are displayed inline */
.tabs {
    display: flex;
    /* Show tabs on all screens */
}

.tablink-container {
    display: flex;
    justify-content: space-between;
    background-color: #f1f1f1;
    padding: 0;
    margin: 0;
    border-bottom: 2px solid #ddd;
    /* Add bottom border to tab container */
}

.tablink {
    background-color: inherit;
    color: black;
    border: 1px solid #ddd;
    border-bottom: none;
    /* Remove bottom border */
    outline: none;
    cursor: pointer;
    padding: 14px 16px;
    transition: background-color 0.3s;
    font-size: 17px;
    flex: 1;
    /* Make each tab equal width */
    text-align: center;
}

.tablink:hover {
    background-color: #ddd;
}

.tablink.active {
    background-color: #ddd;
}

.tabcontent {
    display: none;
    padding: 6px 12px;
    border-top: none;
}

.tabcontent.active {
    display: block;
    background-color: #fff;
    padding: 20px;
    border: 1px solid #ddd;
    /* Add border to tab content */
    border-top: none;
    /* Remove top border to connect with active tab */
}

#reportMenuContent {
    display: block;
}

@media (max-width: 767px) {
    .category-container {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

@media (min-width: 768px) {
    .category-container {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 10px;
    }

    .question-modal {
        background: url('/static/background.webp') no-repeat center center fixed;
        background-size: cover;
        display: none; /* Initially hidden */
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1; /* Ensure it is behind the modal but above other content */
    }
}




/* Disclaimer styles */
footer {
    width: 100%;
    text-align: center;
    margin-top: 20px;
}

footer p {
    font-size: 14px;
    color: #888;
}

/* Control button styles */
.control-button {
    display: inline-block;
    width: auto;
    margin-right: 10px;
    background-color: #1e90ff;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s;
    border: 2px solid #1e90ff;
}

.control-button:hover {
    background-color: white;
    color: #1e90ff;
    border: 2px solid #1e90ff;
}

.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.toast {
    display: flex;
    flex-direction: column;
    width: 300px;
    margin-top: 10px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.5s, fadeOut 0.5s 19.5s;
    opacity: 0;
    transition: opacity 0.5s;
}

.toast.show {
    opacity: 1;
}

.toast .toast-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    border-radius: 5px 5px 0 0;
    color: white;
}

.toast .toast-title {
    font-weight: bold;
    margin: 0;
}

.toast .toast-message {
    padding: 10px 20px;
    margin: 0;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 0 0 5px 5px;
}

.toast .close {
    cursor: pointer;
    font-size: 18px;
}

.toast-success .toast-title-bar {
    background-color: green;
    border: 2px solid green;
}

.toast-error .toast-title-bar {
    background-color: red;
    border: 2px solid red;
}

.toast-warning .toast-title-bar {
    background-color: yellow;
    border: 2px solid yellow;
    color: black;
}

.toast-info .toast-title-bar {
    background-color: blue;
    border: 2px solid blue;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}


.feedback-icons {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

.feedback-icons .material-icons {
    cursor: pointer;
    margin-left: 10px;
    font-size: 24px;
    color: #1e90ff;
    transition: color 0.3s;
}

.feedback-icons .material-icons:hover {
    color: #333;
}

.save-container {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.save-container input {
    flex: 1;
    padding: 5px;
    margin-right: 10px;
}

.copy-icon {
    cursor: pointer;
    font-size: 24px;
    color: #1e90ff;
    transition: color 0.3s;
}

.copy-icon:hover {
    color: #333;
}

#loadSaveInput {
    width: 100%;
    height: 100px;
    margin-bottom: 10px;
}




.loading-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 9999;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.loading-text {
    font-size: 24px;
    margin-bottom: 20px;
    color: #000;
}

.stars {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto;
}

.star {
    position: absolute;
    opacity: 0;
    animation: starAnimation 1.5s infinite ease-in-out;
}

.star:nth-child(1) {
    top: 10%;
    left: 20%;
    animation-delay: 0.1s;
    color: var(--color1);
}

.star:nth-child(2) {
    top: 20%;
    right: 15%;
    animation-delay: 0.3s;
    color: var(--color2);
}

.star:nth-child(3) {
    bottom: 15%;
    left: 25%;
    animation-delay: 0.5s;
    color: var(--color3);
}

.star:nth-child(4) {
    bottom: 20%;
    right: 20%;
    animation-delay: 0.7s;
    color: var(--color4);
}

.star:nth-child(5) {
    top: 30%;
    left: 40%;
    animation-delay: 0.9s;
    color: var(--color5);
}


@keyframes starAnimation {

    0%,
    100% {
        opacity: 0;
        transform: scale(0.5);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

.rating-circle {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #1e90ff;
    color: white;
    text-align: center;
    line-height: 24px;
    margin: 0 10px;
}


.mode-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.mode-button {
    background-color: var(--color1);
    color: white;
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s;
    border: 2px solid var(--color1);
}

.mode-button:hover {
    background-color: white;
    color: var(--color1);
    border: 2px solid var(--color1);
}

.departure-board {
    font-family: 'Courier New', Courier, monospace;
    display: inline-block;
    overflow: hidden;
    position: relative;
    line-height: 1.2;
    text-align: center;
    font-size: 1em;
    background-color: #333;
    /* Dark grey/black background */
    color: #FFD700;
    /* Yellow text */
    padding: 5px 10px;
    border-radius: 6px;
    /* Rounded corners */
}

.departure-board span {
    display: inline-block;
    position: relative;
    animation: flip 0.5s ease-in-out infinite alternate;
}

@keyframes flip {
    0% {
        transform: rotateX(0deg);
    }

    100% {
        transform: rotateX(90deg);
    }
}