.challenge-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    border: 2px solid rgba(0, 255, 136, 0.3);
    backdrop-filter: blur(10px);
}

.challenge-card h2 {
    color: #00ff88;
    margin-bottom: 15px;
    font-size: 1.5em;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

.challenge-details {
    color: #fff;
    margin: 15px 0;
}

.challenge-details h3 {
    color: #00ff88;
    margin-bottom: 10px;
}

.challenge-details ul {
    list-style-type: none;
    padding: 0;
}

.challenge-details li {
    margin: 5px 0;
    padding-left: 20px;
    position: relative;
}

.challenge-details li:before {
    content: '⚡';
    position: absolute;
    left: 0;
    color: #00ff88;
}

.complete-btn {
    background: #00ff88;
    color: #1a1a2e;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    margin-top: 15px;
    width: 100%;
}

.complete-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 136, 0.3);
}

.level-up-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 255, 136, 0.9);
    color: #1a1a2e;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 255, 136, 0.3);
    animation: slideIn 0.5s ease-out;
    z-index: 1000;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.level-up-notification h2 {
    margin: 0 0 10px 0;
    font-size: 1.5em;
}

.level-up-notification p {
    margin: 0;
    font-size: 1.1em;
}

/* Experience Bar Styles */
.experience-bar {
    width: 100%;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
    border: 2px solid rgba(0, 255, 136, 0.3);
}

.experience-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ff88, #00cc6a);
    transition: width 0.3s ease;
    border-radius: 10px;
    position: relative;
}

.experience-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.1) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.1) 75%,
        transparent 75%,
        transparent
    );
    background-size: 20px 20px;
    animation: moveStripes 1s linear infinite;
}

@keyframes moveStripes {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 20px 0;
    }
}

.chapter-title {
    color: var(--primary-color);
    font-size: 1.1em;
    margin: 10px 0;
    font-style: italic;
}

.study-content {
    background: var(--card-background);
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    border: 1px solid var(--primary-color);
    transition: all 0.3s ease;
    opacity: 1;
    max-height: 1000px;
    overflow: hidden;
}

.study-content.hidden {
    opacity: 0;
    max-height: 0;
    margin: 0;
    padding: 0;
    border: none;
}

.questions-section {
    margin-top: 20px;
    border-top: 2px solid var(--primary-color);
    padding-top: 20px;
    transition: all 0.5s ease;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
}

.questions-section.visible {
    opacity: 1;
    max-height: 2000px; /* Adjust based on your content */
    overflow: visible;
}

.question-card {
    background: var(--card-background);
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    border: 1px solid var(--primary-color);
    opacity: 0;
    transform: translateY(20px);
    animation: slideInQuestion 0.5s ease forwards;
}

@keyframes slideInQuestion {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.timer {
    font-size: 1.5em;
    color: var(--primary-color);
    text-align: center;
    margin: 15px 0;
    font-weight: bold;
    transition: color 0.3s ease;
}

.start-btn {
    background: var(--primary-color);
    color: var(--background-color);
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    width: 100%;
}

.start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--shadow-color);
    background: var(--primary-hover);
}

.question-card h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 15px 0;
}

.option-btn {
    background: var(--card-background);
    border: 1px solid var(--primary-color);
    color: var(--text-color);
    padding: 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1em;
    position: relative;
    overflow: hidden;
}

.option-btn:hover {
    background: rgba(0, 255, 136, 0.1);
    transform: translateY(-2px);
}

.option-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.option-btn:active:before {
    opacity: 0.1;
}

.option-btn.correct {
    background: rgba(0, 255, 136, 0.2);
    border-color: #00ff88;
    color: #00ff88;
    pointer-events: none;
}

.option-btn.incorrect {
    background: rgba(255, 0, 0, 0.2);
    border-color: #ff0000;
    color: #ff0000;
    pointer-events: none;
}

.option-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.explanation {
    background: var(--card-background);
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    border: 1px solid var(--primary-color);
}

.explanation p {
    white-space: pre-line;
    color: var(--text-color);
}

/* Animation for timer */
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

.timer.ending {
    color: #ff0000;
    animation: pulse 1s infinite;
}

/* Question feedback styles */
.feedback {
    margin: 15px 0;
    padding: 10px;
    border-radius: 5px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.success-feedback, .error-feedback {
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
    font-weight: bold;
    text-align: center;
}

.success-feedback {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid #00ff88;
    color: #00ff88;
}

.error-feedback {
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid #ff0000;
    color: #ff0000;
}

/* Completion bonus notification */
.completion-bonus {
    background: linear-gradient(45deg, #00ff88, #00cc6a);
    color: #1a1a2e;
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
    text-align: center;
    animation: slideIn 0.5s ease-out;
}

.completion-bonus h3 {
    margin: 0;
    font-size: 1.2em;
}

/* Additional animations */
@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

.rank-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: rgba(26, 26, 46, 0.8);
    border-radius: 20px;
    margin: 20px 0;
    border: 2px solid var(--primary-color);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.rank-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 255, 136, 0.2);
}

#rank-image {
    width: 150px;
    height: 150px;
    object-fit: contain;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 15px rgba(0, 255, 136, 0.4));
    transition: all 0.3s ease;
}

#rank-image:hover {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 0 25px rgba(0, 255, 136, 0.6));
}

.rank-name {
    font-size: 2em;
    color: var(--primary-color);
    font-weight: bold;
    text-align: center;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin: 10px 0;
    text-shadow: 0 0 15px rgba(0, 255, 136, 0.4);
    transition: all 0.3s ease;
}

.rank-name:hover {
    text-shadow: 0 0 30px rgba(0, 255, 136, 0.8);
    letter-spacing: 5px;
}

.rank-progress {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.rank-progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.rank-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, 
        var(--primary-color), 
        var(--primary-hover),
        var(--primary-color));
    background-size: 200% 100%;
    animation: gradientMove 3s linear infinite;
    transition: width 0.5s ease-out;
}

@keyframes gradientMove {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.rank-progress-text {
    color: var(--text-color);
    font-size: 1.1em;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

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

    #rank-image {
        width: 120px;
        height: 120px;
    }
    
    .rank-name {
        font-size: 1.5em;
        letter-spacing: 2px;
    }

    .rank-name:hover {
        letter-spacing: 3px;
    }
}

@media (max-width: 480px) {
    #rank-image {
        width: 100px;
        height: 100px;
    }
    
    .rank-name {
        font-size: 1.2em;
        letter-spacing: 1px;
    }

    .rank-progress-bar {
        height: 10px;
    }
}