@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;700&display=swap');

body {
    font-family: 'Noto Sans KR', Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    background-color: #f0f0f0;
}

.container {
    text-align: center;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

h1 {
    margin-bottom: 20px;
}

.controls {
    margin-bottom: 20px;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(4, 100px);
    grid-template-rows: repeat(3, 100px);
    gap: 10px;
    margin-bottom: 20px;
    width: 430px; /* (100px * 4) + (10px * 3) */
}

.grid-item {
    width: 100px;
    height: 100px;
    background-color: #ddd;
    border: 2px solid #ccc;
    border-radius: 5px;
}

.grid-item.active {
    background-color: #007bff;
}

.progress-container {
    width: 100%;
    background-color: #e9ecef;
    border-radius: 5px;
    margin-bottom: 20px;
    height: 20px;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background-color: #28a745;
    border-radius: 5px;
    transition: width 0.5s ease-in-out;
}

.feedback {
    margin-bottom: 20px;
    min-height: 50px; /* Ensure space is reserved for messages */
}

.hidden {
    display: none;
}

#action-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 0;
    width: 430px; /* Match grid-container width */
    margin: 20px auto;
}

.action-buttons {
    grid-column: 1 / 3;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

#action-container button {
    margin: 0;
    padding: 15px; /* Add some padding back for usability */
    border-radius: 0;
}

#match-btn {
    border-top-left-radius: 10px;
}

#mismatch-btn {
    background-color: #6c757d; /* A neutral gray color */
    border-top-right-radius: 10px;
}

.stop-button {
    grid-column: 1 / 3;
    background-color: #dc3545;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

.stop-button:hover {
    background-color: #c82333;
}

button {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    background-color: #007bff;
    color: white;
}

button:hover {
    background-color: #0056b3;
}

ul {
    list-style-type: none;
    padding: 0;
}

ul li a {
    text-decoration: none;
    color: #007bff;
    font-size: 18px;
}

ul li a:hover {
    text-decoration: underline;
}

/* N-Toggle Switch Styles */
.n-toggle-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.toggle-label {
    font-size: 18px;
    font-weight: bold;
    margin: 0 15px;
    color: #555;
    user-select: none;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #007bff; /* Default to 2-BACK color */
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #28a745; /* Green for 3-BACK */
}

input:checked + .slider:before {
    transform: translateX(26px);
}
