/* ==========================================================================
   Test Mode - Keine sofortige Auswertung
   ========================================================================== */

.test-info {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.test-info-text {
    font-size: var(--font-size-lg);
    color: var(--color-text-muted);
    margin: 0;
}

.test-question {
    padding: var(--spacing-xl) 0;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
}

.test-header {
    margin-bottom: var(--spacing-xl);
}

.test-progress {
    text-align: center;
}

.progress-text {
    display: block;
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-sm);
}

.progress-bar {
    height: 8px;
    background: var(--color-border);
    border-radius: 4px;
    overflow: hidden;
    max-width: 400px;
    margin: 0 auto;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-dark));
    border-radius: 4px;
    transition: width var(--transition-normal);
}

/* Test Card */
.test-card {
    background: var(--color-bg-card);
    border-radius: var(--border-radius-xl);
    padding: var(--spacing-xxl);
    box-shadow: var(--shadow-lg);
    text-align: center;
    margin-bottom: var(--spacing-xl);
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    border-top: 5px solid var(--color-warning);
}

.test-card-lang {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

.test-card-word {
    font-size: var(--font-size-huge);
    font-weight: 700;
    color: var(--color-text);
}

.test-card-plural {
    font-size: var(--font-size-base);
    color: var(--color-text-muted);
    font-style: italic;
    margin-top: var(--spacing-sm);
}

/* Test Form */
.test-form {
    max-width: 400px;
    margin: 0 auto;
}

.test-input-wrapper {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    background: var(--color-bg-card);
    padding: var(--spacing-md);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
}

.test-input {
    flex: 1;
    padding: var(--spacing-md);
    font-size: var(--font-size-lg);
    font-weight: 500;
    border: none;
    background: transparent;
    outline: none;
}

.test-input::placeholder {
    color: var(--color-text-muted);
}

/* Test Result */
.test-result {
    padding: var(--spacing-xl) 0;
    text-align: center;
}

.test-result-header h1 {
    font-size: var(--font-size-huge);
    margin-bottom: var(--spacing-xl);
}

.result-score {
    margin-bottom: var(--spacing-xl);
}

.score-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: var(--color-bg-card);
    box-shadow: var(--shadow-xl);
}

.score-value {
    font-size: var(--font-size-huge);
    font-weight: 800;
}

.score-excellent .score-value { color: var(--color-success); }
.score-good .score-value { color: var(--color-warning); }
.score-practice .score-value { color: var(--color-error); }

/* Result Stats */
.result-stats {
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.result-stat {
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--color-bg-card);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    min-width: 80px;
}

.result-stat-value {
    display: block;
    font-size: var(--font-size-xxl);
    font-weight: 800;
}

.result-stat-label {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

.result-correct .result-stat-value { color: var(--color-success); }
.result-almost .result-stat-value { color: var(--color-warning); }
.result-wrong .result-stat-value { color: var(--color-error); }

.result-time {
    font-size: var(--font-size-lg);
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-xl);
}

/* Result Details */
.result-details {
    max-width: 500px;
    margin: 0 auto var(--spacing-xl);
    text-align: left;
}

.result-details summary {
    cursor: pointer;
    padding: var(--spacing-md);
    background: var(--color-bg-card);
    border-radius: var(--border-radius);
    font-weight: 600;
    text-align: center;
}

.result-list {
    margin-top: var(--spacing-md);
}

.result-item {
    padding: var(--spacing-md);
    background: var(--color-bg-card);
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing-sm);
    border-left: 4px solid;
}

.item-correct { border-color: var(--color-success); }
.item-almost { border-color: var(--color-warning); }
.item-wrong { border-color: var(--color-error); }

