:root {
    --bts-purple: #6A0DAD;
    --bts-purple-light: #9B59B6;
    --bts-purple-pastel: #E8D4F2;
    --bts-purple-bg: #F8F4FF;
    --text-dark: #2C2C2C;
    --text-light: #666;
    --white: #FFFFFF;
    --success: #4CAF50;
    --error: #F44336;
}

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

/* BTS Quiz specific styles */
.page-container {
    background: linear-gradient(135deg, var(--bts-purple-bg) 0%, var(--bts-purple-pastel) 100%);
}

.quiz-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(106, 13, 173, 0.1);
}

.quiz-screen {
    display: none;
    width: 100%;
    animation: fadeIn 0.5s ease-in-out;
}

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

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

/* Start Screen */
.start-content {
    background: var(--white);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(106, 13, 173, 0.1);
    text-align: center;
}

.quiz-title {
    font-size: 3em;
    color: var(--bts-purple);
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(106, 13, 173, 0.2);
}

.quiz-subtitle {
    font-size: 1.5em;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.quiz-description {
    font-size: 1.1em;
    color: var(--text-light);
    margin-bottom: 30px;
    line-height: 1.6;
}

.difficulty-selection {
    margin: 30px 0;
}

.difficulty-selection h3 {
    font-size: 1.3em;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.difficulty-buttons {
    display: grid;
    gap: 15px;
    margin-bottom: 30px;
}

.difficulty-btn {
    background: linear-gradient(135deg, var(--bts-purple) 0%, var(--bts-purple-light) 100%);
    color: var(--white);
    border: none;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.difficulty-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(106, 13, 173, 0.3);
}

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

.difficulty-name {
    font-size: 1.3em;
    font-weight: bold;
}

.difficulty-desc {
    font-size: 0.9em;
    opacity: 0.9;
}

.difficulty-points {
    font-size: 0.85em;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    margin-top: 5px;
}

.quiz-info {
    background: var(--bts-purple-bg);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 15px;
}

.quiz-info p {
    margin: 0;
    color: var(--text-dark);
}

/* Quiz Screen */
.quiz-header {
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(106, 13, 173, 0.1);
}

.progress-container {
    margin-bottom: 15px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-dark);
}

.progress-bar {
    background: var(--bts-purple-bg);
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--bts-purple) 0%, var(--bts-purple-light) 100%);
    border-radius: 6px;
    transition: width 0.5s ease;
    width: 0%;
}

.quiz-stats {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.difficulty-badge {
    background: var(--bts-purple);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
}

.quiz-content {
    background: var(--white);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(106, 13, 173, 0.1);
}

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

.question-text {
    font-size: 1.4em;
    color: var(--text-dark);
    line-height: 1.6;
}

.answers-container {
    display: grid;
    gap: 12px;
}

.answer-btn {
    background: var(--bts-purple-bg);
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 15px 20px;
    text-align: left;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-dark);
}

.answer-btn:hover:not(.selected):not(.correct):not(.incorrect) {
    background: var(--bts-purple-pastel);
    border-color: var(--bts-purple-light);
}

.answer-btn.selected {
    background: var(--bts-purple-light);
    color: var(--white);
    border-color: var(--bts-purple);
}

.answer-btn.correct {
    background: var(--success);
    color: var(--white);
    border-color: var(--success);
    animation: pulse 0.5s ease;
}

.answer-btn.incorrect {
    background: var(--error);
    color: var(--white);
    border-color: var(--error);
    animation: shake 0.5s ease;
}

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.answer-btn:disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

.quiz-footer {
    text-align: right;
}

.next-btn {
    background: linear-gradient(135deg, var(--bts-purple) 0%, var(--bts-purple-light) 100%);
    color: var(--white);
    border: none;
    border-radius: 12px;
    padding: 12px 30px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.next-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(106, 13, 173, 0.3);
}

/* Result Screen */
.result-content {
    text-align: center;
}

.result-title {
    font-size: 2.5em;
    color: var(--bts-purple);
    margin-bottom: 30px;
}

.result-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(106, 13, 173, 0.2);
    max-width: 500px;
    margin: 0 auto;
}

