/* General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f4f4f9;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 800px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin: 20px;
    text-align: center; /* Center all text */
}

/* Selection Screen */
.selection-screen {
    padding: 30px;
}

.selection-screen h1 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #333;
}

.difficulty-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.difficulty-button {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background-color: #f8f9fa;
    border: 1px solid #ccc;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    justify-content: center; /* Center button content */
}

.difficulty-button:hover {
    background-color: #e2e6ea;
    transform: translateY(-2px);
}

.difficulty-button input {
    display: none;
}

.checkmark {
    width: 16px;
    height: 16px;
    border: 2px solid #007bff;
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    transition: background-color 0.3s ease;
}

.difficulty-button input:checked + .checkmark {
    background-color: #007bff;
}

.difficulty-button input:checked + .checkmark::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Custom Options */
#custom-options {
    margin-top: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 1rem;
    margin-bottom: 8px;
    color: #555;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    background: #f9f9f9;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: #007bff;
    outline: none;
}

.btn-primary {
    background-color: #007bff;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-primary:hover {
    background-color: #0056b3;
}

/* Game Screen */
.game-screen {
    padding: 30px;
    position: relative;
}

.btn-home {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: #6c757d;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-home:hover {
    background-color: #5a6268;
}

.game-content {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center; /* Center all content horizontally */
}

.paragraph {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #333;
    line-height: 1.6;
    text-align: center; /* Center paragraph text */
}

.choices {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    margin-bottom: 20px;
}

.choice {
    background-color: #f8f9fa;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 12px 24px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-right: 5px;
}

.choice:hover {
    background-color: #e2e6ea;
    transform: translateY(-2px);
}

.result {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center; /* Center result text */
}

.stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.stats p {
    font-size: 1.1rem;
    color: #555;
}

.btn-next {
    background-color: #28a745;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-next:hover {
    background-color: #218838;
}

/* Question Counter */
.question-counter {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

/* Responsive Design */
@media (max-width: 600px) {
    .container {
        margin: 10px;
        border-radius: 8px;
    }

    .selection-screen, .game-screen {
        padding: 20px;
    }

    .selection-screen h1 {
        font-size: 1.5rem;
    }

    .paragraph {
        font-size: 1rem;
    }

    .choice {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .btn-primary, .btn-next {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .btn-home {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

.language-select {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px; /* spacing between label and dropdown */
  margin-bottom: 20px;
  flex-wrap: nowrap; /* prevents wrapping to two lines */
}

.language-select label {
  font-weight: 600;
  font-size: 1rem;
  white-space: nowrap; /* keeps label on one line */
}

.language-select select {
  width: 140px; /* narrower dropdown */
  padding: 6px 8px;
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  text-align: center;
}
