/**
 * Video Vokabeltest Frontend Styles
 *
 * @package Video Vokabeltest
 * @copyright DFXnetwork.org, Christian Kwoll, 2025
 * @license GPL v2 or later
 */

.video-vokabeltest-container,
.video-vokabeltraining-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Benutzerinformationen */
.vokabeltest-user-info,
.vokabeltraining-user-info {
    margin-bottom: 15px;
    padding: 10px;
    background-color: #e8f5e9;
    border-radius: 4px;
    border-left: 3px solid #4CAF50;
}

.vokabeltest-user-info.not-logged-in,
.vokabeltraining-user-info.not-logged-in {
    background-color: #fff3e0;
    border-left: 3px solid #ff9800;
}

.vokabeltest-progress {
    margin-bottom: 20px;
}

.progress-text {
    text-align: center;
    margin-bottom: 5px;
    font-weight: bold;
}

.progress-bar {
    height: 10px;
    background-color: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #4CAF50;
    transition: width 0.3s ease;
}

.vokabeltest-score {
    text-align: right;
    margin-bottom: 20px;
    font-weight: bold;
}

.vokabeltest-question {
    display: none;
}

.vokabeltest-question.active {
    display: block;
}

.question-number {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

.video-container {
    margin-bottom: 20px;
    background-color: #000;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.video-container video {
    display: block;
    max-width: 100%;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.video-container::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
}

.question-form {
    background-color: #fff;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.answer-input,
.practice-answer-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.hint-container {
    margin-bottom: 15px;
}

.hint-button {
    background-color: #f0f0f0;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.hint-button:hover {
    background-color: #e0e0e0;
}

.hint-text {
    margin-top: 10px;
    padding: 10px;
    background-color: #fffde7;
    border-left: 3px solid #ffd600;
    border-radius: 0 4px 4px 0;
}

.answer-feedback,
.practice-feedback {
    margin: 15px 0;
    padding: 10px;
    border-radius: 4px;
}

.answer-feedback.correct,
.practice-feedback.correct {
    background-color: #e8f5e9;
    border-left: 3px solid #4CAF50;
    color: #2e7d32;
}

.answer-feedback.incorrect,
.practice-feedback.incorrect {
    background-color: #ffebee;
    border-left: 3px solid #f44336;
    color: #c62828;
}

.question-actions,
.practice-actions {
    display: flex;
    gap: 10px;
}

.question-actions button,
.practice-actions button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
}

.check-answer-button,
.check-practice-button {
    background-color: #2196F3;
    color: white;
}

.check-answer-button:hover,
.check-practice-button:hover {
    background-color: #1976D2;
}

.next-question-button {
    background-color: #4CAF50;
    color: white;
}

.next-question-button:hover {
    background-color: #388E3C;
}

.vokabeltest-results {
    text-align: center;
    padding: 30px;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.vokabeltest-results h2 {
    color: #333;
    margin-bottom: 20px;
}

.user-result-info {
    margin-bottom: 15px;
    padding: 10px;
    background-color: #e3f2fd;
    border-radius: 4px;
    display: inline-block;
}

.results-summary {
    font-size: 18px;
    margin-bottom: 30px;
}

.restart-test-button {
    background-color: #673AB7;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
}

.restart-test-button:hover {
    background-color: #5E35B1;
}

/* Trainingsmodus Styles */
.vokabeltraining-header {
    margin-bottom: 20px;
}

.vokabeltraining-header h2 {
    margin-top: 0;
    margin-bottom: 15px;
}

.vokabeltraining-controls {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.vokabeltraining-controls button {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    background-color: #f0f0f0;
}

.vokabeltraining-controls button:hover {
    background-color: #e0e0e0;
}

.vokabeltraining-list {
    margin-top: 20px;
}

.vokabeltraining-item {
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.vokabeltraining-item-header {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background-color: #f5f5f5;
    cursor: pointer;
}

.vokabel-number {
    font-weight: bold;
    margin-right: 10px;
    min-width: 30px;
}

.vokabel-word {
    flex-grow: 1;
    font-weight: bold;
}

.toggle-video-button {
    background-color: #e0e0e0;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.toggle-video-button:hover {
    background-color: #d0d0d0;
}

.vokabeltraining-item-content {
    padding: 15px;
    background-color: #fff;
}

.training-actions {
    margin-top: 15px;
}

.practice-button {
    background-color: #2196F3;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.practice-button:hover {
    background-color: #1976D2;
}

/* Modal für Übungsmodus */
.vokabeltraining-practice-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.practice-modal-content {
    position: relative;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.close-modal:hover {
    color: #000;
}

.practice-modal-content h3 {
    margin-top: 0;
    margin-bottom: 15px;
}

.practice-video-container {
    margin-bottom: 20px;
    background-color: #000;
    border-radius: 4px;
    overflow: hidden;
}

.practice-form {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
}

.practice-hint-container {
    margin: 15px 0;
    padding: 10px;
    background-color: #fffde7;
    border-left: 3px solid #ffd600;
    border-radius: 0 4px 4px 0;
}

.show-hint-button,
.show-answer-button {
    background-color: #ff9800;
    color: white;
}

.show-hint-button:hover,
.show-answer-button:hover {
    background-color: #f57c00;
}

/* Highscore Widget Styles */
.vokabeltest-highscore-widget {
    margin-bottom: 20px;
}

.vokabeltest-highscore-widget .no-highscores {
    font-style: italic;
    color: #666;
}

.vokabeltest-highscore-widget .highscore-list {
    margin: 0;
    padding: 0;
    list-style-position: inside;
}

.vokabeltest-highscore-widget .highscore-item {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vokabeltest-highscore-widget .highscore-item:last-child {
    border-bottom: none;
}

.vokabeltest-highscore-widget .user-name {
    font-weight: bold;
    margin-right: 10px;
}

.vokabeltest-highscore-widget .user-score {
    color: #4CAF50;
    font-size: 0.9em;
}

/* Highscore Shortcode Styles */
.video-vokabeltest-highscore {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.video-vokabeltest-highscore .highscore-title {
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
    color: #333;
}

.video-vokabeltest-highscore .no-highscores {
    text-align: center;
    font-style: italic;
    color: #666;
}

.video-vokabeltest-highscore .highscore-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.video-vokabeltest-highscore .highscore-table th,
.video-vokabeltest-highscore .highscore-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.video-vokabeltest-highscore .highscore-table th {
    background-color: #f5f5f5;
    font-weight: bold;
}

.video-vokabeltest-highscore .highscore-table .rank-column {
    width: 60px;
    text-align: center;
}

.video-vokabeltest-highscore .highscore-table .score-column,
.video-vokabeltest-highscore .highscore-table .percentage-column {
    width: 120px;
    text-align: center;
}

.video-vokabeltest-highscore .highscore-row.top-rank {
    font-weight: bold;
}

.video-vokabeltest-highscore .highscore-row.rank-1 {
    background-color: rgba(255, 215, 0, 0.1); /* Gold */
}

.video-vokabeltest-highscore .highscore-row.rank-2 {
    background-color: rgba(192, 192, 192, 0.1); /* Silber */
}

.video-vokabeltest-highscore .highscore-row.rank-3 {
    background-color: rgba(205, 127, 50, 0.1); /* Bronze */
}

/* Responsive Anpassungen */
@media (max-width: 600px) {
    .video-vokabeltest-container,
    .video-vokabeltraining-container,
    .video-vokabeltest-highscore {
        padding: 15px;
    }
    
    .question-form,
    .practice-form {
        padding: 15px;
    }
    
    .question-actions,
    .practice-actions,
    .vokabeltraining-controls {
        flex-direction: column;
    }
    
    .question-actions button,
    .practice-actions button,
    .vokabeltraining-controls button {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .vokabeltraining-item-header {
        flex-wrap: wrap;
    }
    
    .toggle-video-button {
        margin-top: 5px;
        width: 100%;
    }
    
    .video-vokabeltest-highscore .highscore-table {
        font-size: 14px;
    }
    
    .video-vokabeltest-highscore .highscore-table th,
    .video-vokabeltest-highscore .highscore-table td {
        padding: 8px 5px;
    }
    
    .video-vokabeltest-highscore .highscore-table .rank-column {
        width: 40px;
    }
    
    .video-vokabeltest-highscore .highscore-table .score-column,
    .video-vokabeltest-highscore .highscore-table .percentage-column {
        width: 80px;
    }
}

/* Testeinrichtung */
.vokabeltest-setup {
    background-color: #fff;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.vokabeltest-setup h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
}

.vokabeltest-options {
    margin-top: 20px;
}

.vokabeltest-options .form-group {
    margin-bottom: 15px;
}

.vokabeltest-options label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.vokabeltest-options select {
    width: 100%;
    max-width: 300px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.start-test-button {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    margin-top: 10px;
}

.start-test-button:hover {
    background-color: #388E3C;
}

.question-category {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    background-color: #f0f0f0;
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
}

.vokabel-category {
    font-size: 12px;
    color: #666;
    background-color: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 10px;
}

.vokabeltraining-filter {
    margin: 15px 0;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.vokabeltraining-filter form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.vokabeltraining-filter label {
    margin-right: 5px;
    font-weight: bold;
}

.vokabeltraining-filter select {
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Suchfunktion */
.vokabeltraining-search {
    margin: 15px 0;
}

.search-input-container {
    display: flex;
    align-items: center;
    max-width: 600px;
    position: relative;
}

#vokabel-search {
    flex-grow: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 16px;
}

.search-button {
    padding: 8px 15px;
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 16px;
}

.search-button:hover {
    background-color: #1976D2;
}

.clear-search-button {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: #999;
    cursor: pointer;
    text-decoration: none;
}

.clear-search-button:hover {
    color: #666;
}

/* Alphabetische Schnellauswahl */
.alphabet-filter {
    margin: 15px 0;
    background-color: #f9f9f9;
    padding: 10px;
    border-radius: 4px;
}

.alphabet-label {
    margin-bottom: 8px;
    font-weight: bold;
}

.alphabet-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.letter-button {
    display: inline-block;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    background-color: #f0f0f0;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
}

.letter-button.active {
    background-color: #2196F3;
    color: white;
}

.letter-button:hover:not(.active) {
    background-color: #e0e0e0;
}

.letter-button:first-child {
    width: auto;
    padding: 0 10px;
}

/* Sortierung */
.vokabeltraining-sort {
    margin: 15px 0;
    display: flex;
    align-items: center;
}

.vokabeltraining-sort form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.vokabeltraining-sort label {
    font-weight: bold;
}

.vokabeltraining-sort select {
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Aktive Filter */
.active-filters {
    margin: 15px 0;
    padding: 10px;
    background-color: #e8f5e9;
    border-radius: 4px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.active-filters span {
    font-weight: bold;
}

.clear-all-filters {
    margin-left: auto;
    padding: 4px 8px;
    background-color: #f44336;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
}

.clear-all-filters:hover {
    background-color: #d32f2f;
}

.no-vokabeln-message {
    padding: 20px;
    background-color: #fff3e0;
    border-left: 3px solid #ff9800;
    margin: 20px 0;
}

/* Detaillierte Auswertung */
.results-details {
    margin-top: 30px;
    margin-bottom: 30px;
}

.results-details h3 {
    margin-bottom: 15px;
    color: #333;
}

.results-table-container {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    margin-bottom: 20px;
}

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

.results-table th {
    background-color: #f5f5f5;
    font-weight: bold;
}

.results-table tr.correct-answer {
    background-color: rgba(0, 128, 0, 0.1);
}

.results-table tr.incorrect-answer {
    background-color: rgba(255, 0, 0, 0.1);
}

.results-table .incorrect-text {
    color: #d32f2f;
    text-decoration: line-through;
    font-weight: bold;
}

.results-table tr:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

@media (max-width: 600px) {
    .results-table {
        font-size: 14px;
    }
    
    .results-table th,
    .results-table td {
        padding: 8px 5px;
    }
    
    .results-table-container {
        max-height: 300px;
    }
}

/* Video-Schutz */
video::-webkit-media-controls-enclosure {
    overflow: hidden;
}

video::-webkit-media-controls-panel {
    width: calc(100% + 30px);
}

video::-internal-media-controls-download-button {
    display: none;
}

video::-webkit-media-controls-download-button {
    display: none;
}

/* Ergebnistabelle */
.results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    margin-bottom: 20px;
}

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

.results-table th {
    background-color: #f5f5f5;
    font-weight: bold;
}

.results-table tr.correct-answer {
    background-color: rgba(0, 128, 0, 0.1);
}

.results-table tr.incorrect-answer {
    background-color: rgba(255, 0, 0, 0.1);
}

.results-table .incorrect-text {
    color: #d32f2f;
    text-decoration: line-through;
    font-weight: bold;
}

.show-video-button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
}

.show-video-button:hover {
    background-color: #45a049;
}

/* Video-Popup */
.vokabeltest-video-popup {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
}

.video-popup-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 800px;
    border-radius: 5px;
    position: relative;
}

.close-video-popup {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 15px;
    top: 10px;
}

.close-video-popup:hover,
.close-video-popup:focus {
    color: black;
    text-decoration: none;
}

.video-popup-title {
    margin-top: 0;
    margin-bottom: 15px;
    padding-right: 30px;
}

.video-popup-container {
    width: 100%;
    margin-bottom: 10px;
}

/* Responsive Anpassungen */
@media screen and (max-width: 768px) {
    .results-table {
        font-size: 14px;
    }
    
    .results-table th,
    .results-table td {
        padding: 8px 5px;
    }
    
    .video-popup-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .show-video-button {
        padding: 4px 8px;
        font-size: 12px;
    }
} 