/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    color: #e0e0e0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* Home Page Styles */
.home-container {
    text-align: center;
    padding-top: 40px;
}

.hero {
    display: flex;
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.flag-stripe {
    flex: 1;
}

.flag-stripe.black { background: #000; }
.flag-stripe.red { background: #dd0000; }
.flag-stripe.gold { background: #ffcc00; }

/* Main Logo */
.logo-container {
    margin-bottom: 15px;
}

.main-logo {
    max-width: 350px;
    width: 100%;
    height: auto;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

h2 {
    font-size: 1.4rem;
    color: #a0a0a0;
    margin-bottom: 30px;
    font-weight: 400;
}

.info-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 20px;
    text-align: left;
    backdrop-filter: blur(10px);
}

.info-card h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #fff;
}

.info-card ul {
    list-style: none;
    padding-left: 0;
}

.info-card li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
}

.info-card li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #4ade80;
}

/* Mode Cards Grid */
.modes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.mode-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.mode-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.mode-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.mode-card h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
    color: #fff;
}

.mode-description {
    color: #b0b0b0;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 15px;
    min-height: 60px;
}

.mode-features {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    text-align: left;
}

.mode-features li {
    padding: 6px 0;
    padding-left: 22px;
    position: relative;
    font-size: 0.9rem;
    color: #d0d0d0;
}

.mode-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #4ade80;
    font-weight: bold;
}

.mode-actions {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-block {
    width: 100%;
    text-align: center;
}

/* Card accent colors */
.test-card:hover {
    border-color: rgba(102, 126, 234, 0.4);
}

.streak-card:hover {
    border-color: rgba(251, 146, 60, 0.4);
}

.practice-card:hover {
    border-color: rgba(34, 197, 94, 0.4);
}

/* Info Banner */
.info-banner {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    padding: 15px 20px;
    margin: 25px 0;
}

.info-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.info-content {
    color: #d0d0d0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.info-content strong {
    color: #fff;
}

/* Quick Actions */
.quick-actions {
    margin: 20px 0;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    margin-top: 10px;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.btn-medium {
    padding: 10px 20px;
    font-size: 0.95rem;
}

.btn-large {
    padding: 16px 40px;
    font-size: 1.2rem;
}

.footer-text {
    margin-top: 30px;
    color: #888;
}

/* Legal links on index page */
.legal-links {
    margin-top: 20px;
    margin-bottom: 60px;
    font-size: 0.75rem;
    color: #666;
}

.legal-links a {
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
}

.legal-links a:hover {
    color: #60a5fa;
}

.legal-links .separator {
    margin: 0 8px;
    opacity: 0.5;
}

.contact-copy {
    cursor: pointer;
    transition: color 0.2s;
}

.contact-copy:hover {
    color: #60a5fa;
}

.contact-copy.copied {
    color: #4ade80;
}

/* Fixed Support Footer */
.support-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(26, 26, 46, 0.98), rgba(26, 26, 46, 0.95));
    backdrop-filter: blur(10px);
    padding: 8px 15px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    font-size: 0.8rem;
}

