﻿/* ТТХ моторів для квадрокоптерів - Стилі */

/* Базові стилі */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
}

/* Заголовки */
h1, h2, h3, h4 {
    background: var(--text-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

/* Основний контент */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    animation: fadeInUp 0.8s ease-out;
}

/* Заголовок сторінки */
.page-header {
    text-align: center;
    margin: 40px 0;
    padding: 40px 20px;
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border-card);
    backdrop-filter: blur(15px);
    box-shadow: var(--shadow-card);
    animation: fadeInUp 1s ease-out 0.2s both;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.page-description {
    font-size: 1.2rem;
    color: #b0b3b8;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

/* Фільтри та пошук */
.filters-section {
    margin: 40px 0;
    padding: 30px;
    background: rgba(30, 30, 46, 0.8);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease-out 0.4s both;
}

.search-container {
    margin-bottom: 25px;
}

#motor-search {
    width: 100%;
    max-width: 600px;
    padding: 15px 20px;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #ffffff;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    margin: 0 auto;
    display: block;
}

#motor-search:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(0, 212, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

#motor-search::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.filters-container {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 150px;
}

.filter-group label {
    font-weight: 600;
    color: var(--accent-primary);
    font-size: 0.9rem;
}

.filter-group select {
    padding: 10px 15px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #ffffff;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    cursor: pointer;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(0, 212, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

.filter-group select option {
    background: #1a1a2e;
    color: #e8eaed;
    padding: 10px;
}

.clear-btn {
    background: linear-gradient(145deg, rgba(239, 68, 68, 0.8), rgba(185, 28, 28, 0.8));
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    height: fit-content;
}

.clear-btn:hover {
    background: linear-gradient(145deg, rgba(239, 68, 68, 0.9), rgba(185, 28, 28, 0.9));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

/* Аналітична секція */
.analytics-section {
    margin: 50px 0;
    padding: 30px;
    background: rgba(30, 30, 46, 0.8);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease-out 0.6s both;
}

.analytics-section h2 {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 30px;
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.analytics-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.analytics-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.6), transparent);
    border-radius: 15px 15px 0 0;
}

.analytics-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
    border-color: rgba(0, 212, 255, 0.3);
}

.analytics-card h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    text-align: center;
    color: var(--accent-primary);
}

.chart-container {
    height: 300px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chart-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 5px;
    min-width: 60px;
}

.chart-bar-container {
    position: relative;
    height: 200px;
    width: 25px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 10px;
}

.chart-bar-fill {
    position: absolute;
    bottom: 0;
    width: 100%;
    border-radius: 12px;
    transition: height 1s ease-out;
    background: linear-gradient(45deg, rgba(0, 212, 255, 0.8), rgba(159, 122, 234, 0.8));
}

.chart-bar-label {
    font-size: 0.75rem;
    color: #b0b3b8;
    text-align: center;
    word-break: break-all;
    line-height: 1.2;
    max-width: 80px;
}

.chart-bar-value {
    font-size: 0.8rem;
    color: var(--accent-primary);
    font-weight: 600;
    margin-bottom: 5px;
}

.chart-scatter {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.chart-point {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.9), rgba(0, 212, 255, 0.6));
    border: 2px solid rgba(0, 212, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
}

.chart-point:hover {
    transform: scale(1.5);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.8);
    z-index: 10;
}

.chart-point::after {
    content: attr(data-motor);
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30, 30, 46, 0.9);
    color: #e8eaed;
    padding: 5px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.chart-point:hover::after {
    opacity: 1;
}

.chart-axes {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    top: 20px;
    border-left: 2px solid rgba(255, 255, 255, 0.3);
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.chart-axis-label {
    position: absolute;
    font-size: 0.8rem;
    color: #b0b3b8;
    font-weight: 600;
}

.chart-axis-label.x-axis {
    bottom: -15px;
    right: 0;
}

.chart-axis-label.y-axis {
    top: 0;
    left: -15px;
    transform: rotate(-90deg);
    transform-origin: center;
}

/* Каталог моторів */
.motors-catalog {
    margin: 40px 0;
}

.motors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 25px;
    padding: 20px 0;
}

