* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    background: #ffffff;
    margin: 0;
    padding: 0;
    font-family: 'Prompt', sans-serif;
    color: #333;
    font-size: 16px;
    line-height: 1.6;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

.container {
    max-width: 100%;
    margin: 0;
    background: #ffffff;
    border-radius: 0;
    padding: 20px;
    box-shadow: none;
}

/* Header & Title */
.header {
    text-align: center;
    margin-bottom: 25px;
}

.title {
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    color: #2c3e50;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

.subtitle {
    color: #636e72;
    font-size: 0.95em;
    margin-bottom: 15px;
}

/* Image */
.image-wrapper {
    text-align: center;
    margin-bottom: 20px;
}

.image-wrapper img {
    width: 100%;
    max-width: 280px;
    height: auto;
    border-radius: 0;
    box-shadow: none;
}

/* Paragraph */
p {
    font-size: 1rem;
    line-height: 1.8;
    text-indent: 1em;
    margin-bottom: 1.5em;
    text-align: justify;
    padding: 0 5px;
}

/* Tooltip System */
.tooltip {
    position: relative;
    border-bottom: 1px dotted #3498db;
    cursor: pointer;
    color: #2980b9;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tooltip:active {
    background-color: #e3f2fd;
    border-radius: 4px;
    padding: 2px 4px;
    margin: 0 1px;
}

.tooltip.show-tooltip::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: all;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: fixed;
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 12px 16px;
    border-radius: 12px;
    max-width: 280px;
    white-space: normal;
    word-wrap: break-word;
    top: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    font-size: 0.9rem;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

@media (hover: hover) {
    .tooltip:hover::after {
        opacity: 1;
        transform: translateX(-50%) translateY(-50%);
    }
}

.tooltip-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 999;
    display: none;
}

/* Span */
span {
    margin-right: 3px;
}

/* Selection Protection */
.container * {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

::selection {
    background: transparent;
}

::-moz-selection {
    background: transparent;
}

/* Click to Read Button */
.click-to-read {
    display: inline-flex;
    align-items: center;
    padding: 12px 20px;
    background-color: #4f46e5;
    color: #fff;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.click-to-read i {
    margin-right: 8px;
    font-size: 1.2rem;
}

.click-to-read:hover {
    background-color: #3730a3;
}

/* Score Board */
.score-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 25px;
}

.score-card {
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    padding: 15px 8px;
    border-radius: 16px;
    color: white;
    text-align: center;
    font-weight: 600;
    box-shadow: 0 8px 25px rgba(108, 92, 231, 0.25);
}

.score-number {
    font-size: 1.4em;
    display: block;
    margin-bottom: 3px;
    font-weight: 700;
}

.score-label {
    font-size: 0.75em;
    opacity: 0.9;
}

/* Question Section */
.question-section {
    background: #f8f9fa;
    border-radius: 20px;
    padding: 25px 20px;
    margin-bottom: 25px;
    border: 2px solid #e9ecef;
    text-align: center;
}

.question-text {
    font-size: 1.1em;
    color: #2d3436;
    margin-bottom: 15px;
    font-weight: 500;
}

.vocabulary-word {
    font-size: 2.2em;
    color: #6c5ce7;
    font-weight: 800;
    margin: 20px 0;
    padding: 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border: 2px solid #e9ecef;
    letter-spacing: 1px;
}

.word-info {
    background: rgba(108, 92, 231, 0.08);
    padding: 12px;
    border-radius: 12px;
    margin: 15px 0;
    border-left: 4px solid #6c5ce7;
}

.word-type {
    color: #6c5ce7;
    font-weight: 500;
    font-size: 0.9em;
}

/* Choices Grid */
.choices-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 20px;
}

.choice-btn {
    padding: 18px 16px;
    font-size: 1.05em;
    border: 2px solid #6c5ce7;
    border-radius: 16px;
    background: white;
    color: #6c5ce7;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    text-align: left;
    position: relative;
    overflow: hidden;
    word-wrap: break-word;
    line-height: 1.4;
}

.choice-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    transition: left 0.3s ease;
    z-index: -1;
}

.choice-btn:hover:before {
    left: 0;
}

.choice-btn:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 92, 231, 0.3);
}

.choice-btn:active {
    transform: translateY(0);
}

/* Result Message */
.result-message {
    padding: 18px;
    border-radius: 16px;
    margin: 20px 0;
    font-size: 1.1em;
    font-weight: 600;
    text-align: center;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.correct {
    background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(0, 184, 148, 0.3);
}

.incorrect {
    background: linear-gradient(135deg, #e17055 0%, #fd79a8 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(225, 112, 85, 0.3);
}

/* Restart Button */
.restart-btn {
    background: linear-gradient(135deg, #fd79a8 0%, #fdcb6e 100%);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.restart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(253, 121, 168, 0.4);
}

/* Progress Section */
.progress-section {
    margin-top: 25px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    margin: 15px 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6c5ce7, #a29bfe);
    transition: width 0.5s ease;
    border-radius: 4px;
}

.stats {
    text-align: center;
    color: #636e72;
    margin-top: 12px;
    font-size: 0.9em;
}

/* Database Info */
.database-info {
    background: rgba(108, 92, 231, 0.08);
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 20px;
    text-align: center;
    color: #6c5ce7;
    font-weight: 500;
    font-size: 0.9em;
}

/* Game Completed */
.game-completed {
    background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
    color: white;
    padding: 25px;
    border-radius: 20px;
    text-align: center;
    margin: 20px 0;
    box-shadow: 0 8px 25px rgba(0, 184, 148, 0.3);
}

.final-score {
    font-size: 2.5em;
    font-weight: 800;
    margin: 15px 0;
}

.grade {
    font-size: 1.8em;
    margin: 10px 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    body {
        padding: 0;
        font-size: 15px;
    }

    .container {
        padding: 16px;
    }

    .title {
        font-size: 1.2rem;
        margin-bottom: 16px;
    }

    p {
        font-size: 0.95rem;
        line-height: 1.7;
        text-indent: 0.8em;
        margin-bottom: 1.2em;
        padding: 0 2px;
    }

    .tooltip::after {
        max-width: 250px;
        font-size: 0.85rem;
        padding: 10px 14px;
    }

    .click-to-read {
        font-size: 0.9rem;
        padding: 10px 16px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0;
        font-size: 14px;
    }

    .container {
        padding: 12px;
    }

    .title {
        font-size: 1.1rem;
        margin-bottom: 14px;
    }

    p {
        font-size: 0.9rem;
        line-height: 1.6;
        text-indent: 0.5em;
        margin-bottom: 1em;
        padding: 0;
    }

    .tooltip::after {
        max-width: 220px;
        font-size: 0.8rem;
        padding: 8px 12px;
    }

    .vocabulary-word {
        font-size: 1.8em;
        padding: 15px;
    }

    .score-board {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .score-card {
        padding: 12px 6px;
    }

    .score-number {
        font-size: 1.2em;
    }

    .score-label {
        font-size: 0.7em;
    }

    .choices-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .choice-btn {
        padding: 15px 12px;
        font-size: 0.95em;
    }
}