.support-footer-content {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.support-footer .made-with {
    color: #a0a0a0;
    margin: 0;
}

.support-footer .made-with .heart {
    color: #ef4444;
}

.support-footer .support-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, #ffdd00, #ff9900);
    color: #1a1a2e;
    padding: 5px 12px;
    border-radius: 15px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.75rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.support-footer .support-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(255, 221, 0, 0.4);
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 60px;
    left: 0;
    right: 0;
    background: rgba(30, 41, 59, 0.98);
    backdrop-filter: blur(10px);
    padding: 12px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.cookie-content {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 800px;
    font-size: 0.85rem;
    color: #c0c0c0;
}

.cookie-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cookie-link {
    color: #60a5fa;
    text-decoration: none;
    font-size: 0.8rem;
}

.cookie-link:hover {
    text-decoration: underline;
}

.cookie-accept {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.cookie-accept:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* Adjust containers to have padding for footer */
.container {
    padding-bottom: 70px;
}

/* Test Page Styles */
.test-container {
    padding-bottom: 80px;
}

.test-header {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 30px;
    position: sticky;
    top: 10px;
    z-index: 100;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

/* Exit Test Button */
.exit-test-btn {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.exit-test-btn:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.5);
    transform: scale(1.05);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.seed-display {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    cursor: pointer;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.seed-display:hover {
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.1);
}

.seed-display.copied {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.15);
}

.test-header h1 {
    font-size: 1.5rem;
    margin: 0;
}

/* Timer */
.timer {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.timer-icon {
    font-size: 1.2rem;
}

.timer-value {
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    min-width: 50px;
}

.timer-warning {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
    animation: pulse-warning 1s ease-in-out infinite;
}

.timer-warning .timer-value {
    color: #f87171;
}

@keyframes pulse-warning {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4ade80, #22c55e);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    margin-top: 10px;
    color: #a0a0a0;
}

/* Question Section */
.question-section {
    margin-bottom: 40px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #fff;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.section-icon {
    font-size: 1.5rem;
}

/* Question Card */
.question-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.question-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

.question-card.answered {
    border-color: rgba(74, 222, 128, 0.3);
    background: rgba(74, 222, 128, 0.05);
}

.question-card.just-answered {
    animation: pulseGreen 0.3s ease-out;
}

@keyframes pulseGreen {
    0% {
        box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.5);
    }
    100% {
        box-shadow: 0 0 0 8px rgba(74, 222, 128, 0);
    }
}

.question-card.brandenburg {
    border-left: 4px solid #ef4444;
}

.question-number {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.question-id {
    display: inline-block;
    color: #888;
    font-size: 0.85rem;
    margin-left: 10px;
}

.question-text {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Question Images */
.question-image {
    margin-bottom: 20px;
    text-align: center;
}

.question-image img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.95);
    padding: 10px;
}

/* Options */
.options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option {
    display: flex;
    align-items: flex-start;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.option:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(102, 126, 234, 0.5);
}

.option:active {
    transform: scale(0.98);
}

.option input[type="radio"] {
    margin-right: 15px;
    margin-top: 3px;
    accent-color: #667eea;
    width: 18px;
    height: 18px;
}

.option input[type="radio"]:checked + .option-text {
    color: #fff;
}

.option:has(input:checked) {
    background: rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.5);
}

.option-text {
    color: #c0c0c0;
    flex: 1;
}

/* Submit Section */
.submit-section {
    text-align: center;
    padding: 16px 0 50px 0;
    position: sticky;
    bottom: 0;
    background: linear-gradient(to top, rgba(22, 33, 62, 1) 0%, rgba(22, 33, 62, 0.95) 80%, transparent 100%);
    margin-top: 20px;
}

.submit-warning {
    color: #fbbf24;
    margin-top: 15px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
}

.modal-content {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.modal-large {
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-xlarge {
    max-width: 900px;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
}

.modal-small {
    max-width: 400px;
}

.modal-header {
    padding: 30px;
    text-align: center;
}

.modal-header.passed {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.modal-header.failed {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.modal-header.wrong-header {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
}

/* Seed Modal Styles */
.seed-btn {
    margin-top: 15px;
    font-size: 0.95rem;
}

.seed-info {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.seed-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 1.1rem;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: #fff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    text-align: center;
    letter-spacing: 2px;
}

.seed-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

.seed-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 1px;
}

.seed-input.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

.seed-actions {
    margin-top: 20px;
}

.seed-actions .btn {
    width: 100%;
}

/* Bundesland Banner Styles */
.bundesland-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.bundesland-current {
    color: #e0e0e0;
    font-size: 1rem;
}

.bundesland-current strong {
    color: #fbbf24;
}

.bundesland-warning {
    color: #fbbf24;
    font-size: 1rem;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Bundesland Selection Modal */
.bundesland-info {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
    font-size: 0.95rem;
    text-align: center;
}

.bundesland-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.bundesland-list::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Opera */
}

.btn-bundesland {
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-bundesland:hover {
    background: rgba(102, 126, 234, 0.3);
    border-color: #667eea;
}

.btn-bundesland.selected {
    background: rgba(34, 197, 94, 0.3);
    border-color: #22c55e;
}

.modal-header h2 {
    color: #fff;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
}

.modal-footer {
    padding: 20px 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Score Display */
.score-display {
    text-align: center;
    margin-bottom: 30px;
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0 auto 15px;
    border: 4px solid;
}

.score-circle.passed {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
}

.score-circle.failed {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.score-number {
    font-size: 3rem;
    font-weight: 700;
    color: #fff;
}

.score-total {
    font-size: 1.5rem;
    color: #888;
}

.score-percentage {
    font-size: 1.3rem;
    color: #a0a0a0;
}

/* Score Breakdown */
.score-breakdown {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.breakdown-item:last-child {
    border-bottom: none;
}

.breakdown-label {
    color: #a0a0a0;
}

.breakdown-value {
    font-weight: 600;
    color: #fff;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Wrong Answers */
.wrong-answer-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.wrong-answer-card.brandenburg {
    border-left: 4px solid #ef4444;
}

.wrong-header-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.wrong-number {
    font-weight: 600;
    color: #fff;
}

.wrong-category {
    color: #888;
    font-size: 0.9rem;
}

.wrong-question {
    color: #e0e0e0;
    margin-bottom: 15px;
    line-height: 1.5;
}

.wrong-question-image {
    margin-bottom: 15px;
    text-align: center;
}

.wrong-question-image img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.wrong-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wrong-option {
    padding: 12px 15px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    color: #a0a0a0;
}

.wrong-option.correct {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #4ade80;
}

.wrong-option.user-selected:not(.correct) {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

/* Translation toggle button */
.translate-btn {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #60a5fa;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.translate-btn:hover {
    background: rgba(59, 130, 246, 0.25);
    border-color: rgba(59, 130, 246, 0.5);
}

.translate-btn.showing-en {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.3);
    color: #4ade80;
}

.translate-btn.showing-en:hover {
    background: rgba(34, 197, 94, 0.25);
    border-color: rgba(34, 197, 94, 0.5);
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 10px;
    }
    
    /* Modal positioning on mobile - start higher */
    .modal {
        align-items: flex-start;
        padding-top: 60px;
    }
    
    .modal-content {
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }
    
    /* Bundesland modal fullscreen on mobile */
    #bundesland-modal {
        align-items: stretch;
        padding: 0;
    }
    
    #bundesland-modal .modal-content {
        max-width: 100%;
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
        display: flex;
        flex-direction: column;
    }
    
    #bundesland-modal .modal-body {
        flex: 1;
        overflow-y: auto;
    }
    
    /* Bundesland list scrollable on mobile */
    .bundesland-list {
        max-height: none;
        overflow-y: hidden;
    }
    
    /* Home page */
    h1 {
        font-size: 1.6rem;
    }
    
    h2 {
        font-size: 1.1rem;
        margin-bottom: 20px;
    }
    
    .home-container {
        padding-top: 20px;
    }
    
    .modes-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .mode-card {
        padding: 20px;
    }
    
    .mode-icon {
        font-size: 2.5rem;
    }
    
    .mode-description {
        min-height: auto;
    }
    
    .info-banner {
        flex-direction: column;
        gap: 10px;
        padding: 12px 15px;
    }
    
    .info-card {
        padding: 18px;
        border-radius: 12px;
    }
    
    .info-card h3 {
        font-size: 1.1rem;
    }
    
    .btn-large {
        padding: 14px 30px;
        font-size: 1.1rem;
        width: 100%;
    }
    
    /* Test header */
    .test-header {
        padding: 8px 10px;
        border-radius: 10px;
        top: 5px;
    }
    
    .header-top {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
        justify-content: space-between;
        align-items: center;
    }
    
    .exit-test-btn {
        order: 3;
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }
    
    .test-header h1 {
        order: 1;
        font-size: 0.85rem;
        text-align: left;
        flex: 1;
        margin: 0;
    }
    
    .header-right {
        order: 2;
        gap: 6px;
    }
    
    .seed-display {
        font-size: 0.55rem;
        padding: 2px 5px;
    }
    
    .timer {
        font-size: 0.8rem;
        padding: 3px 8px;
        gap: 4px;
    }
    
    .timer-icon {
        font-size: 0.85rem;
    }
    
    .progress-bar {
        height: 5px;
        margin-bottom: 4px;
        margin-top: 6px;
    }
    
    .progress-text {
        font-size: 0.75rem;
    }
    
    /* Section titles */
    .section-title {
        font-size: 1.1rem;
        gap: 8px;
    }
    
    .section-icon {
        font-size: 1.3rem;
    }
    
    /* Question cards */
    .question-card {
        padding: 15px;
        border-radius: 12px;
        margin-bottom: 15px;
    }
    
    .question-number {
        font-size: 0.8rem;
        padding: 3px 10px;
    }
    
    .question-id {
        font-size: 0.8rem;
    }
    
    .question-text {
        font-size: 1rem;
        margin-bottom: 15px;
    }
    
    .question-image img {
        max-height: 200px;
        padding: 8px;
    }
    
    /* Options */
    .options {
        gap: 8px;
    }
    
    .option {
        padding: 12px 14px;
        border-radius: 10px;
    }
    
    .option input[type="radio"] {
        margin-right: 12px;
        width: 16px;
        height: 16px;
        flex-shrink: 0;
    }
    
    .option-text {
        font-size: 0.95rem;
        word-break: break-word;
    }
    
    /* Submit section */
    .submit-section {
        padding: 30px 0 52px 0;
    }
    
    .submit-section .btn-large {
        width: auto;
        padding: 14px 30px;
    }
    
    /* Modals */
    .modal {
        padding: 10px;
        align-items: flex-end;
    }
    
    .modal-content {
        border-radius: 20px 20px 0 0;
        max-height: 95vh;
    }
    
    .modal-large {
        max-height: 95vh;
    }
    
    .modal-xlarge {
        max-height: 95vh;
    }
    
    .failed-list-scroll {
        max-height: 200px;
    }
    
    .failed-item-question {
        font-size: 0.85rem;
    }
    
    .modal-header {
        padding: 20px;
    }
    
    .modal-header h2 {
        font-size: 1.3rem;
    }
    
    .modal-header.wrong-header {
        padding: 15px 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-footer {
        padding: 15px 20px;
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
        text-align: center;
    }
    
    /* Score display */
    .score-circle {
        width: 110px;
        height: 110px;
    }
    
    .score-number {
        font-size: 2.2rem;
    }
    
    .score-total {
        font-size: 1.2rem;
    }
    
    .score-percentage {
        font-size: 1.1rem;
    }
    
    .score-breakdown {
        padding: 15px;
    }
    
    .breakdown-item {
        padding: 8px 0;
        font-size: 0.95rem;
    }
    
    /* Wrong answers */
    .wrong-answer-card {
        padding: 15px;
        border-radius: 10px;
    }
    
    .wrong-header-info {
        flex-direction: column;
        gap: 5px;
    }
    
    .wrong-question {
        font-size: 0.95rem;
    }
    
    .wrong-option {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    /* Action buttons in modal */
    .action-buttons {
        gap: 10px;
    }
    
    .action-buttons .btn {
        width: 100%;
        text-align: center;
    }
}

/* Extra small devices */
@media (max-width: 380px) {
    h1 {
        font-size: 1.4rem;
    }
    
    .test-header h1 {
        font-size: 1rem;
    }
    
    .question-text {
        font-size: 0.95rem;
    }
    
    .option-text {
        font-size: 0.9rem;
    }
}

/* ===== SEED INPUT IMPROVEMENTS ===== */
.seed-input-group {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.seed-input-group .seed-input {
    flex: 1;
}

.btn-icon {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 14px 16px;
    font-size: 1.2rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #667eea;
}

.seed-input.flash {
    animation: flash-input 0.3s ease;
}

@keyframes flash-input {
    0%, 100% { background: rgba(255, 255, 255, 0.1); }
    50% { background: rgba(102, 126, 234, 0.3); }
}

/* Streak Mode Button */
.btn-streak {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4);
}

.btn-streak:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.6);
}

.streak-btn {
    margin-top: 15px;
}

/* Pro Streak Mode Button */
.btn-pro {
    background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%);
    color: #1a1a2e;
    box-shadow: 0 4px 15px rgba(234, 179, 8, 0.4);
    font-weight: 700;
}

.btn-pro:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(234, 179, 8, 0.6);
}

/* Pro Mode Card */
.pro-card {
    border-color: rgba(234, 179, 8, 0.3);
}

.pro-card .mode-icon {
    background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%);
    color: #1a1a2e;
}

/* Practice Mode Button */
.btn-practice {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.btn-practice:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.6);
}

.practice-btn {
    margin-top: 10px;
}

/* Pause Button */
.btn-pause {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #a0a0a0;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-pause:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* Resume Button */
.btn-resume {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-resume:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}

/* Streak buttons container */
.streak-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    margin-bottom: 60px;
}

.streak-buttons .btn-large {
    width: 100%;
    max-width: 280px;
}

.streak-buttons .btn-small,
.streak-buttons .btn-resume {
    width: auto;
    padding: 10px 20px;
    font-size: 0.9rem;
}

/* Pause modal info */
.pause-info {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 10px;
    text-align: center;
}

.pause-info strong {
    color: #f97316;
}

/* ===== STREAK MODE STYLES ===== */
.streak-container {
    padding-top: 20px;
    padding-bottom: 80px;
}

.streak-screen {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.back-link {
    color: #a0a0a0;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 20px;
}

.back-link:hover {
    color: #fff;
}

.streak-hero {
    text-align: center;
    margin-bottom: 30px;
}

.streak-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.streak-subtitle {
    color: #a0a0a0;
    font-size: 1.1rem;
}

.streak-rules {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px 25px;
    margin-bottom: 25px;
}

.streak-rules h3 {
    margin-bottom: 15px;
    color: #fff;
}

.streak-rules ul {
    list-style: none;
    padding: 0;
}

.streak-rules li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    color: #c0c0c0;
}

.streak-rules li::before {
    content: '🔥';
    position: absolute;
    left: 0;
}

/* Stats Panel */
.stats-panel {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
}

.stats-panel h3 {
    margin-bottom: 20px;
    color: #fff;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.stat-item.best-streak {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.2) 0%, rgba(234, 88, 12, 0.1) 100%);
    border: 1px solid rgba(249, 115, 22, 0.3);
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: #a0a0a0;
    margin-top: 5px;
}

/* Top Scores */
.top-scores {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.top-scores h4 {
    margin-bottom: 15px;
    color: #fff;
}

.top-scores-list {
    list-style: none;
    padding: 0;
    counter-reset: rank;
}

.top-scores-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    margin-bottom: 8px;
    counter-increment: rank;
}

.top-scores-list li::before {
    content: counter(rank) ".";
    font-weight: 700;
    color: #f97316;
    width: 25px;
}

.score-value {
    font-weight: 600;
    color: #fff;
}

.completed-badge {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
}

.score-date {
    margin-left: auto;
    color: #666;
    font-size: 0.8rem;
}

/* Weak Practice Section */
.weak-practice-section {
    margin-top: 20px;
    padding: 20px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 12px;
}

.weak-practice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.weak-practice-header h4 {
    margin: 0;
    color: #fbbf24;
}

.weak-count-badge {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
}

.weak-practice-info {
    color: #a0a0a0;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.weak-questions-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.weak-q-badge {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fbbf24;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.weak-q-badge:hover {
    background: rgba(245, 158, 11, 0.25);
    border-color: rgba(245, 158, 11, 0.5);
    transform: translateY(-1px);
}

.weak-q-more {
    color: #a0a0a0;
    padding: 4px 10px;
    font-size: 0.85rem;
}

.weak-remaining-info {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    margin-bottom: 20px;
}

.weak-remaining-info p {
    margin: 5px 0;
}

.weak-remaining-info strong {
    color: #fbbf24;
}

.weak-remaining-info .weak-hint {
    color: #a0a0a0;
    font-size: 0.9rem;
}

/* Weak Spots */
.weak-spots {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.weak-spots h4 {
    margin-bottom: 10px;
    color: #f87171;
}

.weak-spots-info {
    color: #a0a0a0;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.failed-questions-scroll {
    max-height: 200px;
    overflow-y: auto;
    padding-right: 5px;
    margin-bottom: 12px;
}

.failed-questions-scroll::-webkit-scrollbar {
    width: 6px;
}

.failed-questions-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.failed-questions-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.failed-questions-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.failed-questions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.failed-q {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
}

.failed-q.clickable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.failed-q.clickable:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.5);
    transform: translateY(-1px);
}