.motor-card {
    background: rgba(30, 30, 46, 0.9);
    border-radius: 15px;
    padding: 25px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out;
}

.motor-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.6), transparent);
    border-radius: 15px 15px 0 0;
}

.motor-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
    border-color: rgba(0, 212, 255, 0.5);
}

.motor-card:hover::before {
    background: linear-gradient(90deg, rgba(0, 212, 255, 0.3), rgba(0, 212, 255, 1), rgba(0, 212, 255, 0.3));
}

.motor-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.motor-image-container {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(0, 212, 255, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.motor-image-container::after {
    content: '🔍';
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--accent-primary);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.motor-image-container:hover::after {
    opacity: 1;
}

.motor-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.motor-card:hover .motor-image-container {
    border-color: rgba(0, 212, 255, 0.6);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

.motor-card:hover .motor-image {
    transform: scale(1.1);
}

/* Стилі для двох зображень */
.motor-image-container.dual-images {
    width: 160px;
    height: 80px;
    display: flex;
    gap: 5px;
}

.motor-image-container.dual-images .image-wrapper {
    flex: 1;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid rgba(0, 212, 255, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.motor-image-container.dual-images .image-wrapper:hover {
    border-color: rgba(0, 212, 255, 0.6);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
    transform: scale(1.05);
}

.motor-image-container.dual-images .image-wrapper::after {
    content: '🔍';
    position: absolute;
    top: 3px;
    right: 3px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--accent-primary);
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.motor-image-container.dual-images .image-wrapper:hover::after {
    opacity: 1;
}

.motor-image-container.dual-images .motor-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.image-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: var(--accent-primary);
    font-size: 8px;
    padding: 2px 4px;
    text-align: center;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Одне зображення в image-wrapper */
.motor-image-container:not(.dual-images) .image-wrapper {
    width: 100%;
    height: 100%;
}

.motor-info {
    flex: 1;
}

.motor-name {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(45deg, var(--accent-primary), #9f7aea);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.3;
}

.motor-type {
    display: inline-block;
    padding: 6px 12px;
    background: linear-gradient(45deg, rgba(0, 212, 255, 0.2), rgba(159, 122, 234, 0.2));
    border: 1px solid rgba(0, 212, 255, 0.4);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-primary);
}

.motor-specs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.spec-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    text-align: center;
}

.spec-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.3);
    transform: scale(1.02);
}

.spec-label {
    font-size: 0.8rem;
    color: #b0b3b8;
    margin-bottom: 4px;
    font-weight: 500;
}

.spec-value {
    font-size: 1.1rem;
    color: var(--accent-primary);
    font-weight: 700;
}

.motor-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: space-between;
}

.action-btn {
    flex: 1;
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.view-details-btn {
    background: linear-gradient(145deg, rgba(0, 212, 255, 0.8), rgba(90, 103, 216, 0.8));
    color: white;
    border: 1px solid rgba(0, 212, 255, 0.4);
}

.view-details-btn:hover {
    background: linear-gradient(145deg, rgba(0, 212, 255, 0.9), rgba(90, 103, 216, 0.9));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4);
}

.compare-btn {
    background: linear-gradient(145deg, rgba(159, 122, 234, 0.8), rgba(147, 51, 234, 0.8));
    color: white;
    border: 1px solid rgba(159, 122, 234, 0.4);
}

.compare-btn:hover {
    background: linear-gradient(145deg, rgba(159, 122, 234, 0.9), rgba(147, 51, 234, 0.9));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(159, 122, 234, 0.4);
}

.compare-btn.active {
    background: linear-gradient(145deg, rgba(34, 197, 94, 0.8), rgba(16, 185, 129, 0.8));
    border-color: rgba(34, 197, 94, 0.6);
}

/* Модальне вікно */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.modal-content {
    background: linear-gradient(135deg, rgba(30, 30, 46, 0.95), rgba(22, 33, 62, 0.95));
    margin: 5% auto;
    padding: 30px;
    border-radius: 20px;
    border: 2px solid rgba(0, 212, 255, 0.3);
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 2rem;
    font-weight: bold;
    color: #e8eaed;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.close:hover {
    background: rgba(239, 68, 68, 0.4);
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

/* Порівняльна секція */
.comparison-section {
    margin: 50px 0;
    padding: 30px;
    background: rgba(30, 30, 46, 0.8);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.comparison-section h2 {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 30px;
}

.comparison-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.comparison-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.comparison-btn.clear {
    background: linear-gradient(145deg, rgba(239, 68, 68, 0.8), rgba(185, 28, 28, 0.8));
    color: white;
}

.comparison-btn.export {
    background: linear-gradient(145deg, rgba(34, 197, 94, 0.8), rgba(16, 185, 129, 0.8));
    color: white;
}

.comparison-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.comparison-table-container {
    overflow-x: auto;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.comparison-table th,
.comparison-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.comparison-table th {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(159, 122, 234, 0.2));
    color: var(--accent-primary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.comparison-table td {
    background: rgba(255, 255, 255, 0.02);
}

.comparison-table tr:hover td {
    background: rgba(255, 255, 255, 0.08);
}

.comparison-table td:first-child {
    font-weight: 600;
    color: #b0b3b8;
    background: rgba(255, 255, 255, 0.05);
}



/* Інформаційні панелі */
.info-panels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin: 50px 0;
}

.info-panel {
    background: rgba(30, 30, 46, 0.8);
    border-radius: 15px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.info-panel:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
    border-color: rgba(0, 212, 255, 0.3);
}

.info-panel h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    text-align: center;
}

.info-panel h4 {
    font-size: 1.2rem;
    margin: 20px 0 15px 0;
    color: #9f7aea;
}

.info-content p {
    margin: 12px 0;
    line-height: 1.7;
    padding-left: 20px;
    position: relative;
}

.info-content p::before {
    content: '▶';
    color: var(--accent-primary);
    position: absolute;
    left: 0;
    font-size: 0.8rem;
    top: 2px;
}

.info-content strong {
    color: var(--accent-primary);
    font-weight: 600;
}

/* Завантаження бази моторів */
.motors-loading,
.motors-load-error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 24px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--bg-secondary, #1e1e2e) 90%, transparent);
    border: 1px dashed color-mix(in srgb, var(--accent-primary, #00d4ff) 35%, transparent);
    color: var(--text-secondary, rgba(255, 255, 255, 0.75));
}

.motors-load-error {
    border-color: color-mix(in srgb, #f87171 50%, transparent);
}

.motors-load-error code {
    padding: 2px 6px;
    border-radius: 4px;
    background: color-mix(in srgb, var(--accent-primary, #00d4ff) 12%, transparent);
}

/* Футер */
.main-footer {
    background: rgba(30, 30, 46, 0.9);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px 20px;
    text-align: center;
    margin-top: 60px;
    backdrop-filter: blur(15px);
}

.footer-content p {
    margin: 5px 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* Анімації */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Адаптивність */
@media (max-width: 1200px) {
    .motors-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }
    
    .page-header h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 15px;
    }
    
    .page-header {
        padding: 30px 15px;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .page-description {
        font-size: 1rem;
    }
    
    .filters-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        min-width: auto;
    }
    
    .analytics-section {
        padding: 20px;
    }
    
    .analytics-section h2 {
        font-size: 1.8rem;
    }
    
    .analytics-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .analytics-card {
        padding: 20px;
    }
    
    .chart-container {
        height: 250px;
    }
    
    .chart-bar-label {
        font-size: 0.65rem;
        max-width: 60px;
    }
    

    
    .motors-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .motor-specs {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .motor-actions {
        flex-direction: column;
    }
    
    .comparison-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .comparison-btn {
        width: 100%;
        max-width: 300px;
    }
    
    .info-panels {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 20px;
    }
    
    .comparison-table {
        font-size: 0.85rem;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 10px 15px;
    }
}

@media (max-width: 480px) {
    .page-header h1 {
        font-size: 1.6rem;
    }
    
    .analytics-section {
        padding: 15px;
    }
    
    .analytics-section h2 {
        font-size: 1.5rem;
    }
    
    .analytics-card h4 {
        font-size: 1rem;
    }
    
    .chart-container {
        height: 200px;
    }
    
    .chart-bar {
        min-width: 45px;
        margin: 0 2px;
    }
    
    .chart-bar-container {
        width: 20px;
        height: 150px;
    }
    
    .chart-bar-label {
        font-size: 0.6rem;
        max-width: 50px;
    }
    
    .chart-bar-value {
        font-size: 0.7rem;
    }
    
    .chart-point {
        width: 10px;
        height: 10px;
    }
    
    .chart-axis-label {
        font-size: 0.7rem;
    }
    
    .motor-card {
        padding: 20px;
    }
    
    .motor-name {
        font-size: 1.2rem;
    }
    
    .motor-specs {
        grid-template-columns: 1fr;
    }
    
    .filters-section {
        padding: 20px;
    }
    
    .comparison-section {
        padding: 20px;
    }
    
    .comparison-section h2 {
        font-size: 1.8rem;
    }
    
    .info-panel {
        padding: 20px;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 8px 12px;
    }
}

/* Спеціальні стилі для різних типів моторів */
.motor-card[data-type="brushed"]::before {
    background: linear-gradient(90deg, transparent, rgba(239, 68, 68, 0.6), transparent);
}

.motor-card[data-type="brushless"]::before {
    background: linear-gradient(90deg, transparent, rgba(34, 197, 94, 0.6), transparent);
}

.motor-card[data-type="sensorless"]::before {
    background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.6), transparent);
}

/* Навігація з основного файлу */
.main-header {
    background: rgba(30, 30, 46, 0.95);
    backdrop-filter: blur(15px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid rgba(0, 212, 255, 0.2);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.main-logo {
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.3));
    transition: all 0.3s ease;
}

.main-logo:hover {
    filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.6));
    transform: scale(1.05);
}

.main-header h1 {
    margin: 0;
    font-size: 1.8rem;
    background: linear-gradient(45deg, var(--accent-primary), #5a67d8, #9f7aea);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.main-navigation {
    position: relative;
    display: flex;
    align-items: center;
}

.menu-btn {
    width: 35px;
    height: 35px;
    position: relative;
    cursor: pointer;
    transition: all 0.5s ease-in-out;
    z-index: 1001;
}

.line {
    width: 25px;
    height: 3px;
    background: var(--accent-primary);
    display: block;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    border-radius: 2px;
    box-shadow: 0 2px 5px rgba(0, 212, 255, 0.3);
}

.menu-btn.active .line--1 {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-btn.active .line--2 {
    opacity: 0;
}

.menu-btn.active .line--3 {
    transform: rotate(-45deg) translate(7px, -6px);
}

.nav-links {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(30, 30, 46, 0.98);
    backdrop-filter: blur(20px);
    min-width: 250px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(0, 212, 255, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    padding: 15px 0;
    margin-top: 10px;
}

.nav-links.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-links .link {
    display: block;
    padding: 12px 25px;
    color: #e8eaed;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    font-size: 0.95rem;
}

.nav-links .link:hover {
    background: rgba(0, 212, 255, 0.1);
    border-left-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateX(5px);
}

.nav-links .link.active {
    background: linear-gradient(45deg, rgba(0, 212, 255, 0.2), rgba(90, 103, 216, 0.2));
    border-left-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* Splash Screen стилі */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.splash-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.splash-content {
    text-align: center;
    color: #e8eaed;
}

.logo-animation {
    position: relative;
    display: inline-block;
    margin-bottom: 30px;
}

.splash-logo {
    animation: logoFloat 3s ease-in-out infinite;
    filter: drop-shadow(0 0 30px rgba(0, 212, 255, 0.6));
    transition: all 0.3s ease;
}

.pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 160px;
    height: 160px;
    border: 2px solid rgba(0, 212, 255, 0.4);
    border-radius: 50%;
    animation: pulse 2s ease-out infinite;
}

.pulse-ring-delay {
    animation-delay: 1s;
}

.splash-title {
    font-size: 3rem;
    font-weight: 700;
    margin: 20px 0;
    background: linear-gradient(45deg, var(--accent-primary), #5a67d8, #9f7aea);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: titleGlow 2s ease-in-out infinite alternate;
}

.loading-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}

.loading-dots span {
    width: 12px;
    height: 12px;
    background: var(--accent-primary);
    border-radius: 50%;
    animation: dotBounce 1.4s ease-in-out infinite both;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }
.loading-dots span:nth-child(3) { animation-delay: 0s; }

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

@keyframes titleGlow {
    0% { 
        text-shadow: 0 0 20px rgba(0, 212, 255, 0.5); 
    }
    100% { 
        text-shadow: 0 0 40px rgba(0, 212, 255, 0.8);
    }
}

@keyframes dotBounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Скролбари */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.6), rgba(159, 122, 234, 0.6));
    border-radius: 6px;
    border: 2px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.8), rgba(159, 122, 234, 0.8));
    background-clip: content-box;
}

/* Додаткові стилі для тестових таблиць */
.test-table .rpm-col {
    color: #f59e0b;
    font-weight: 600;
}

.test-table .efficiency-col {
    color: #9f7aea;
    font-weight: 600;
}

.test-table .thrust-col {
    color: #22c55e;
    font-weight: 600;
}

.test-table .current-col {
    color: #ef4444;
    font-weight: 600;
}

.test-table .throttle-col {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    font-weight: 600;
}

/* Стилі для збільшуваного зображення мотора */
.motor-image-modal {
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 10px;
    border: 2px solid rgba(0, 212, 255, 0.3);
    max-width: 200px;
    height: auto;
}

.motor-image-modal:hover {
    border-color: rgba(0, 212, 255, 0.6);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
    transform: scale(1.05);
}

/* Модальне вікно для збільшеного зображення */
.image-modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px);
    animation: fadeIn 0.3s ease-out;
}

