/* ===== БАЗОВЫЕ СТИЛИ ===== */
:root {
    /* Цветовая палитра */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --accent: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    
    /* Текстовые цвета */
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    
    /* Фоны */
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --bg-dark: #111827;
    
    /* Градиенты */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-accent: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    
    /* Тени */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Скругления */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    
    /* Анимации */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== НАВИГАЦИЯ ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    box-shadow: var(--shadow-md);
    z-index: 1000;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.75rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    transition: var(--transition-base);
}

.logo i {
    font-size: 1.75rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.nav-menu {
    display: flex;
    gap: 1.5rem;
    flex: 1;
    justify-content: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transition: var(--transition-base);
    position: relative;
}

.nav-link:hover {
    color: var(--primary);
    background: var(--bg-tertiary);
}

.nav-link.active {
    color: var(--primary);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -0.25rem;
    left: 50%;
    transform: translateX(-50%);
    width: 0.5rem;
    height: 0.5rem;
    background: var(--primary);
    border-radius: 50%;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-control {
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
}

.nav-control:hover {
    background: var(--bg-tertiary);
    color: var(--primary);
    transform: translateY(-2px);
}

.slide-indicator {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    min-width: 6rem;
    text-align: center;
}

/* ===== КОНТЕЙНЕР СЛАЙДОВ ===== */
.slides-container {
    min-height: 100vh;
    padding-top: 5rem;
}

.slide {
    display: none;
    min-height: calc(100vh - 5rem);
    padding: 2rem;
    animation: slideIn 0.5s ease-out;
}

.slide.active {
    display: block;
}

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

.slide-content {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* ===== ШАПКА СЛАЙДА ===== */
.slide-header {
    text-align: center;
    padding: 2rem 0;
    position: relative;
}

.slide-number {
    position: absolute;
    top: 0;
    left: 0;
    font-size: 6rem;
    font-weight: 800;
    color: rgba(99, 102, 241, 0.05);
    line-height: 1;
    user-select: none;
}

.slide-title {
    font-size: 3.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    font-family: 'Montserrat', sans-serif;
}

.slide-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* ===== ТЕЛО СЛАЙДА ===== */
.slide-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

/* ===== КОЛОНКИ ===== */
.columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ===== КАРТОЧКИ КОНЦЕПЦИЙ ===== */
.concept-card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    border: 1px solid var(--bg-tertiary);
    box-shadow: var(--shadow-md);
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    transition: var(--transition-base);
}

.concept-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.concept-icon {
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.concept-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.concept-content p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== АНАЛОГИЯ ===== */
.analogy {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05) 0%, rgba(251, 191, 36, 0.05) 100%);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.analogy h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.analogy-list {
    list-style: none;
}

.analogy-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(245, 158, 11, 0.1);
}

.analogy-list li:last-child {
    border-bottom: none;
}

.analogy-list i {
    color: var(--accent);
    width: 1.5rem;
}

/* ===== СЕТКА ФИЧ ===== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.feature {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    border: 1px solid var(--bg-tertiary);
    transition: var(--transition-base);
}

.feature:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 1rem;
    border-radius: var(--radius-md);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.feature h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.feature p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* ===== ПРИМЕР ТАБЛИЦЫ ===== */
.example-section {
    margin-top: 2rem;
}

.example-section h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.table-container {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--bg-tertiary);
    box-shadow: var(--shadow-md);
}

.example-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.example-table th {
    background: var(--gradient-primary);
    color: white;
    font-weight: 500;
    padding: 1rem;
    text-align: left;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.example-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--bg-tertiary);
    color: var(--text-secondary);
}

.example-table tr:hover {
    background: var(--bg-secondary);
}

.example-table tr:last-child td {
    border-bottom: none;
}

/* ===== ТИПЫ БАЗ ДАННЫХ ===== */
.db-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.db-type {
    border-radius: var(--radius-xl);
    padding: 2rem;
    border: 2px solid transparent;
    transition: var(--transition-base);
}

.db-type.relacional {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    border-color: rgba(99, 102, 241, 0.2);
}

.db-type.nosql {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05) 0%, rgba(251, 191, 36, 0.05) 100%);
    border-color: rgba(245, 158, 11, 0.2);
}

.db-type-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.db-type-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
}