.failed-q.learned {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.3);
    color: #4ade80;
}

.failed-q.learned:hover {
    background: rgba(34, 197, 94, 0.25);
    border-color: rgba(34, 197, 94, 0.5);
}

.failed-q.learning {
    background: rgba(251, 191, 36, 0.15);
    border-color: rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}

.failed-q.learning:hover {
    background: rgba(251, 191, 36, 0.25);
    border-color: rgba(251, 191, 36, 0.5);
}

.priority-indicator {
    font-size: 0.75rem;
    background: rgba(251, 191, 36, 0.2);
    border: 1px solid rgba(251, 191, 36, 0.4);
    color: #fbbf24;
    padding: 3px 8px;
    border-radius: 4px;
    margin-top: 5px;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.85rem;
    /*margin-top: 15px;*/
}

/* Streak Game Screen */
.streak-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px 25px;
    margin-bottom: 20px;
}

.streak-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.current-streak {
    font-size: 2.5rem;
    font-weight: 700;
    color: #f97316;
    line-height: 1;
    transition: transform 0.2s ease;
}

.current-streak.milestone {
    animation: milestone-pulse 0.5s ease;
}

@keyframes milestone-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

.streak-label {
    font-size: 0.8rem;
    color: #a0a0a0;
    text-transform: uppercase;
}

