/**
 * LearnWise Frontend Styles
 */

:root {
    --lw-primary: #6366F1;
    --lw-secondary: #8B5CF6;
    --lw-accent: #10B981;
    --lw-danger: #EF4444;
    --lw-warning: #F59E0B;
    --lw-bg: #F9FAFB;
    --lw-surface: #FFFFFF;
    --lw-text: #111827;
    --lw-text-secondary: #6B7280;
    --lw-border: #E5E7EB;
}

/* Base Styles */
.learnwise-page {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--lw-text);
}

.learnwise-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Buttons */
.learnwise-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: var(--lw-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.learnwise-btn:hover {
    background: #4F46E5;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.learnwise-btn-secondary {
    background: var(--lw-surface);
    color: var(--lw-text);
    border: 2px solid var(--lw-border);
}

.learnwise-btn-secondary:hover {
    background: var(--lw-bg);
    box-shadow: none;
}

.learnwise-btn-success {
    background: var(--lw-accent);
}

.learnwise-btn-success:hover {
    background: #059669;
}

.learnwise-btn-danger {
    background: var(--lw-danger);
}

.learnwise-btn-danger:hover {
    background: #DC2626;
}

/* Cards */
.learnwise-card {
    background: var(--lw-surface);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.learnwise-card-hover:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* Forms */
.learnwise-form .form-group {
    margin-bottom: 20px;
}

.learnwise-form label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--lw-text);
}

.learnwise-form input[type="text"],
.learnwise-form input[type="email"],
.learnwise-form input[type="password"],
.learnwise-form input[type="number"],
.learnwise-form input[type="url"],
.learnwise-form textarea,
.learnwise-form select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--lw-border);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.learnwise-form input:focus,
.learnwise-form textarea:focus,
.learnwise-form select:focus {
    outline: none;
    border-color: var(--lw-primary);
}

/* Progress Bars */
.learnwise-progress {
    width: 100%;
    height: 8px;
    background: var(--lw-border);
    border-radius: 4px;
    overflow: hidden;
}

.learnwise-progress-bar {
    height: 100%;
    background: var(--lw-primary);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.learnwise-progress-success {
    background: var(--lw-accent);
}

/* Badges */
.learnwise-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.learnwise-badge-primary {
    background: #EEF2FF;
    color: var(--lw-primary);
}

.learnwise-badge-success {
    background: #D1FAE5;
    color: #059669;
}

.learnwise-badge-warning {
    background: #FEF3C7;
    color: #D97706;
}

.learnwise-badge-danger {
    background: #FEE2E2;
    color: #DC2626;
}

/* Alerts */
.learnwise-alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.learnwise-alert-success {
    background: #D1FAE5;
    color: #065F46;
}

.learnwise-alert-error {
    background: #FEE2E2;
    color: #991B1B;
}

.learnwise-alert-warning {
    background: #FEF3C7;
    color: #92400E;
}

.learnwise-alert-info {
    background: #DBEAFE;
    color: #1E40AF;
}

/* Loading States */
.learnwise-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.learnwise-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid var(--lw-border);
    border-top-color: var(--lw-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Empty States */
.learnwise-empty {
    text-align: center;
    padding: 64px 24px;
}

.learnwise-empty-icon {
    font-size: 64px;
    margin-bottom: 24px;
}

.learnwise-empty h3 {
    font-size: 20px;
    margin: 0 0 12px;
    color: var(--lw-text);
}

.learnwise-empty p {
    color: var(--lw-text-secondary);
    margin: 0 0 24px;
}

/* Course Content Protection */
.learnwise-access-denied {
    text-align: center;
    padding: 80px 24px;
    background: var(--lw-surface);
    border-radius: 16px;
}

.learnwise-lock-icon {
    color: var(--lw-text-secondary);
    margin-bottom: 24px;
}

/* Video Player Styles */
.learnwise-video-player {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    background: #000;
}

.learnwise-video-player iframe,
.learnwise-video-player video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
}

/* Audio Player */
.learnwise-audio-player {
    background: var(--lw-bg);
    padding: 20px;
    border-radius: 12px;
}

.learnwise-audio-player audio {
    width: 100%;
}

/* Grid Layouts */
.learnwise-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.learnwise-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.learnwise-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

@media (max-width: 768px) {
    .learnwise-grid-2,
    .learnwise-grid-3,
    .learnwise-grid-4 {
        grid-template-columns: 1fr;
    }
}

/* Utility Classes */
.learnwise-text-center { text-align: center; }
.learnwise-text-left { text-align: left; }
.learnwise-text-right { text-align: right; }
.learnwise-mt-0 { margin-top: 0; }
.learnwise-mt-1 { margin-top: 0.5rem; }
.learnwise-mt-2 { margin-top: 1rem; }
.learnwise-mt-3 { margin-top: 1.5rem; }
.learnwise-mt-4 { margin-top: 2rem; }
.learnwise-mb-0 { margin-bottom: 0; }
.learnwise-mb-1 { margin-bottom: 0.5rem; }
.learnwise-mb-2 { margin-bottom: 1rem; }
.learnwise-mb-3 { margin-bottom: 1.5rem; }
.learnwise-mb-4 { margin-bottom: 2rem; }