.result-question {
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.result-answers {
    display: flex;
    gap: var(--spacing-md);
    font-size: var(--font-size-sm);
}

.your-answer {
    color: var(--color-text-muted);
}

.correct-answer {
    color: var(--color-success);
    font-weight: 600;
}

.correct-answer::before {
    content: '→ ';
}

/* Result Actions */
.result-actions {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    max-width: 300px;
    margin: 0 auto;
}

/* ==========================================================================
   Responsive Test Mode
   ========================================================================== */

/* iPad (768px - 1024px) */
@media (max-width: 1024px) {
    .test-card {
        max-width: 380px;
        padding: var(--spacing-xl);
    }

    .test-form {
        max-width: 380px;
    }

    .score-circle {
        width: 130px;
        height: 130px;
    }

    .result-details {
        max-width: 450px;
    }
}

/* Large phones (600px - 768px) */
@media (max-width: 768px) {
    .test-question {
        padding: var(--spacing-lg) 0;
        min-height: 70vh;
    }

    .test-header {
        margin-bottom: var(--spacing-lg);
    }

    .progress-bar {
        max-width: 300px;
        height: 6px;
    }

    .test-card {
        max-width: 100%;
        padding: var(--spacing-lg);
        border-radius: var(--border-radius-lg);
        margin-bottom: var(--spacing-lg);
        border-top-width: 4px;
    }

    .test-card-word {
        font-size: var(--font-size-xxl);
    }

    .test-form {
        max-width: 100%;
    }

    .test-input-wrapper {
        padding: var(--spacing-sm);
        border-radius: var(--border-radius);
    }

    .test-input {
        padding: var(--spacing-sm);
        font-size: var(--font-size-base);
    }

    .test-result {
        padding: var(--spacing-lg) 0;
    }

    .test-result-header h1 {
        font-size: var(--font-size-xxl);
        margin-bottom: var(--spacing-lg);
    }

    .score-circle {
        width: 120px;
        height: 120px;
    }

    .score-value {
        font-size: var(--font-size-xxl);
    }

    .result-stats {
        gap: var(--spacing-md);
    }

    .result-stat {
        padding: var(--spacing-sm) var(--spacing-md);
        min-width: 70px;
    }

    .result-stat-value {
        font-size: var(--font-size-xl);
    }

    .result-details {
        max-width: 100%;
    }

    .result-actions {
        max-width: 100%;
    }
}

/* Phones (390px - 600px) */
@media (max-width: 600px) {
    .test-question {
        padding: var(--spacing-md) 0;
        min-height: auto;
    }

    .test-header {
        margin-bottom: var(--spacing-md);
    }

    .progress-text {
        font-size: 0.75rem;
    }

    .progress-bar {
        max-width: 250px;
        height: 5px;
    }

    .test-card {
        padding: var(--spacing-md);
        border-radius: var(--border-radius);
        margin-bottom: var(--spacing-md);
        border-top-width: 3px;
    }

    .test-card-lang {
        margin-bottom: var(--spacing-md);
        gap: var(--spacing-xs);
    }

    .test-card-word {
        font-size: var(--font-size-xl);
    }

    .test-card-plural {
        font-size: var(--font-size-sm);
    }

    .test-input-wrapper {
        gap: var(--spacing-sm);
        margin-bottom: var(--spacing-md);
    }

    .test-input {
        font-size: var(--font-size-sm);
    }

    .test-result-header h1 {
        font-size: var(--font-size-xl);
        margin-bottom: var(--spacing-md);
    }

    .result-score {
        margin-bottom: var(--spacing-lg);
    }

    .score-circle {
        width: 100px;
        height: 100px;
    }

    .score-value {
        font-size: var(--font-size-xl);
    }

    .result-stats {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-sm);
        margin-bottom: var(--spacing-lg);
    }

    .result-stat {
        width: 100%;
        max-width: 200px;
        padding: var(--spacing-sm);
        border-radius: var(--border-radius);
    }

    .result-stat-value {
        font-size: var(--font-size-lg);
    }

    .result-stat-label {
        font-size: 0.75rem;
    }

    .result-time {
        font-size: var(--font-size-base);
        margin-bottom: var(--spacing-lg);
    }

    .result-details summary {
        padding: var(--spacing-sm);
        font-size: var(--font-size-sm);
        border-radius: var(--border-radius-sm);
    }

    .result-item {
        padding: var(--spacing-sm);
        border-radius: var(--border-radius-sm);
        border-left-width: 3px;
    }

    .result-question {
        font-size: var(--font-size-sm);
    }

    .result-answers {
        flex-direction: column;
        gap: var(--spacing-xs);
        font-size: 0.75rem;
    }

    .result-actions {
        gap: var(--spacing-sm);
    }
}