.streak-percentages {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin-top: 2px;
}

.percent-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.percent-value {
    font-size: 1rem;
    color: #4ade80;
    font-weight: 600;
    padding: 3px 8px;
    background: rgba(74, 222, 128, 0.15);
    border-radius: 6px;
    min-width: 45px;
    text-align: center;
}

.percent-separator {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.percent-labels {
    display: flex;
    gap: 20px;
    justify-content: space-between;
    width: 100%;
}

.percent-label {
    font-size: 0.65rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex: 1;
    text-align: center;
}

.progress-info {
    color: #a0a0a0;
    font-size: 0.95rem;
}

.streak-progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 25px;
}

.streak-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f97316, #ea580c);
    width: 0%;
    transition: width 0.3s ease;
}

/* Streak Question Card */
.streak-question-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 25px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateX(20px);
    }
    to { 
        opacity: 1;
        transform: translateX(0);
    }
}

.streak-question-card.brandenburg {
    border-left: 4px solid #ef4444;
}

.question-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.q-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.q-category {
    color: #888;
    font-size: 0.9rem;
}

/* Streak Options */
.streak-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.streak-option {
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #c0c0c0;
    font-size: 1rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
}

.streak-option:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(102, 126, 234, 0.5);
    color: #fff;
}

.streak-option:disabled {
    cursor: default;
}

