* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Стили для липкого футера */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Main занимает всё доступное пространство */
main {
    flex: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    background: #2c3e50;
    color: white;
    padding: 1rem 0;
    width: 100%;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-brand h2 {
    color: #3498db;
}

.nav-menu {
    display: flex;
    gap: 20px;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 3px;
    transition: background 0.3s;
}

.nav-menu a:hover {
    background: #34495e;
}

.logout-btn {
    background: #3498db;
}

.logout-btn:hover {
    background: #c0392b;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #3CBFE7 0%, #217da1 100%);
    color: white;
    border-radius: 10px;
    margin-bottom: 40px;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
}

.btn:hover {
    background: #2980b9; /* Оставляем как есть — хороший контрастный hover */
}

.btn-primary {
    background: #3CBFE7; /* Голубой из логотипа */
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: bold;
    transition: background 0.3s ease;
}

.btn-primary:hover {
    background: #2980b9; /* Темно-синий при наведении — контрастный */
    color: white;
}

.btn-secondary {
    background: #4CD8C0; /* Мятный цвет из логотипа (волна) */
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: bold;
    transition: background 0.3s ease;
}

.btn-secondary:hover {
    background: #3ABEAA; /* Темнее мятного — для hover */
    color: white;
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.feature {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

/* Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #3498db;
    margin-top: 10px;
}

/* EQ Dimensions */
.eq-dimensions {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin: 10px 0;
}

.dimensions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.dimension {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 10px 0;
}

.dimension .score {
    font-size: 1.5rem;
    font-weight: bold;
    color: #27ae60;
    margin-top: 10px;
}

/* Lessons */
.lessons-grid {
    display: grid;
    gap: 20px;
    margin-top: 30px;
}

.lesson-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.lesson-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.difficulty {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.difficulty.beginner {
    background: #d4edda;
    color: #155724;
}

.difficulty.intermediate {
    background: #fff3cd;
    color: #856404;
}

.difficulty.advanced {
    background: #f8d7da;
    color: #721c24;
}

.status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.status.completed {
    background: #d4edda;
    color: #155724;
}

.status.started {
    background: #fff3cd;
    color: #856404;
}

.status.not_started {
    background: #f8d7da;
    color: #721c24;
}

.lesson-meta {
    display: flex;
    justify-content: space-between;
    margin: 15px 0;
    font-size: 0.9rem;
    color: #666;
}

.lesson-actions {
    margin-top: 15px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

/* Footer - липкий футер */
.footer {
    background: #34495e;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: auto; /* Выталкивает футер вниз */
    width: 100%;
}

/* Admin Styles */
.admin-nav {
    background: #2c3e50;
    padding: 15px 0;
    margin-bottom: 30px;
}

.admin-nav a {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    margin: 0 10px;
    border-radius: 5px;
    transition: background 0.3s;
}

.admin-nav a:hover {
    background: #34495e;
}

.admin-nav a.active {
    background: #3498db;
}

.table-container {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table th {
    background: #f8f9fa;
    font-weight: bold;
}

.data-table tr:hover {
    background: #f8f9fa;
}

.status-active {
    color: #27ae60;
    font-weight: bold;
}

.status-inactive {
    color: #e74c3c;
    font-weight: bold;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.8rem;
}

/* Breadcrumb */
.breadcrumb {
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: #3498db;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Lesson Content */
.lesson-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.lesson-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.lesson-meta {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.lesson-meta span {
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.lesson-video, .lesson-text, .lesson-exercises {
    margin: 30px 0;
}

.lesson-exercises .exercise-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
}

/* Exercises Grid */
.exercises-grid {
    display: grid;
    gap: 20px;
    margin-top: 30px;
}

.exercise-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.exercise-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.exercise-type {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.exercise-type.test {
    background: #d4edda;
    color: #155724;
}

.exercise-type.simulation {
    background: #fff3cd;
    color: #856404;
}

.exercise-type.case {
    background: #d1ecf1;
    color: #0c5460;
}

.exercise-meta {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
    font-size: 0.9rem;
    color: #666;
}

.exercise-actions {
    margin-top: 15px;
}

.exercise-attempt {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

/* Profile */
.profile-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    margin-top: 30px;
}

.profile-sidebar {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    height: fit-content;
}

.profile-stats {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 15px;
}

.stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.stat-label {
    color: #666;
}

.stat-value {
    font-weight: bold;
    color: #3498db;
}

.profile-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.profile-section {
    border-bottom: 1px solid #eee;
}

.profile-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

/* Score Bars */
.score-bar {
    background: #ecf0f1;
    height: 20px;
    border-radius: 10px;
    margin: 10px 0;
    position: relative;
    overflow: hidden;
}

.score-fill {
    background: #27ae60;
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s ease;
}

.score-value {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    color: #2c3e50;
    font-weight: bold;
}

/* Error and Success Messages */
.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 12px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
}

/* Responsive */
@media (max-width: 768px) {
    .profile-container {
        grid-template-columns: 1fr;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .dimensions-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 10px;
    }
}