/* ============================================================================
   БАЗОВЫЕ СТИЛИ И СБРОС
   ============================================================================ */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    line-height: 1.6;
    color: #333;
}

/* ============================================================================
   КОНТЕЙНЕРЫ
   ============================================================================ */

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

.content-wrapper {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    margin-top: 20px;
    animation: fadeIn 0.5s ease-in;
}

/* ============================================================================
   НАВИГАЦИЯ
   ============================================================================ */

nav {
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 15px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav a {
    color: #667eea;
    text-decoration: none;
    margin: 0 15px;
    font-weight: 600;
    transition: color 0.3s ease;
    position: relative;
}

nav a:hover {
    color: #764ba2;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #764ba2;
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    color: #555;
    font-weight: 500;
}

/* ============================================================================
   ТИПОГРАФИКА
   ============================================================================ */

h1 {
    color: #667eea;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    text-align: center;
}

h2 {
    color: #764ba2;
    font-size: 1.8rem;
    margin: 2rem 0 1rem;
    font-weight: 600;
}

h3 {
    color: #555;
    font-size: 1.3rem;
    margin: 1.5rem 0 0.8rem;
    font-weight: 600;
}

p {
    margin-bottom: 1rem;
    color: #555;
    line-height: 1.8;
}

/* ============================================================================
   КАРТОЧКИ
   ============================================================================ */

.card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 20px;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.module-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.module-card:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: #667eea;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.module-card h3 {
    color: #667eea;
    margin-bottom: 10px;
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

/* ============================================================================
   КНОПКИ
   ============================================================================ */

.btn, button[type="submit"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    text-decoration: none;
    display: inline-block;
}

.btn:hover, button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn:active, button[type="submit"]:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.btn-secondary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.btn-success {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.btn-warning {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

/* ============================================================================
   ФОРМЫ
   ============================================================================ */

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 12px 15px;
    margin: 8px 0;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

/* ============================================================================
   АЛЕРТЫ И УВЕДОМЛЕНИЯ
   ============================================================================ */

.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin: 15px 0;
    animation: slideIn 0.3s ease;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

/* ============================================================================
   HERO СЕКЦИЯ
   ============================================================================ */

.hero {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 20px;
    margin-bottom: 40px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.2rem;
    color: #666;
    max-width: 800px;
    margin: 0 auto;
}

/* ============================================================================
   СЕКЦИИ КОНТЕНТА
   ============================================================================ */

.sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.section:hover {
    transform: translateY(-10px);
}

.section h2 {
    color: #667eea;
    margin-bottom: 15px;
}

/* ============================================================================
   ФУТЕР
   ============================================================================ */

footer {
    text-align: center;
    padding: 30px;
    color: white;
    margin-top: 40px;
}

footer p {
    color: rgba(255, 255, 255, 0.9);
}

/* ============================================================================
   ЗАГРУЗКА
   ============================================================================ */

#loading {
    text-align: center;
    padding: 40px;
    display: none;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

/* ============================================================================
   АНИМАЦИИ
   ============================================================================ */

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

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================================================
   АДАПТИВНОСТЬ
   ============================================================================ */

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .modules-grid {
        grid-template-columns: 1fr;
    }
    
    nav {
        flex-direction: column;
        gap: 10px;
    }
    
    .content-wrapper {
        padding: 20px;
    }
}

/* ============================================================================
   КАРТОЧКИ КУРСОВ
   ============================================================================ */

.courses-list {
    display: grid;
    gap: 25px;
    margin: 30px 0;
}

.course-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid transparent;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    border-color: #667eea;
}

.course-card h2 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.course-card p {
    color: #555;
    margin-bottom: 15px;
    line-height: 1.6;
}

.course-info {
    margin: 15px 0 20px;
    padding: 10px 0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.course-info span {
    color: #764ba2;
    font-weight: 600;
}

/* ============================================================================
   НАВИГАЦИЯ ПО КУРСУ
   ============================================================================ */

.course-navigation {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin: 40px 0;
}

.nav-card {
    text-align: center;
    padding: 30px 20px;
    transition: transform 0.3s ease;
}

.nav-card:hover {
    transform: translateY(-5px);
}

.nav-card h2 {
    margin-bottom: 15px;
    color: #667eea;
}

.nav-card p {
    margin-bottom: 20px;
    color: #555;
}

.course-description {
    margin-top: 40px;
}

.course-description h3 {
    color: #764ba2;
    margin-bottom: 15px;
}

.course-description ul {
    list-style-type: none;
    padding-left: 0;
}

.course-description li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    color: #555;
}

.course-description li:before {
    content: "▸ ";
    color: #667eea;
    font-weight: bold;
}