.streak-option.correct {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.5);
    color: #4ade80;
}

.streak-option.wrong {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
    color: #f87171;
}

/* Game Over Modal Additions */
.final-score {
    text-align: center;
    margin-bottom: 25px;
}

.score-display-large {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.2) 0%, rgba(234, 88, 12, 0.1) 100%);
    border: 2px solid rgba(249, 115, 22, 0.4);
    border-radius: 20px;
    padding: 30px;
    display: inline-block;
}

.final-score-number {
    display: block;
    font-size: 4rem;
    font-weight: 700;
    color: #f97316;
    line-height: 1;
}

.final-score-label {
    display: block;
    color: #a0a0a0;
    margin-top: 10px;
}

.final-score-percentages {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-top: 12px;
}

.final-score-percentages .percent-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.final-score-percentages .percent-value {
    font-size: 1.3rem;
    color: #4ade80;
    font-weight: 600;
    padding: 5px 15px;
    background: rgba(74, 222, 128, 0.15);
    border-radius: 8px;
    min-width: 55px;
    text-align: center;
}

.final-score-percentages .percent-separator {
    font-size: 1.1rem;
    color: #666;
    font-weight: 500;
}

.final-score-percentages .percent-labels {
    display: flex;
    gap: 24px;
    justify-content: space-between;
    width: 100%;
}