.db-type.relacional .db-type-header h3 {
    color: var(--primary);
}

.db-type.nosql .db-type-header h3 {
    color: var(--accent);
}

.db-badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.db-type.relacional .db-badge {
    background: var(--gradient-primary);
    color: white;
}

.db-type.nosql .db-badge {
    background: var(--gradient-accent);
    color: white;
}

.db-features {
    list-style: none;
    margin-bottom: 1.5rem;
}

.db-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    color: var(--text-secondary);
}

.db-features i {
    color: var(--success);
}

.db-examples h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 1rem;
}

.example-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.example-tag {
    padding: 0.25rem 0.75rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    color: var(--text-secondary);
    border: 1px solid var(--bg-tertiary);
}

/* ===== СРАВНЕНИЕ ===== */
.comparison-section {
    margin: 3rem 0;
}

.comparison-section h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-size: 1.5rem;
}

.comparison-table {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--bg-tertiary);
    box-shadow: var(--shadow-md);
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.comparison-table th {
    background: var(--bg-secondary);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--bg-tertiary);
}

.comparison-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--bg-tertiary);
    color: var(--text-secondary);
}

.comparison-table tr:hover {
    background: var(--bg-secondary);
}

/* ===== SQL КОМАНДЫ ===== */
.sql-commands {
    margin: 2rem 0;
}

.sql-commands h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-size: 1.5rem;
}

.commands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.command-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--bg-tertiary);
    transition: var(--transition-base);
    cursor: pointer;
}

.command-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.command-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.command-header h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.command-type {
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

.command-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.command-card pre {
    background: #1e1e1e;
    border-radius: var(--radius-md);
    padding: 1rem;
    overflow-x: auto;
    margin: 0;
}

.command-card code {
    font-family: 'Courier New', monospace;
    color: #d4d4d4;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* ===== SQL РЕДАКТОР ===== */
.interactive-sql {
    margin: 3rem 0;
}

.interactive-sql h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-size: 1.5rem;
}

.sql-editor-container {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    border: 1px solid var(--bg-tertiary);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--bg-tertiary);
}

.db-schema select {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--bg-tertiary);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.875rem;
}

.run-btn {
    padding: 0.5rem 1.5rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-base);
}

.run-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.editor-area {
    padding: 1.5rem;
}

.editor-area textarea {
    width: 100%;
    min-height: 150px;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    line-height: 1.5;
    border: 1px solid var(--bg-tertiary);
    border-radius: var(--radius-md);
    background: #1e1e1e;
    color: #d4d4d4;
    resize: vertical;
    tab-size: 4;
}

.editor-result {
    padding: 1.5rem;
    border-top: 1px solid var(--bg-tertiary);
}

.editor-result h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.result-table {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 1rem;
    min-height: 100px;
    border: 1px solid var(--bg-tertiary);
}

/* ===== КЛЮЧИ ===== */
.keys-section {
    margin: 2rem 0;
}

.keys-section h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-size: 1.5rem;
}

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

.key-card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: 2rem;
    border: 1px solid var(--bg-tertiary);
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    transition: var(--transition-base);
}

.key-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.key-icon {
    width: 4rem;
    height: 4rem;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.key-icon.primary {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    color: var(--primary);
}

.key-icon.foreign {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(251, 191, 36, 0.1) 100%);
    color: var(--accent);
}

.key-content h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.key-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.key-content ul {
    list-style: none;
    padding-left: 0;
}

.key-content li {
    padding: 0.25rem 0;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.key-content li::before {
    content: '•';
    color: var(--primary);
    font-weight: bold;
}

/* ===== СВЯЗИ ===== */
.relationships-section {
    margin: 3rem 0;
}

.relationships-section h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-size: 1.5rem;
}

.relationships {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.relationship {
    display: flex;
    align-items: center;
    gap: 2rem;
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: 2rem;
    border: 1px solid var(--bg-tertiary);
    transition: var(--transition-base);
}

.relationship:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.relationship-visual {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.table {
    width: 3rem;
    height: 3rem;
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.25rem;
}

.connector {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    color: white;
    min-width: 4rem;
    text-align: center;
}

.connector.one-to-one {
    background: var(--gradient-primary);
}

.connector.one-to-many {
    background: var(--gradient-accent);
}

.connector.many-to-many {
    background: var(--gradient-success);
}

.relationship-info {
    flex: 1;
}

.relationship-info h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.relationship-info p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.relationship-info .example {
    font-size: 0.875rem;
    color: var(--text-light);
    font-style: italic;
}

/* ===== JOIN ОПЕРАЦИИ ===== */
.join-section {
    margin: 2rem 0;
}

.join-section h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-size: 1.5rem;
}

.join-examples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.join-example {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--bg-tertiary);
}