.card-header {
    background: linear-gradient(135deg, var(--bts-purple) 0%, var(--bts-purple-light) 100%);
    color: var(--white);
    padding: 20px;
}

.card-header h3 {
    font-size: 1.8em;
    margin: 0;
}

.card-body {
    padding: 30px;
}

.score-display {
    margin-bottom: 25px;
}

.score-label {
    font-size: 1.1em;
    color: var(--text-light);
    margin-bottom: 10px;
}

.score-value {
    font-size: 2.5em;
    font-weight: bold;
    color: var(--bts-purple);
}

.grade-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 25px 0;
}

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

.grade-title {
    font-size: 1.8em;
    font-weight: bold;
    color: var(--bts-purple);
}

.grade-message {
    font-size: 1.1em;
    color: var(--text-light);
    line-height: 1.6;
    margin: 20px 0;
    padding: 15px;
    background: var(--bts-purple-bg);
    border-radius: 12px;
}

.correct-answers {
    font-size: 1.1em;
    color: var(--text-dark);
    padding: 10px;
    background: var(--bts-purple-bg);
    border-radius: 8px;
}

.card-footer {
    padding: 0 30px 30px;
}

.share-section {
    margin-bottom: 25px;
}

.share-section h4 {
    font-size: 1.1em;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--white);
}

.share-btn.twitter {
    background: #000000;
}

.share-btn.twitter:hover {
    background: #333333;
}

.share-btn.facebook {
    background: #1877F2;
}

.share-btn.facebook:hover {
    background: #166FE5;
}

.share-btn.copy {
    background: var(--bts-purple);
}

.share-btn.copy:hover {
    background: var(--bts-purple-light);
}

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

.action-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.action-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn.primary {
    background: linear-gradient(135deg, var(--bts-purple) 0%, var(--bts-purple-light) 100%);
    color: var(--white);
}

.action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(106, 13, 173, 0.3);
}

.action-btn.secondary {
    background: var(--bts-purple-bg);
    color: var(--bts-purple);
    border: 2px solid var(--bts-purple);
}

.action-btn.secondary:hover {
    background: var(--bts-purple);
    color: var(--white);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--white);
    border-radius: 20px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
}

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

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2em;
    color: var(--text-light);
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: var(--bts-purple);
}

.modal-content h3 {
    color: var(--bts-purple);
    font-size: 1.8em;
    margin-bottom: 25px;
    text-align: center;
}

.grade-list {
    display: grid;
    gap: 15px;
}

.grade-item {
    background: var(--bts-purple-bg);
    border-radius: 12px;
    padding: 15px;
    border-left: 4px solid var(--bts-purple-light);
    transition: all 0.3s ease;
}

.grade-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(106, 13, 173, 0.1);
}

.grade-item.legendary {
    background: linear-gradient(135deg, var(--bts-purple-bg) 0%, var(--bts-purple-pastel) 100%);
    border-left-color: var(--bts-purple);
    border-left-width: 6px;
}

.grade-name {
    font-size: 1.3em;
    font-weight: bold;
    color: var(--bts-purple);
    margin-bottom: 5px;
}

.grade-range {
    font-size: 0.95em;
    color: var(--text-light);
    margin-bottom: 8px;
}

.grade-desc {
    font-size: 1em;
    color: var(--text-dark);
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .quiz-container {
        padding: 15px;
    }

    .start-content {
        padding: 25px;
    }

    .quiz-title {
        font-size: 2.2em;
    }

    .quiz-subtitle {
        font-size: 1.2em;
    }

    .difficulty-btn {
        padding: 15px;
    }

    .quiz-content {
        padding: 20px;
    }

    .question-text {
        font-size: 1.2em;
    }

    .answer-btn {
        font-size: 1em;
        padding: 12px 15px;
    }

    .result-card {
        margin: 0 10px;
    }

    .score-value {
        font-size: 2em;
    }

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

    .share-buttons {
        flex-direction: column;
    }

    .share-btn {
        width: 100%;
        justify-content: center;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-btn {
        width: 100%;
    }

    .modal-content {
        width: 95%;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .quiz-title {
        font-size: 1.8em;
    }

    .quiz-subtitle {
        font-size: 1.1em;
    }

    .quiz-stats {
        flex-direction: column;
        gap: 10px;
    }

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