.final-score-percentages .percent-label {
    font-size: 0.7rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex: 1;
    text-align: center;
}

.new-record {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    display: inline-block;
    margin-top: 15px;
    font-weight: 600;
    animation: bounce 0.5s ease;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.wrong-answer-info {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: left;
}

.wrong-label, .correct-label {
    font-size: 0.85rem;
    color: #a0a0a0;
    margin-bottom: 5px;
}

.your-answer {
    color: #f87171;
    margin-bottom: 15px;
}

.correct-answer {
    color: #4ade80;
    font-weight: 600;
    margin-bottom: 5px;
}

.correct-answer-en {
    color: #60a5fa;
    font-size: 0.9rem;
}

.updated-stats {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    color: #a0a0a0;
}

.stat-row span:last-child {
    color: #fff;
    font-weight: 600;
}

/* Streak Mode Responsive */
@media (max-width: 600px) {
    .streak-hero h1 {
        font-size: 1.8rem;
    }
    
    .streak-subtitle {
        font-size: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .streak-header {
        padding: 15px;
    }
    
    .current-streak {
        font-size: 2rem;
    }
    
    .streak-question-card {
        padding: 15px;
    }
    
    .streak-option {
        padding: 12px 15px;
        font-size: 0.95rem;
    }
    
    .final-score-number {
        font-size: 3rem;
    }
    
    .score-display-large {
        padding: 20px;
    }
}

/* ===== SCORE HISTORY TABLE ===== */
.score-history {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.score-history h4 {
    margin-bottom: 15px;
    color: #fff;
}

.history-scroll {
    max-height: 250px;
    overflow-y: auto;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.history-table thead {
    position: sticky;
    top: 0;
    background: #1e1e1e;
}

.history-table th {
    padding: 10px 12px;
    text-align: left;
    color: #a0a0a0;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.history-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #c0c0c0;
}

.history-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.history-table tbody tr.best {
    background: rgba(249, 115, 22, 0.1);
}

.history-table tbody tr.completed {
    background: rgba(34, 197, 94, 0.05);
}

.history-table .score-value {
    color: #fff;
    font-weight: 600;
}

.history-table .completed-badge {
    margin-left: 5px;
    padding: 1px 5px;
    font-size: 0.7rem;
}

.history-table .best-badge {
    margin-left: 5px;
    font-size: 0.8rem;
}

.history-table .date-cell {
    color: #666;
    font-size: 0.8rem;
    white-space: nowrap;
}

/* Custom scrollbar for history */
.history-scroll::-webkit-scrollbar {
    width: 6px;
}

.history-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.history-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.history-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 3-column stats grid when we have average score */
.stats-grid:has(.stat-item:nth-child(3)) {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 600px) {
    .stats-grid:has(.stat-item:nth-child(3)) {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .stats-grid .stat-item {
        padding: 12px;
    }
    
    .history-scroll {
        max-height: 200px;
    }
    
    .history-table th,
    .history-table td {
        padding: 8px 10px;
    }
}

/* ===== PRACTICE MODE STYLES ===== */
.practice-rules ul {
    color: #a0a0a0;
}

.practice-header .current-streak {
    color: #8b5cf6;
}

.current-percentage {
    font-size: 1rem;
    color: #4ade80;
    font-weight: 600;
    margin-top: 2px;
}

.practice-final {
    text-align: center;
}

.percentage-display {
    margin-top: 15px;
}

.percentage-number {
    font-size: 2rem;
    font-weight: 700;
    color: #8b5cf6;
}

.failed-summary {
    margin-top: 20px;
    padding: 15px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
}

.failed-summary h3 {
    color: #f87171;
    margin-bottom: 10px;
    font-size: 1rem;
}

.failed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.failed-header h3 {
    margin-bottom: 0;
}

.toggle-failed-btn {
    padding: 6px 12px;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #e0e0e0;
    cursor: pointer;
    transition: all 0.2s;
}

.toggle-failed-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.failed-list-scroll {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 10px;
}

.failed-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.failed-item {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.failed-item:hover {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.failed-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.failed-item-number {
    font-weight: 600;
    color: #f87171;
    font-size: 0.9rem;
}

.failed-item-category {
    font-size: 1rem;
}

.failed-item-question {
    font-size: 0.9rem;
    color: #e0e0e0;
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.failed-item-answers {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.85rem;
}

.failed-item-wrong {
    color: #f87171;
}

.failed-item-correct {
    color: #4ade80;
}

.failed-hint {
    color: #a0a0a0;
    font-size: 0.9rem;
}

.no-weak {
    color: #4ade80;
    font-style: italic;
}
/* Search Page Styles */
.search-container {
    max-width: 800px;
    padding-bottom: 50px;
}

.search-hero {
    text-align: center;
    margin-bottom: 30px;
}

.search-hero h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.search-subtitle {
    color: #a0a0a0;
    font-size: 1rem;
}

.search-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}

.search-input {
    width: 100%;
    padding: 15px 20px;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: #fff;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: rgba(102, 126, 234, 0.6);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.search-input::placeholder {
    color: #888;
}

.search-stats {
    margin-top: 12px;
    font-size: 0.9rem;
    color: #a0a0a0;
    text-align: center;
}

.search-results {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.search-hint {
    text-align: center;
    color: #a0a0a0;
    padding: 40px 20px;
    line-height: 1.8;
}

.no-results {
    text-align: center;
    color: #f87171;
    padding: 40px 20px;
    font-size: 1.1rem;
}

.search-question-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 25px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.search-question-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.search-question-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.search-question-number {
    background: rgba(102, 126, 234, 0.2);
    color: #a0b4f5;
    padding: 4px 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}

.search-question-category {
    color: #a0a0a0;
    font-size: 0.9rem;
}

.search-question-text {
    font-size: 1.1rem;
    color: #fff;
    line-height: 1.6;
    margin-bottom: 15px;
}

.search-question-image {
    margin: 15px 0;
    text-align: center;
}

.search-question-image img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.search-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
}

.search-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.search-option .option-bullet {
    flex-shrink: 0;
    font-size: 1.2rem;
    margin-top: 2px;
}

.search-option .option-text {
    color: #d0d0d0;
    line-height: 1.5;
}

.search-option.revealed-correct {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.4);
}

.search-option.revealed-correct .option-text {
    color: #4ade80;
    font-weight: 600;
}

.search-option.revealed-wrong {
    opacity: 0.5;
}

.reveal-btn {
    margin-top: 10px;
}

/* Print Exam Page Styles */
.print-container {
    max-width: 700px;
    padding-bottom: 50px;
}

.print-hero {
    text-align: center;
    margin-bottom: 30px;
}

.print-hero h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.print-subtitle {
    color: #a0a0a0;
    font-size: 1rem;
}

.print-info-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
    backdrop-filter: blur(10px);
}

.print-info-card h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #fff;
}

.print-info-card ul {
    list-style: none;
    padding: 0;
}

.print-info-card li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    color: #d0d0d0;
}

.print-info-card li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #4ade80;
    font-weight: bold;
}

.print-section {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
}

.print-section h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #fff;
}

.seed-input-wrapper {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.print-seed-input {
    flex: 1;
    padding: 12px 15px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: #fff;
}

.print-seed-input:focus {
    outline: none;
    border-color: rgba(102, 126, 234, 0.6);
    background: rgba(255, 255, 255, 0.1);
}

.seed-hint {
    font-size: 0.9rem;
    color: #a0a0a0;
    margin-top: 8px;
}

.print-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
}

.print-preview {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 30px;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.preview-header h3 {
    color: #4ade80;
    margin: 0;
}

.preview-seed {
    display: flex;
    align-items: center;
    gap: 10px;
}

.preview-seed code {
    background: rgba(0, 0, 0, 0.3);
    padding: 5px 12px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    color: #4ade80;
}

.preview-info {
    color: #d0d0d0;
    margin-bottom: 15px;
}

.preview-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.print-tips {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 16px;
    padding: 25px;
}

.print-tips h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #fff;
}

.print-tips ul {
    list-style: none;
    padding: 0;
}

.print-tips li {
    padding: 6px 0;
    padding-left: 22px;
    position: relative;
    color: #d0d0d0;
}

.print-tips li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: #60a5fa;
}