.join-type {
    margin-bottom: 1rem;
}

.join-badge {
    padding: 0.25rem 0.75rem;
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
}

.join-example p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.join-example pre {
    background: #1e1e1e;
    border-radius: var(--radius-md);
    padding: 1rem;
    overflow-x: auto;
}

.join-example code {
    font-family: 'Courier New', monospace;
    color: #d4d4d4;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* ===== ФУТЕР СЛАЙДА ===== */
.slide-footer {
    margin-top: auto;
    padding-top: 2rem;
    border-top: 1px solid var(--bg-tertiary);
}

/* ===== КВИЗЫ ===== */
.quiz {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: 2rem;
    border: 1px solid var(--bg-tertiary);
}

.quiz h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.quiz > p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.quiz-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.quiz-option {
    padding: 1rem 1.5rem;
    background: var(--bg-primary);
    border: 2px solid var(--bg-tertiary);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-base);
    text-align: left;
}

.quiz-option:hover {
    border-color: var(--primary);
    background: var(--bg-secondary);
    transform: translateY(-2px);
}

.quiz-option[data-answer="correct"]:hover,
.quiz-option.correct {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(52, 211, 153, 0.1) 100%);
    border-color: var(--success);
    color: var(--success);
}

.quiz-option[data-answer="wrong"]:hover,
.quiz-option.wrong {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(248, 113, 113, 0.1) 100%);
    border-color: var(--danger);
    color: var(--danger);
}

/* ===== ЗАВЕРШЕНИЕ КУРСА ===== */
.completion {
    text-align: center;
    padding: 3rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    border-radius: var(--radius-2xl);
    border: 2px solid rgba(99, 102, 241, 0.2);
}

.completion h3 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.completion p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.restart-btn, .cert-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--radius-lg);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0.5rem;
}

.restart-btn {
    background: var(--gradient-primary);
    color: white;
}

.restart-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.cert-btn {
    background: var(--bg-primary);
    border: 2px solid var(--primary);
    color: var(--primary);
}

.cert-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* ===== ПРОГРЕСС-БАР ===== */
.progress-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--bg-tertiary);
    z-index: 1000;
}

.progress-bar {
    height: 100%;
    background: var(--gradient-primary);
    width: 20%;
    transition: width var(--transition-base);
}

/* ===== ОТЗЫВЧИВОСТЬ ===== */
@media (max-width: 1024px) {
    .nav-menu {
        display: none;
    }
    
    .slide-title {
        font-size: 2.5rem;
    }
    
    .columns {
        grid-template-columns: 1fr;
    }
    
    .relationship {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0.75rem 1rem;
    }
    
    .slide {
        padding: 1rem;
    }
    
    .slide-title {
        font-size: 2rem;
    }
    
    .quiz-options {
        grid-template-columns: 1fr;
    }
    
    .restart-btn, .cert-btn {
        width: 100%;
        margin: 0.5rem 0;
    }
}

/* ===== ИНТЕРАКТИВНОЕ ЗАДАНИЕ ===== */
.interactive-task {
    background: var(--bg-primary);
    border-radius: var(--radius-2xl);
    border: 1px solid var(--bg-tertiary);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    margin-bottom: 3rem;
}

.task-description {
    margin-bottom: 2rem;
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.task-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-size: 1.5rem;
}

.points-badge {
    padding: 0.5rem 1rem;
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
}

.task-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.task-card p {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.task-hint {
    font-size: 0.9rem !important;
    color: var(--accent) !important;
    background: rgba(245, 158, 11, 0.1);
    padding: 0.75rem;
    border-radius: var(--radius-md);
    border-left: 3px solid var(--accent);
}

.task-hint i {
    margin-right: 0.5rem;
}

/* ===== КОНСТРУКТОР ТАБЛИЦЫ ===== */
.table-builder {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 2px dashed var(--bg-tertiary);
    transition: var(--transition-base);
}

.table-builder.active {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.builder-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--bg-tertiary);
}

