/* Components CSS - Specific component styles */

/* Word display components */
.correct-word-display {
    font-size: 2.5em;
    font-weight: bold;
    color: #90EE90;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    background-color: rgba(144, 238, 144, 0.2);
    border: 3px solid #90EE90;
    border-radius: 10px;
    padding: 15px 25px;
    margin: 20px 0;
    letter-spacing: 2px;
    animation: glow 2s ease-in-out infinite alternate;
}

.user-answer-display {
    font-size: 1.8em;
    font-weight: bold;
    color: #FFB6C1;
    background-color: rgba(255, 182, 193, 0.2);
    border: 2px solid #FFB6C1;
    border-radius: 8px;
    padding: 10px 20px;
    margin: 10px 0;
    letter-spacing: 2px;
}

.comparison-section {
    margin: 20px 0;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.correct-feedback {
    margin: 20px 0;
    padding: 15px;
    background-color: rgba(144, 238, 144, 0.2);
    border-radius: 10px;
    border: 2px solid #90EE90;
    animation: correctGlow 2s ease-in-out infinite alternate;
}

/* Word description */
.word-description {
    font-size: 1.3em;
    margin: 15px 0;
    font-style: italic;
    color: #E6E6FA;
    line-height: 1.4;
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 15px;
}

.word-description strong {
    color: #FFD700;
    display: block;
    margin-bottom: 8px;
}

/* Example sentence */
.example-sentence {
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 15px;
    margin: 10px 0;
    font-size: 1.1em;
    line-height: 1.4;
    color: white;
}

.example-sentence strong {
    color: #90EE90;
    display: block;
    margin-bottom: 8px;
}

/* Level selection */
.level-selection {
    display: none;
    margin: 30px 0;
}

.level-title {
    font-size: 1.5em;
    margin-bottom: 20px;
    color: white;
}

.level-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.level-option {
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid white;
    border-radius: 10px;
    padding: 15px 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 300px;
    text-align: center;
}

.level-option:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.level-option.selected {
    background-color: #8A2BE2;
    border-color: #90EE90;
}

.level-name {
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 5px;
}

.level-description {
    font-size: 1em;
    opacity: 0.9;
}

/* Nightmare level special styling */
.level-nightmare {
    background-color: rgba(139, 0, 0, 0.3) !important;
    border-color: #FF4444 !important;
    color: #FF6666 !important;
}

.level-nightmare:hover {
    background-color: rgba(139, 0, 0, 0.5) !important;
    border-color: #FF6666 !important;
    color: #FFAAAA !important;
}

.level-nightmare.selected {
    background-color: #8B0000 !important;
    border-color: #FF0000 !important;
    color: white !important;
}

.level-nightmare .level-name {
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Word count selection */
.word-count-selection {
    display: none;
    margin: 20px 0;
    padding: 20px;
    border: 2px solid white;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.1);
}

.word-count-title {
    font-size: 1.3em;
    margin-bottom: 15px;
    color: white;
}

.word-count-input {
    background-color: rgba(255, 255, 255, 0.9);
    color: purple;
    border: 2px solid white;
    padding: 8px 12px;
    font-size: 1.2em;
    font-family: Verdana, sans-serif;
    border-radius: 5px;
    text-align: center;
    width: 80px;
    margin: 0 10px;
}

.word-count-input:focus {
    outline: none;
    background-color: white;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.word-count-info {
    font-size: 1em;
    margin-top: 10px;
    opacity: 0.9;
}

/* Feedback button */
.feedback-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    color: purple;
    border: 2px solid purple;
    padding: 10px 15px;
    font-size: 1em;
    font-family: Verdana, sans-serif;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.feedback-button:hover {
    background-color: purple;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.feedback-button:active {
    transform: translateY(0);
}

/* Data Source Selection */
.data-source-selection {
    text-align: center;
    padding: 20px;
}

.source-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 30px 0;
    align-items: center;
}

.source-option {
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid white;
    border-radius: 15px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 400px;
    position: relative;
}

.source-option:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.source-option input[type="radio"] {
    position: absolute;
    top: 15px;
    right: 15px;
    transform: scale(1.5);
    cursor: pointer;
}

.source-option label {
    cursor: pointer;
    display: block;
    padding-right: 40px;
}

.source-option.selected {
    background-color: #8A2BE2;
    border-color: #90EE90;
    box-shadow: 0 0 15px rgba(144, 238, 144, 0.3);
}

.source-title {
    font-size: 1.4em;
    font-weight: bold;
    margin-bottom: 8px;
    color: white;
}

.source-description {
    font-size: 1em;
    opacity: 0.9;
    color: white;
}

/* Google Sheets Input */
.google-sheets-input {
    margin: 20px 0;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.input-section label {
    display: block;
    font-size: 1.2em;
    margin-bottom: 10px;
    color: white;
    font-weight: bold;
}

.sheets-url-input {
    width: 100%;
    max-width: 500px;
    padding: 12px 15px;
    font-size: 1em;
    border: 2px solid white;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.9);
    color: purple;
    font-family: Verdana, sans-serif;
    margin-bottom: 10px;
}

.sheets-url-input:focus {
    outline: none;
    background-color: white;
    box-shadow: 0 0 10px rgba(144, 238, 144, 0.5);
    border-color: #90EE90;
}

.url-help {
    font-size: 0.9em;
    color: #E6E6FA;
    line-height: 1.4;
    text-align: left;
    background-color: rgba(0, 0, 0, 0.2);
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
}

/* Data Input Section */
.data-input-section {
    margin: 20px 0;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.data-input {
    width: 100%;
    max-width: 500px;
    padding: 12px 15px;
    font-size: 1em;
    border: 2px solid white;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.9);
    color: purple;
    font-family: Verdana, sans-serif;
    margin-bottom: 10px;
}

.data-input:focus {
    outline: none;
    background-color: white;
    box-shadow: 0 0 10px rgba(144, 238, 144, 0.5);
    border-color: #90EE90;
}

.file-input {
    width: 100%;
    max-width: 400px;
    padding: 12px 15px;
    font-size: 1em;
    border: 2px solid white;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.9);
    color: purple;
    font-family: Verdana, sans-serif;
    margin-bottom: 10px;
    cursor: pointer;
}

.file-input:focus {
    outline: none;
    background-color: white;
    box-shadow: 0 0 10px rgba(144, 238, 144, 0.5);
    border-color: #90EE90;
}

.file-input::file-selector-button {
    background-color: rgba(144, 238, 144, 0.3);
    border: 1px solid #90EE90;
    border-radius: 5px;
    color: #FFFFFF;
    padding: 8px 12px;
    margin-right: 10px;
    cursor: pointer;
}

.file-input::file-selector-button:hover {
    background-color: rgba(144, 238, 144, 0.5);
}

.input-help {
    font-size: 0.9em;
    color: #E6E6FA;
    line-height: 1.4;
    text-align: left;
    background-color: rgba(0, 0, 0, 0.2);
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
}

/* Word Filters */
.word-filters {
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    text-align: left;
}

.filter-title {
    font-size: 1.4em;
    font-weight: bold;
    color: white;
    text-align: center;
    margin-bottom: 20px;
}

.filter-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-label {
    font-size: 1.1em;
    font-weight: bold;
    color: white;
}

.date-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.date-input {
    background-color: rgba(255, 255, 255, 0.9);
    color: purple;
    border: 2px solid white;
    padding: 8px 12px;
    font-size: 1em;
    border-radius: 5px;
    font-family: Verdana, sans-serif;
}

.date-input:focus {
    outline: none;
    background-color: white;
    box-shadow: 0 0 5px rgba(144, 238, 144, 0.5);
    border-color: #90EE90;
}

.date-separator {
    color: white;
    font-weight: bold;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-height: 120px;
    overflow-y: auto;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    padding: 5px 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    font-size: 0.9em;
    white-space: nowrap;
}

.filter-checkbox:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.filter-checkbox input[type="checkbox"] {
    margin-right: 5px;
    transform: scale(1.2);
}

.filter-checkbox input[type="checkbox"]:checked + span {
    font-weight: bold;
}

.filter-actions {
    text-align: center;
    margin-top: 15px;
}

.filter-button {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid white;
    padding: 8px 15px;
    font-size: 1em;
    font-family: Verdana, sans-serif;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

/* Back Button */
.back-button {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.9);
    color: purple;
    border: 2px solid purple;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5em;
    font-weight: bold;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.back-button:hover {
    background-color: purple;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.back-button:active {
    transform: scale(0.95);
}

/* Confirmation Dialog */
.confirmation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.confirmation-dialog {
    background-color: purple;
    color: white;
    border: 3px solid white;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.confirmation-title {
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 15px;
    color: white;
}

.confirmation-message {
    font-size: 1.1em;
    margin-bottom: 25px;
    line-height: 1.4;
    color: #E6E6FA;
}

.confirmation-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.confirmation-button {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid white;
    padding: 12px 25px;
    font-size: 1.1em;
    font-family: Verdana, sans-serif;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
}

.confirmation-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.confirmation-button.selected {
    background-color: #8A2BE2;
    border-color: #90EE90;
    box-shadow: 0 0 10px rgba(144, 238, 144, 0.5);
}

.confirmation-button.yes-button.selected {
    background-color: #FF4444;
    border-color: #FF6666;
    box-shadow: 0 0 10px rgba(255, 68, 68, 0.5);
}

.confirmation-instructions {
    font-size: 0.9em;
    margin-top: 15px;
    opacity: 0.8;
    color: #E6E6FA;
}

/* Timeout Selection */
.timeout-selection {
    margin: 20px 0;
    padding: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    text-align: center;
}

.timeout-title {
    font-size: 1.3em;
    margin-bottom: 15px;
    color: white;
    font-weight: bold;
}

.timeout-input-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 15px 0;
}

.timeout-input {
    background-color: rgba(255, 255, 255, 0.9);
    color: purple;
    border: 2px solid white;
    padding: 8px 12px;
    font-size: 1.2em;
    border-radius: 5px;
    text-align: center;
    width: 80px;
    font-family: Verdana, sans-serif;
    font-weight: bold;
}

.timeout-input:focus {
    outline: none;
    background-color: white;
    box-shadow: 0 0 10px rgba(144, 238, 144, 0.5);
    border-color: #90EE90;
}

.timeout-input.invalid {
    border-color: #FF4444;
    background-color: rgba(255, 68, 68, 0.1);
    animation: shake 0.5s ease-in-out;
}

.timeout-unit {
    font-size: 1.1em;
    color: white;
    font-weight: bold;
}

.timeout-help {
    font-size: 0.9em;
    color: #E6E6FA;
    text-align: center;
    margin-top: 8px;
    line-height: 1.4;
}

.timeout-status {
    font-size: 1em;
    margin-top: 10px;
    padding: 8px 15px;
    border-radius: 5px;
    font-weight: bold;
}

.timeout-status.no-limit {
    background-color: rgba(255, 215, 0, 0.2);
    color: #FFD700;
    border: 1px solid #FFD700;
}

.timeout-status.with-limit {
    background-color: rgba(144, 238, 144, 0.2);
    color: #90EE90;
    border: 1px solid #90EE90;
}

/* Timer Display */
.timer-display {
    font-size: 1.5em;
    font-weight: bold;
    margin: 15px 0;
    text-align: center;
}

.timer-normal {
    color: #90EE90;
}

.timer-warning {
    color: #FFD700;
    animation: pulse 1s ease-in-out infinite;
}

.timer-critical {
    color: #FF4444;
    animation: pulse 0.5s ease-in-out infinite;
}

.elapsed-time {
    font-size: 1em;
    color: #E6E6FA;
    margin-top: 5px;
}

/* Timer Option */
.timer-option {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.05);
}

.timer-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 1.1em;
    color: white;
}

.timer-checkbox {
    margin-right: 10px;
    transform: scale(1.3);
    cursor: pointer;
}

.timer-checkbox-text {
    font-weight: bold;
}

.timer-option-help {
    font-size: 0.9em;
    color: #E6E6FA;
    margin-top: 8px;
    margin-left: 25px;
    line-height: 1.3;
}

/* TTS Selection */
.tts-selection {
    margin: 30px 0;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
}

.tts-title {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
    color: #E6E6FA;
}

.tts-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tts-option {
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.tts-option:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.tts-option.selected {
    background-color: rgba(144, 238, 144, 0.3);
    border-color: #90EE90;
    box-shadow: 0 0 15px rgba(144, 238, 144, 0.5);
}

.tts-name {
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 5px;
    color: #FFFFFF;
}

.tts-description {
    font-size: 0.9em;
    color: #E6E6FA;
    opacity: 0.9;
}

/* Simple Timer */
.simple-timer {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: #E6E6FA;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 1em;
    font-family: Verdana, sans-serif;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: none;
    z-index: 500;
}