/* Statistics Page */
.stats-page .container {
    max-width: 1200px;
}

.stats-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: linear-gradient(135deg, rgba(74, 158, 255, 0.15), rgba(102, 126, 234, 0.1));
    border: 2px solid rgba(74, 158, 255, 0.3);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(74, 158, 255, 0.2);
    border-color: rgba(74, 158, 255, 0.5);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: #4a9eff;
    margin-bottom: 8px;
    line-height: 1;
}

.stat-label {
    font-size: 0.95rem;
    color: #a0a0a0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mode-stats-section {
    background: rgba(30, 30, 50, 0.5);
    border: 1px solid rgba(74, 158, 255, 0.2);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
}

.mode-stats-section h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mode-stats-section h3 {
    color: #4a9eff;
    font-size: 1.2rem;
}

.mode-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.recent-games-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.game-entry {
    background: rgba(20, 20, 40, 0.5);
    border: 1px solid rgba(74, 158, 255, 0.2);
    border-radius: 12px;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.game-entry:hover {
    background: rgba(30, 30, 50, 0.7);
    border-color: rgba(74, 158, 255, 0.4);
}

.game-entry.passed {
    border-left: 4px solid #22c55e;
}

.game-entry.failed {
    border-left: 4px solid #ef4444;
}

.game-date {
    color: #888;
    font-size: 0.9rem;
}

.game-score {
    font-weight: bold;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.badge-pass, .badge-fail, .badge-perfect {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-pass {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.4);
}

.badge-fail {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.badge-perfect {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 140, 0, 0.2));
    color: #ffd700;
    border: 1px solid rgba(255, 215, 0, 0.4);
}

.no-data {
    text-align: center;
    color: #888;
    padding: 30px;
    font-size: 1.1rem;
}

.no-data a {
    color: #4a9eff;
    text-decoration: none;
    font-weight: bold;
}

.no-data a:hover {
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .stats-summary-grid {
        grid-template-columns: 1fr;
    }
    
    .mode-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .game-entry {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .stat-value {
        font-size: 2rem;
    }
    
    .mode-stats-section {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .mode-stats-grid {
        grid-template-columns: 1fr;
    }
}