/* iPhone 12 mini (375px) */
@media (max-width: 390px) {
    .test-question {
        padding: var(--spacing-sm) 0;
    }

    .progress-bar {
        max-width: 200px;
        height: 4px;
    }

    .test-card {
        padding: var(--spacing-sm);
        border-radius: var(--border-radius-sm);
    }

    .test-card-word {
        font-size: var(--font-size-lg);
    }

    .test-card-plural {
        font-size: 0.75rem;
        margin-top: var(--spacing-xs);
    }

    .test-input-wrapper {
        padding: var(--spacing-xs);
        border-radius: var(--border-radius-sm);
    }

    .test-input {
        padding: var(--spacing-xs);
        font-size: 0.85rem;
    }

    .test-result-header h1 {
        font-size: var(--font-size-lg);
    }

    .score-circle {
        width: 80px;
        height: 80px;
    }

    .score-value {
        font-size: var(--font-size-lg);
    }

    .result-stat {
        max-width: 180px;
    }

    .result-stat-value {
        font-size: var(--font-size-base);
    }

    .result-time {
        font-size: var(--font-size-sm);
    }

    .result-item {
        padding: var(--spacing-xs);
    }

    .result-question {
        font-size: 0.8rem;
    }

    .result-answers {
        font-size: 0.7rem;
    }
}

/* ==========================================================================
   Level Test Specific Styles
   ========================================================================== */

.level-test-info {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.level-transition {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-lg);
    padding: var(--spacing-lg);
    background: var(--color-bg-card);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow);
}

.level-from,
.level-to {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
}

.level-badge-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    font-size: var(--font-size-lg);
    font-weight: 800;
}

.level-badge-small.level-next {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.level-name {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

.level-arrow {
    font-size: var(--font-size-xxl);
    color: var(--color-text-muted);
}

.level-test-requirements {
    max-width: 500px;
    margin: 0 auto var(--spacing-xl);
    text-align: left;
}

.level-test-requirements h2 {
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.requirements-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.requirements-list li {
    padding: var(--spacing-md);
    background: var(--color-bg-card);
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing-sm);
    border-left: 4px solid;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.requirements-list li.fulfilled {
    border-color: var(--color-success);
}

.requirements-list li.not-fulfilled {
    border-color: var(--color-warning);
}

.requirement-status {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

.level-test-details {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.test-details-text {
    color: var(--color-text-muted);
}

.level-test-form {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.level-test-blocked {
    text-align: center;
    padding: var(--spacing-xl);
    background: var(--color-bg-card);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow);
    margin-bottom: var(--spacing-xl);
}

.level-test-blocked p {
    margin-bottom: var(--spacing-md);
    color: var(--color-text-muted);
}

/* Mastery Progress */
.mastery-progress {
    max-width: 500px;
    margin: 0 auto var(--spacing-xl);
    text-align: center;
}

.mastery-progress h3 {
    font-size: var(--font-size-base);
    margin-bottom: var(--spacing-md);
    color: var(--color-text-muted);
}

.mastery-bar {
    height: 20px;
    background: var(--color-border);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: var(--spacing-sm);
}

.mastery-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 10px;
    transition: width var(--transition-normal);
}

.mastery-text {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

.level-test-back {
    text-align: center;
}

/* Level Test Container */
.test-container {
    padding: var(--spacing-xl) 0;
}

.test-progress-text {
    display: block;
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-sm);
    text-align: center;
}

.test-progress-bar {
    height: 8px;
    background: var(--color-border);
    border-radius: 4px;
    overflow: hidden;
    max-width: 400px;
    margin: 0 auto;
}

.test-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-dark));
    border-radius: 4px;
    transition: width var(--transition-normal);
}

.test-question-card {
    background: var(--color-bg-card);
    border-radius: var(--border-radius-xl);
    padding: var(--spacing-xxl);
    box-shadow: var(--shadow-lg);
    text-align: center;
    margin: var(--spacing-xl) auto;
    max-width: 400px;
    border-top: 5px solid var(--color-primary);
}

.question-lang {
    margin-bottom: var(--spacing-lg);
}

.question-word {
    font-size: var(--font-size-huge);
    font-weight: 700;
    color: var(--color-text);
}

.question-plural {
    font-size: var(--font-size-base);
    color: var(--color-text-muted);
    font-style: italic;
}

.test-answer-form {
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
}

.answer-input-container {
    margin-bottom: var(--spacing-lg);
}

.test-answer-input {
    width: 100%;
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: var(--font-size-lg);
    font-weight: 500;
    text-align: center;
    border: 3px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    background: var(--color-bg-card);
    box-shadow: var(--shadow);
    transition: all var(--transition-fast);
}

.test-answer-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: var(--shadow-lg), 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* Level Test Result */
.level-up-celebration {
    padding: var(--spacing-xxl);
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-radius: var(--border-radius-xl);
    color: white;
    margin-bottom: var(--spacing-xl);
    animation: celebrationPulse 2s ease-in-out infinite;
}

@keyframes celebrationPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    50% { box-shadow: 0 0 0 20px rgba(34, 197, 94, 0); }
}