.image-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
    width: auto;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    border: 3px solid rgba(0, 212, 255, 0.4);
    animation: zoomIn 0.3s ease-out;
    object-fit: contain;
}

.image-modal-close {
    position: absolute;
    top: 15px;
    right: 25px;
    color: #e8eaed;
    font-size: 3rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(239, 68, 68, 0.3);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(239, 68, 68, 0.5);
}

.image-modal-close:hover {
    background: rgba(239, 68, 68, 0.6);
    transform: scale(1.1);
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
}

.image-modal-title {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30, 30, 46, 0.9);
    color: #e8eaed;
    padding: 15px 25px;
    border-radius: 25px;
    font-size: 1.2rem;
    font-weight: 600;
    border: 2px solid rgba(0, 212, 255, 0.3);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    background: linear-gradient(45deg, var(--accent-primary), #9f7aea);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    white-space: nowrap;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Адаптивність для збільшеного зображення */
@media (max-width: 768px) {
    .image-modal-content {
        max-width: 95%;
        max-height: 85%;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
    
    .image-modal-close {
        top: 10px;
        right: 15px;
        font-size: 2rem;
        width: 45px;
        height: 45px;
    }
    
    .image-modal-title {
        bottom: 10px;
        font-size: 1rem;
        padding: 10px 20px;
    }
}