/* Grammar Practice Common Styles
   Shared styles for all grammar practice/quiz pages
*/

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    color: #e0e0e0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    line-height: 1.6;
}

/* Main Container */
.container {
    width: 100%;
    max-width: 800px;
    background: rgba(30, 30, 30, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(218, 165, 32, 0.3);
    overflow: hidden;
}

/* Header */
.header {
    background: linear-gradient(135deg, #daa520, #b8860b);
    padding: 30px;
    text-align: center;
    color: #0a0a0a;
}

.header h1 {
    font-size: 2em;
    margin-bottom: 10px;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 30px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    overflow: hidden;
    margin-top: 20px;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, #2c5f2d, #4a8c4e);
    width: 0%;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

/* Content Area */
.content {
    padding: 40px;
}

/* Question Container */
.question-container {
    display: none;
    animation: fadeIn 0.5s ease;
}

.question-container.active {
    display: block;
}

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

/* Question Text */
.question {
    font-size: 1.3em;
    margin-bottom: 30px;
    color: #daa520;
    font-weight: 500;
}

/* Options Grid */
.options {
    display: grid;
    gap: 15px;
}

.option {
    padding: 20px;
    background: rgba(50, 50, 50, 0.5);
    border: 2px solid rgba(218, 165, 32, 0.2);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1em;
}

.option:hover:not(.disabled) {
    background: rgba(218, 165, 32, 0.1);
    border-color: #daa520;
    transform: translateX(5px);
}

.option.selected {
    border-color: #daa520;
    background: rgba(218, 165, 32, 0.2);
}

.option.correct {
    border-color: #4a8c4e;
    background: rgba(74, 140, 78, 0.2);
}

.option.incorrect {
    border-color: #c0392b;
    background: rgba(192, 57, 43, 0.2);
}

.option.disabled {
    cursor: default;
    opacity: 0.8;
}

/* Feedback */
.feedback {
    margin-top: 25px;
    padding: 20px;
    border-radius: 10px;
    display: none;
    animation: slideIn 0.4s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feedback.show {
    display: block;
}

.feedback.correct {
    background: rgba(74, 140, 78, 0.1);
    border: 1px solid #4a8c4e;
}

.feedback.incorrect {
    background: rgba(192, 57, 43, 0.1);
    border: 1px solid #c0392b;
}

/* Explanation Box */
.explanation {
    margin-top: 15px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-left: 3px solid #daa520;
    border-radius: 5px;
    font-size: 1.05em;
    line-height: 1.7;
}

/* Next Button */
.next-button {
    margin-top: 25px;
    padding: 15px 40px;
    background: linear-gradient(135deg, #daa520, #b8860b);
    color: #0a0a0a;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: none;
}

.next-button.show {
    display: inline-block;
}

.next-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(218, 165, 32, 0.4);
}

/* Score Display */
.score-display {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.2em;
    color: #daa520;
}

/* Completion Screen */
.completion-screen {
    display: none;
    text-align: center;
    padding: 40px;
    animation: fadeIn 0.5s ease;
}

.completion-screen.show {
    display: block;
}

.final-score {
    font-size: 3em;
    color: #daa520;
    margin: 20px 0;
    font-weight: bold;
}

.grade {
    font-size: 2em;
    margin: 20px 0;
}

/* Restart Button */
.restart-button {
    padding: 15px 40px;
    background: linear-gradient(135deg, #daa520, #b8860b);
    color: #0a0a0a;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 30px;
}

.restart-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(218, 165, 32, 0.4);
}

/* Input Fields (for fill-in-the-blank) */
.input-field {
    padding: 15px;
    font-size: 1.1em;
    border: 2px solid rgba(218, 165, 32, 0.3);
    border-radius: 8px;
    background: rgba(50, 50, 50, 0.5);
    color: #e0e0e0;
    width: 100%;
    margin-top: 15px;
    transition: border-color 0.3s ease;
}

.input-field:focus {
    outline: none;
    border-color: #daa520;
}

/* Submit Button */
.submit-button {
    margin-top: 20px;
    padding: 15px 40px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(52, 152, 219, 0.4);
}

/* Hint Button */
.hint-button {
    margin-top: 15px;
    padding: 10px 25px;
    background: rgba(155, 89, 182, 0.2);
    border: 2px solid #9b59b6;
    color: #9b59b6;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hint-button:hover {
    background: rgba(155, 89, 182, 0.3);
}

/* Hint Text */
.hint-text {
    margin-top: 15px;
    padding: 15px;
    background: rgba(155, 89, 182, 0.1);
    border-left: 3px solid #9b59b6;
    border-radius: 5px;
    display: none;
}

.hint-text.show {
    display: block;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.5em;
    }

    .content {
        padding: 25px;
    }

    .question {
        font-size: 1.1em;
    }

    .option {
        padding: 15px;
        font-size: 1em;
    }

    .final-score {
        font-size: 2.5em;
    }

    .grade {
        font-size: 1.5em;
    }
}
