body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: background-color 0.3s, color 0.3s;
}


.light-mode {
    background-color: #f0f0f0;
    color: #333;
}

.dark-mode {
    background-color: #121212;
    color: #f0f0f0;
}

.dark-mode .auto-active {
    border-color: #45a049;
}

.dark-mode .paused-active {
    border-color: #a04545;
}

.game-container {
    width: 100%;
    max-width: 500px;
    position: relative;

    margin: 20px 0;
}

#gameCanvas {
    width: 100%;
    border: 2px solid;
    height: auto;
    display: block;
    margin: 0 auto;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px;
    /*width: 100%;*/
    /*max-width: 500px;*/
}

.input-group {
    display: flex;
    gap: 10px;
}

input, button {
    padding: 8px 12px;
    background-color: var(--bg-color, #ccc);
    color: var(--text-color, #121212);
    border-radius: 4px;
    border: 1px solid var(--border-color, #ccc);
}


button {
    cursor: pointer;
}

.dark-mode input:hover, .dark-mode button:hover {
    /*
    background-color: rgba(51, 51, 51, 0.75);
    color: #f0f0f0;
    */
    background-color: var(--bg-color-hover, #3a0303);
    color: var(--text-color-hover, #121212);

}

#qrInput {
    flex: 1;
}

h1 {
    text-align: center;
    /*margin-bottom: 10px;*/
}

.score-display {
    margin: 10px 0;
    font-size: 1.2em;
    font-weight: bold;
}

.custom-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    text-align: center;

    background-color: var(--bg-color, #121212);
    border-radius: 8px;
    border: 2px solid var(--border-color, #fff);
    min-width: 300px;
}

.dark-mode .custom-dialog {
    background: #333;
    color: #f0f0f0;
}


.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.instructions {
    margin-top: 20px;
    text-align: center;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.dark-mode .instructions {
    background-color: rgba(255, 255, 255, 0.1);
}

#togglePauseBtn {
    min-width: 100px;
}


.custom-dialog h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--text-color, #fff);

}

.dialog-input {

    padding: 8px;
    margin-bottom: 15px;
    box-sizing: border-box;
    background-color: var(--bg-input-color, #121212);
    width: 100%;
    min-width: 400px;
}

.dialog-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.dialog-buttons button {
    padding: 8px 16px;
    cursor: pointer;
}


/* Light mode styles */
.light-mode {
    --text-color: #121212;
    --bg-color: #ccc;
    --border-color: #000000;
    --bg-input-color: #ffffffa1;

    --text-color-hover: #2c2c2c;
    --bg-color-hover: rgba(110, 108, 108, 0.75);

}

/* Dark mode styles */
.dark-mode {
    --text-color: #f0f0f0;
    --bg-color: #333;
    --border-color: #a19d9d;
    --bg-input-color: #555555;

    --text-color-hover: #f0f0f0;
    --bg-color-hover: rgba(110, 108, 108, 0.75);
}
