/* Wikinger Quiz - Frontend Styles */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700&family=Spectral:wght@300;400;500;600&display=swap');

.vikinger-quiz-container {
    font-family: 'Spectral', serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 600px;
}

.vikinger-quiz-container h1,
.vikinger-quiz-container h2,
.vikinger-quiz-container h3 {
    font-family: 'Cinzel', serif;
}

/* Screens */
.quiz-screen {
    display: none;
    animation: fadeIn 0.5s ease-in;
}

.quiz-screen.active {
    display: block;
}

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

/* Hero Section */
.quiz-hero {
    position: relative;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 30px;
}

.hero-background {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #1a1410 0%, #2d2416 50%, #1a1410 100%);
    background-image: url('data:image/svg+xml,%3Csvg width="100" height="100" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noise"%3E%3CfeTurbulence baseFrequency="0.9" /%3E%3C/filter%3E%3Crect width="100" height="100" filter="url(%23noise)" opacity="0.05" /%3E%3C/svg%3E');
}

.hero-content {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #D4AF37;
}

.ship-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
}

.ship-icon svg {
    width: 100%;
    height: 100%;
    stroke: #D4AF37;
}

.quiz-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #D4AF37;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.quiz-subtitle {
    font-size: 1.3rem;
    color: #F4E8D0;
    opacity: 0.9;
}

/* Cards */
.quiz-card,
.login-card {
    background: #F4E8D0;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 4px solid #D4AF37;
}

.login-card {
    max-width: 500px;
    margin: 0 auto;
}

.login-card h2 {
    color: #1a1410;
    margin-bottom: 10px;
}

.login-card > p {
    color: #4A3728;
    margin-bottom: 30px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #1a1410;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #8B6914;
    border-radius: 6px;
    font-size: 1rem;
    font-family: 'Spectral', serif;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #D4AF37;
}

/* Buttons */
.btn {
    padding: 14px 32px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Cinzel', serif;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn svg {
    width: 20px;
    height: 20px;
}

.btn-primary {
    background: #8B6914;
    color: #F4E8D0;
}

.btn-primary:hover:not(:disabled) {
    background: #D4AF37;
    color: #1a1410;
    transform: scale(1.05);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: #4A3728;
    color: #F4E8D0;
}

.btn-secondary:hover {
    background: #6B5240;
    transform: scale(1.05);
}

.btn-large {
    width: 100%;
    padding: 18px 32px;
    font-size: 1.3rem;
    justify-content: center;
}

/* Quiz Info */
.quiz-header-image {
    height: 200px;
    background: linear-gradient(135deg, #1a1410 0%, #4A3728 100%);
    border-radius: 8px 8px 0 0;
    margin: -40px -40px 30px -40px;
}

.quiz-info h1 {
    color: #1a1410;
    margin-bottom: 15px;
}

.quiz-info > p {
    color: #4A3728;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.info-boxes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.info-box {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #8B6914;
}

.info-box h3 {
    color: #1a1410;
    margin-bottom: 15px;
}

.info-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-box li {
    color: #4A3728;
    padding: 5px 0;
    padding-left: 20px;
    position: relative;
}

.info-box li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #8B6914;
    font-weight: bold;
}

/* Quiz Progress */
.quiz-progress {
    margin-bottom: 30px;
}

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

#question-counter {
    font-weight: 600;
    color: #1a1410;
    font-size: 1.1rem;
}

.category-badge {
    background: #8B6914;
    color: #F4E8D0;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.progress-bar {
    height: 12px;
    background: #e5d5bb;
    border-radius: 6px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #8B6914 0%, #D4AF37 100%);
    transition: width 0.5s ease;
}

/* Quiz Question */
.quiz-question {
    margin-bottom: 30px;
}

.quiz-question h2 {
    color: #1a1410;
    font-size: 1.8rem;
    line-height: 1.5;
}

/* Quiz Options */
.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.quiz-option {
    padding: 18px 24px;
    background: #fff;
    border: 2px solid #6B7280;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1.1rem;
    color: #4A3728;
}

.quiz-option:hover {
    border-color: #8B6914;
    transform: translateX(5px);
}

.quiz-option.selected {
    background: #D4AF37;
    border-color: #8B6914;
    color: #1a1410;
    font-weight: 600;
}

/* Result Screen */
.result-header {
    text-align: center;
    margin-bottom: 40px;
}

.result-header h1 {
    color: #1a1410;
    margin-bottom: 30px;
}

.score-display {
    background: #fff;
    border: 4px solid #8B6914;
    border-radius: 12px;
    padding: 40px;
}

.score-value {
    font-size: 4rem;
    font-weight: 700;
    color: #8B6914;
    font-family: 'Cinzel', serif;
}

.score-message {
    font-size: 1.5rem;
    color: #1a1410;
    margin-top: 15px;
}

.result-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Review Screen */
.review-summary {
    background: #fff;
    border: 2px solid #8B6914;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    text-align: center;
}

.review-summary h3 {
    color: #1a1410;
    margin-bottom: 10px;
}

.review-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.review-item {
    background: #fff;
    border: 2px solid #6B7280;
    border-radius: 8px;
    padding: 20px;
}

.review-item.correct {
    border-color: #10B981;
    background: #D1FAE5;
}

.review-item.incorrect {
    border-color: #EF4444;
    background: #FEE2E2;
}

.review-item-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.review-icon {
    width: 24px;
    height: 24px;
}

.review-icon.correct {
    color: #10B981;
}

.review-icon.incorrect {
    color: #EF4444;
}

.review-question {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a1410;
    margin-bottom: 15px;
}

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

.review-option {
    padding: 12px 16px;
    border-radius: 6px;
    border: 1px solid #e5d5bb;
}

.review-option.correct-answer {
    background: #D1FAE5;
    border-color: #10B981;
    font-weight: 600;
}

.review-option.wrong-answer {
    background: #FEE2E2;
    border-color: #EF4444;
}

/* Leaderboard */
.leaderboard-header {
    text-align: center;
    margin-bottom: 30px;
}

.leaderboard-header h1 {
    color: #1a1410;
    margin-bottom: 10px;
}

.leaderboard-header p {
    color: #4A3728;
    font-size: 1.1rem;
}

.leaderboard-content {
    margin-bottom: 30px;
}

.leaderboard-item {
    background: #fff;
    border: 2px solid #8B6914;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.leaderboard-item:nth-child(1) {
    border-color: #D4AF37;
    background: linear-gradient(135deg, #FFF9E5 0%, #FFF 100%);
}

.leaderboard-item:nth-child(2) {
    border-color: #C0C0C0;
}

.leaderboard-item:nth-child(3) {
    border-color: #CD7F32;
}

.leaderboard-rank {
    font-size: 2rem;
    font-weight: 700;
    color: #8B6914;
    font-family: 'Cinzel', serif;
    min-width: 60px;
}

.leaderboard-info h3 {
    color: #1a1410;
    margin-bottom: 5px;
}

.leaderboard-info p {
    color: #6B7280;
    font-size: 0.9rem;
}

.leaderboard-score {
    text-align: right;
}

.leaderboard-score .score {
    font-size: 2rem;
    font-weight: 700;
    color: #8B6914;
    font-family: 'Cinzel', serif;
}

.leaderboard-score .label {
    color: #6B7280;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .quiz-title {
        font-size: 2.5rem;
    }
    
    .info-boxes {
        grid-template-columns: 1fr;
    }
    
    .quiz-card,
    .login-card {
        padding: 25px;
    }
    
    .quiz-question h2 {
        font-size: 1.4rem;
    }
    
    .score-value {
        font-size: 3rem;
    }
}