/* Additional CSS for code styling and enhancements */

.colab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--border-color);
}

.colab-button {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    background: linear-gradient(135deg, #F9AB00, #F57C00);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: var(--shadow);
}

.colab-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.code-preview {
    background: #282c34;
    border-radius: 8px;
    overflow: hidden;
    margin: var(--spacing-md) 0;
}

.code-preview pre {
    margin: 0;
    padding: var(--spacing-md);
    overflow-x: auto;
}

.code-preview code {
    color: #abb2bf;
    font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

.code-description {
    padding: var(--spacing-md);
    background: var(--bg-color);
    border-radius: 8px;
    margin-top: var(--spacing-sm);
}

.quiz-container {
    padding: var(--spacing-md);
}

.quiz-question {
    background: var(--bg-color);
    padding: var(--spacing-md);
    border-radius: 8px;
    margin-bottom: var(--spacing-md);
}

.quiz-options {
    list-style: none;
    margin-top: var(--spacing-sm);
}

.quiz-option {
    padding: var(--spacing-sm);
    margin: var(--spacing-xs) 0;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.quiz-option:hover {
    border-color: var(--primary-color);
    background: var(--bg-color);
}

.quiz-option.correct {
    border-color: #27ae60;
    background: rgba(39, 174, 96, 0.1);
}

.quiz-option.incorrect {
    border-color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}

.presentation-viewer {
    padding: var(--spacing-md);
}

.slide {
    background: var(--card-bg);
    padding: var(--spacing-xl);
    border-radius: 12px;
    min-height: 400px;
    margin-bottom: var(--spacing-md);
    box-shadow: var(--shadow-hover);
}

.slide h2 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
}

.slide-nav {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.slide-nav button {
    padding: var(--spacing-xs) var(--spacing-md);
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.slide-nav button:hover {
    background: #229954;
}

.slide-nav button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Loading animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;
}

/* Utility classes */
.text-center {
    text-align: center;
}

.mt-1 {
    margin-top: var(--spacing-xs);
}

.mt-2 {
    margin-top: var(--spacing-sm);
}

.mt-3 {
    margin-top: var(--spacing-md);
}

.mb-1 {
    margin-bottom: var(--spacing-xs);
}

.mb-2 {
    margin-bottom: var(--spacing-sm);
}

.mb-3 {
    margin-bottom: var(--spacing-md);
}

/* --- TOAST NOTIFICATIONS --- */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: white;
    color: #333;
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-left: 4px solid var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease-out forwards;
    min-width: 250px;
    font-weight: 500;
}

.toast.success {
    border-left-color: #27ae60;
}

.toast.info {
    border-left-color: #2980b9;
}

.toast.warning {
    border-left-color: #f39c12;
}

.toast.error {
    border-left-color: #c0392b;
}

.toast i {
    font-size: 1.2rem;
}

.toast.success i {
    color: #27ae60;
}

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

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast.hide {
    animation: slideOut 0.3s ease-in forwards;
}

/* --- PULSE ANIMATION FOR PRIMARY BUTTONS --- */
@keyframes pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(39, 174, 96, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(39, 174, 96, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(39, 174, 96, 0);
    }
}

.btn-pulse {
    animation: pulse-green 2s infinite;
}

.mark-complete-btn {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.mark-complete-btn:active {
    transform: scale(0.95);
}

/* --- PROGRESS BAR SHINE --- */
.progress-fill {
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-image: linear-gradient(-45deg,
            rgba(255, 255, 255, 0.2) 25%,
            transparent 25%,
            transparent 50%,
            rgba(255, 255, 255, 0.2) 50%,
            rgba(255, 255, 255, 0.2) 75%,
            transparent 75%,
            transparent);
    z-index: 1;
    background-size: 50px 50px;
    animation: move 2s linear infinite;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
    overflow: hidden;
}

@keyframes move {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 50px 50px;
    }
}

/* --- TAB TRANSITIONS --- */
.tab-panel {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.tab-panel.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- CARD HOVER LIFT --- */
.module-card,
.feature-card {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.module-card:hover,
.feature-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}