* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.app-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.header {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.title {
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.stats {
    display: flex;
    gap: 20px;
}

.stat {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 4px;
}

.stat-value {
    display: block;
    font-size: 18px;
    font-weight: 600;
}

.main-content {
    padding: 40px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 0;
}

.question-container {
    text-align: center;
    margin-bottom: 30px;
}

.matchup {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.type-badge {
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 120px;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.4s ease-in-out;
}

.type-badge.fade-out {
    opacity: 0;
}

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

.arrow {
    font-size: 24px;
    font-weight: bold;
    color: #64748b;
}

.inline-feedback {
    margin-top: 15px;
    height: 35px;
    opacity: 0;
    transition: opacity 0.6s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.inline-feedback.show {
    opacity: 1;
}

.feedback-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.feedback-status.correct {
    color: #10b981;
}

.feedback-status.incorrect {
    color: #ef4444;
}

.feedback-explanation {
    font-size: 14px;
    color: #64748b;
    text-align: center;
    line-height: 1.4;
}

.answers-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.answer-btn {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 20px;
    font-family: inherit;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.answer-btn:hover {
    border-color: #4f46e5;
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(79, 70, 229, 0.1);
}

.answer-btn:active {
    transform: translateY(0);
}

.answer-btn.correct {
    background: #10b981;
    border-color: #10b981;
    color: white;
}

.answer-btn.incorrect {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
}

.answer-btn.disabled {
    pointer-events: none;
    opacity: 0.6;
}

.multiplier {
    font-weight: 600;
}

.description {
    color: #64748b;
    font-size: 14px;
}

.answer-btn.correct .description,
.answer-btn.incorrect .description {
    color: rgba(255, 255, 255, 0.8);
}

.attribution {
    text-align: center;
    padding: 12px 20px;
    font-size: 12px;
    color: #64748b;
    border-top: 1px solid #f1f5f9;
    background: #f8fafc;
}

.attribution a {
    color: #4f46e5;
    text-decoration: none;
}

.attribution a:hover {
    text-decoration: underline;
}

.next-btn-container {
    padding: 20px;
    border-top: 1px solid #e2e8f0;
}

.next-btn {
    width: 100%;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 16px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease, opacity 0.4s ease;
    opacity: 0;
}

.next-btn.show {
    opacity: 1;
}

.next-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(79, 70, 229, 0.2);
}

/* Type colors */
.type-badge.normal { background: #A8A878; color: white; }
.type-badge.fire { background: #F08030; color: white; }
.type-badge.water { background: #6890F0; color: white; }
.type-badge.electric { background: #F8D030; color: black; }
.type-badge.grass { background: #78C850; color: white; }
.type-badge.ice { background: #98D8D8; color: black; }
.type-badge.fighting { background: #C03028; color: white; }
.type-badge.poison { background: #A040A0; color: white; }
.type-badge.ground { background: #E0C068; color: black; }
.type-badge.flying { background: #A890F0; color: white; }
.type-badge.psychic { background: #F85888; color: white; }
.type-badge.bug { background: #A8B820; color: white; }
.type-badge.rock { background: #B8A038; color: white; }
.type-badge.ghost { background: #705898; color: white; }
.type-badge.dragon { background: #7038F8; color: white; }
.type-badge.dark { background: #705848; color: white; }
.type-badge.steel { background: #B8B8D0; color: black; }
.type-badge.fairy { background: #EE99AC; color: white; }

/* Responsive design */
@media (max-width: 480px) {
    body {
        padding: 10px 30px 100px 30px;  /* 10px top/bottom, 30px left/right */
        align-items: flex-start;
        min-height: 100vh;
    }

    .app-container {
        margin: 0;
        border-radius: 12px;
        min-height: calc(100vh - 20px);
        max-height: calc(100vh - 20px);
        display: flex;
        flex-direction: column;
    }

    .header {
        padding: 8px 12px;
        flex-shrink: 0;
    }

    .title {
        font-size: 16px;
    }

    .title-icon {
        width: 18px;
        height: 18px;
    }

    .stats {
        gap: 15px;
    }

    .stat-value {
        font-size: 16px;
    }

    .main-content {
        padding: 15px 12px;
        gap: 15px;
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
    }

    .question-container {
        margin-bottom: 10px;
    }

    .matchup {
        flex-direction: column;
        gap: 8px;
        margin-bottom: 8px;
    }

    .arrow {
        transform: rotate(90deg);
        font-size: 16px;
    }

    .type-badge {
        min-width: 120px;
        padding: 10px 14px;
        font-size: 14px;
    }

    .type-icon {
        width: 20px;
        height: 20px;
    }

    .inline-feedback {
        margin-top: 8px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .feedback-explanation {
        font-size: 12px;
        line-height: 1.3;
    }

    .answers-container {
        gap: 6px;
        margin-bottom: 10px;
    }

    .answer-btn {
        padding: 16px 12px;
        font-size: 14px;
        border-radius: 10px;
    }

    .multiplier {
        font-size: 14px;
    }

    .description {
        font-size: 13px;
    }

    .next-btn-container {
        padding: 10px 12px;
        flex-shrink: 0;
    }

    .next-btn {
        padding: 16px;
        font-size: 14px;
        border-radius: 10px;
    }

    .attribution {
        padding: 6px 12px;
        font-size: 10px;
        flex-shrink: 0;
    }
}