.celebration-icon {
    font-size: 5rem;
    margin-bottom: var(--spacing-lg);
    animation: bounceIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.celebration-title {
    font-size: var(--font-size-huge);
    margin-bottom: var(--spacing-lg);
}

.level-transition-result {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.level-badge-result {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: var(--font-size-xl);
    font-weight: 800;
}

.level-old {
    background: rgba(255, 255, 255, 0.3);
}

.level-new {
    background: white;
    color: var(--color-success);
    animation: levelUpBounce 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.3s both;
}

@keyframes levelUpBounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.level-arrow-result {
    font-size: var(--font-size-xxl);
    opacity: 0.8;
}

.celebration-text {
    font-size: var(--font-size-lg);
    opacity: 0.95;
}

.level-not-passed {
    padding: var(--spacing-xxl);
    background: var(--color-bg-card);
    border-radius: var(--border-radius-xl);
    margin-bottom: var(--spacing-xl);
    box-shadow: var(--shadow);
}

.not-passed-icon {
    font-size: 4rem;
    margin-bottom: var(--spacing-lg);
}

.not-passed-title {
    font-size: var(--font-size-xxl);
    color: var(--color-warning);
    margin-bottom: var(--spacing-md);
}

.not-passed-text {
    color: var(--color-text-muted);
}

.test-score {
    margin-bottom: var(--spacing-xl);
}

.test-score .score-circle {
    flex-direction: column;
    gap: var(--spacing-xs);
}

.test-score .score-label {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

.score-passed .score-value {
    color: var(--color-success);
}

.score-failed .score-value {
    color: var(--color-warning);
}

.test-results-details {
    max-width: 500px;
    margin: 0 auto var(--spacing-xl);
    text-align: left;
}

.test-results-details h3 {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.results-list .result-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--color-bg-card);
    border-radius: var(--border-radius);
    border-left: 4px solid;
}

.results-list .result-correct {
    border-color: var(--color-success);
}

.results-list .result-wrong {
    border-color: var(--color-error);
}

.result-icon {
    font-size: var(--font-size-lg);
    font-weight: 700;
}

.result-correct .result-icon {
    color: var(--color-success);
}

.result-wrong .result-icon {
    color: var(--color-error);
}

.result-content {
    flex: 1;
}

.results-list .result-question {
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.results-list .result-answers {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: var(--font-size-sm);
    flex-wrap: wrap;
}

.result-user-answer {
    color: var(--color-error);
    text-decoration: line-through;
}

.result-arrow {
    color: var(--color-text-muted);
}

.result-correct-answer {
    color: var(--color-success);
    font-weight: 600;
}

.test-result-actions {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    max-width: 300px;
    margin: 0 auto;
}

/* Responsive Level Test */
@media (max-width: 600px) {
    .level-transition {
        flex-direction: row;
        gap: var(--spacing-md);
        padding: var(--spacing-md);
    }

    .level-badge-small {
        width: 40px;
        height: 40px;
        font-size: var(--font-size-base);
    }

    .level-arrow {
        font-size: var(--font-size-lg);
    }

    .requirements-list li {
        flex-direction: column;
        align-items: flex-start;
    }

    .level-up-celebration {
        padding: var(--spacing-xl);
    }

    .celebration-icon {
        font-size: 3rem;
    }

    .celebration-title {
        font-size: var(--font-size-xxl);
    }

    .level-badge-result {
        width: 50px;
        height: 50px;
        font-size: var(--font-size-lg);
    }

    .test-question-card {
        padding: var(--spacing-lg);
    }

    .question-word {
        font-size: var(--font-size-xxl);
    }

    .test-answer-input {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: var(--font-size-base);
    }
}

@media (max-width: 390px) {
    .level-badge-small {
        width: 35px;
        height: 35px;
        font-size: var(--font-size-sm);
    }

    .level-name {
        font-size: 0.75rem;
    }

    .celebration-icon {
        font-size: 2.5rem;
    }

    .celebration-title {
        font-size: var(--font-size-xl);
    }

    .celebration-text {
        font-size: var(--font-size-base);
    }

    .level-badge-result {
        width: 40px;
        height: 40px;
        font-size: var(--font-size-base);
    }

    .question-word {
        font-size: var(--font-size-xl);
    }
}