.builder-header h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.table-name {
    color: var(--primary);
    font-weight: 600;
}

.table-stats {
    display: flex;
    gap: 1rem;
}

.table-stats .stat {
    padding: 0.25rem 0.75rem;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--text-secondary);
    border: 1px solid var(--bg-tertiary);
}

.table-preview {
    min-height: 200px;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--bg-tertiary);
    overflow: hidden;
}

.table-header-preview {
    display: flex;
    background: var(--gradient-primary);
    padding: 1rem;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.field-cell {
    padding: 0.5rem 1rem;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--bg-tertiary);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.field-cell.pk {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(52, 211, 153, 0.1) 100%);
    border-color: var(--success);
    color: var(--success);
}

.field-cell.correct {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(52, 211, 153, 0.1) 100%);
    border-color: var(--success);
}

.field-cell.incorrect {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(248, 113, 113, 0.1) 100%);
    border-color: var(--danger);
}

.field-cell .remove-btn {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 0.75rem;
    padding: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.field-cell .remove-btn:hover {
    background: var(--danger);
    color: white;
}

.table-body-preview {
    padding: 2rem;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-state {
    text-align: center;
    color: var(--text-light);
}

.empty-state i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-light);
    opacity: 0.5;
}

.empty-state p {
    font-size: 0.875rem;
}

/* ===== ДОСТУПНЫЕ ПОЛЯ ===== */
.fields-pool {
    margin-bottom: 2rem;
}

.fields-pool h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.fields-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.field-item {
    background: var(--bg-primary);
    border: 2px solid var(--bg-tertiary);
    border-radius: var(--radius-lg);
    padding: 1rem;
    cursor: grab;
    user-select: none;
    transition: var(--transition-base);
    position: relative;
}

.field-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.field-item:active {
    cursor: grabbing;
}

.field-item.used {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.field-item.used:hover {
    box-shadow: none;
    border-color: var(--bg-tertiary);
}

.field-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.field-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.field-type {
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
}

.field-description {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.fields-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.control-btn {
    padding: 0.75rem 1.5rem;
    background: var(--bg-primary);
    border: 2px solid var(--bg-tertiary);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-base);
}

.control-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

#resetFields:hover {
    border-color: var(--danger);
    color: var(--danger);
}

#checkSolution {
    background: var(--gradient-primary);
    color: white;
    border: none;
}

#checkSolution:hover {
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

#showSolution:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ===== РЕЗУЛЬТАТ ЗАДАНИЯ ===== */
.task-result {
    animation: fadeIn 0.5s ease;
    margin-top: 2rem;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.result-content {
    text-align: center;
    padding: 3rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(52, 211, 153, 0.05) 100%);
    border-radius: var(--radius-2xl);
    border: 2px solid var(--success);
}

.result-icon {
    font-size: 4rem;
    color: var(--success);
    margin-bottom: 1rem;
    animation: bounce 1s infinite alternate;
}

@keyframes bounce {
    from { transform: translateY(0); }
    to { transform: translateY(-10px); }
}

.result-content h3 {
    font-size: 2rem;
    color: var(--success);
    margin-bottom: 0.5rem;
}

#resultMessage {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.result-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.stat-item i {
    color: var(--primary);
}

/* ===== ИТОГИ ОБУЧЕНИЯ ===== */
.learning-summary {
    margin-top: 3rem;
}

.learning-summary h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-size: 1.5rem;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.summary-card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    border: 1px solid var(--bg-tertiary);
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    transition: var(--transition-base);
}

.summary-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.card-icon {
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.card-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.card-content p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ===== ФУТЕР СЛАЙДА ===== */
.navigation-hint {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    border: 1px solid var(--bg-tertiary);
}

.navigation-hint p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    margin: 0;
}

.complete-btn {
    padding: 0.75rem 2rem;
    background: var(--gradient-success);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-base);
}

.complete-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.complete-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 768px) {
    .interactive-task {
        padding: 1rem;
    }
    
    .fields-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .navigation-hint {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .result-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .summary-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .slide-number {
        font-size: 4rem;
    }
    
    .slide-subtitle {
        font-size: 1rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .db-types {
        grid-template-columns: 1fr;
    }
}