/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --secondary: #ec4899;
    --dark: #0f172a;
    --light: #f8fafc;
    --white: #ffffff;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-500: #6b7280;
    --gray-800: #1f2937;
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 12px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--dark);
}

h1 { font-size: 3rem; letter-spacing: -0.025em; }
h2 { font-size: 2.25rem; letter-spacing: -0.025em; }
h3 { font-size: 1.5rem; }
p { color: var(--gray-500); margin-bottom: 1rem; }
a { text-decoration: none; color: inherit; transition: var(--transition); }

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.text-center { text-align: center; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.4);
}

.btn-secondary {
    background: var(--white);
    color: var(--dark);
    border: 1px solid var(--gray-200);
}

.btn-secondary:hover {
    background: var(--gray-100);
    border-color: var(--gray-300);
    transform: translateY(-2px);
}

.btn-danger {
    background: #ef4444;
    color: white;
}
.btn-danger:hover { background: #dc2626; }

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Auth Pages & Forms */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e0e7ff 0%, #fae8ff 100%);
    padding: 1rem;
}

.auth-box {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
    animation: fadeIn 0.5s ease-out;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    background: var(--gray-100);
    transition: var(--transition);
    font-family: inherit;
    font-size: 1rem;
}

.form-input:focus {
    outline: none;
    background: var(--white);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Layout Header */
header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Hero Section */
.hero {
    padding: 6rem 0;
    text-align: center;
    background: radial-gradient(circle at top right, #e0e7ff, transparent 40%),
                radial-gradient(circle at bottom left, #fae8ff, transparent 40%);
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero p {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

/* Dashboard & Cards */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.card {
    background: var(--white);
    border-radius: 16px;
    border: 1px solid var(--gray-100);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(79, 70, 229, 0.2);
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.card-desc {
    flex-grow: 1;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-100);
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* Progress Bar */
.progress-container {
    width: 100%;
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    margin: 1rem 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    border-radius: 4px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Lesson List */
.lesson-item {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.lesson-item:hover {
    border-color: var(--primary);
    background: #fdfdff;
}

.lesson-item.completed {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.lesson-item.completed .lesson-title {
    color: #166534;
    text-decoration: line-through;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .container { padding: 0 1rem; }
    .grid-container { grid-template-columns: 1fr; }
}
