/* Основные стили и переменные */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --background: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --error-color: #dc2626;
    --success-color: #16a34a;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px 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);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    padding: 0;
}

/* Навигация */
.navbar {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 70px;
}

.nav-logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.3rem;
}

.nav-logo .logo-icon {
    font-size: 1.8rem;
}

.nav-logo .logo-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 5px;
    align-items: center;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    padding: 10px 20px;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.3s;
    border-radius: 8px;
}

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

.nav-link.active {
    color: var(--primary-color);
    background: var(--background);
}

.nav-item.coming-soon .nav-link {
    cursor: not-allowed;
    opacity: 0.6;
}

.nav-item .badge {
    display: inline-block;
    padding: 2px 8px;
    background: var(--secondary-color);
    color: white;
    font-size: 0.7rem;
    border-radius: 12px;
    margin-left: 5px;
    font-weight: 600;
}

/* Mobile navigation toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: all 0.3s;
}

.container {
    max-width: 900px;
    margin: 20px auto;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

/* Header */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

/* Header logo */
.header-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.logo-icon {
    font-size: 3rem;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Main content */
main {
    padding: 40px 30px;
}

/* Mode selector */
.mode-selector {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    padding: 15px;
    background: var(--background);
    border-radius: 8px;
}

.mode-selector label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
}

.mode-selector input[type="radio"] {
    cursor: pointer;
}

.input-section {
    margin-bottom: 30px;
}

/* Search container */
.search-container {
    position: relative;
    margin-bottom: 15px;
}

.search-container input {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.search-container input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    display: none;
}

.search-results.active {
    display: block;
}

.search-result-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: var(--background);
}

.search-result-icao {
    font-weight: 600;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
}

.search-result-name {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-left: 10px;
}

/* Info box */
.info-box {
    padding: 15px;
    background: #e0f2fe;
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    margin-bottom: 20px;
}

.info-box p {
    margin: 5px 0;
}

/* TAF Section */
.taf-section {
    margin-top: 25px;
    margin-bottom: 25px;
}

.taf-section h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

/* TAF controls */
.taf-controls {
    margin-bottom: 15px;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

#taf-output,
#taf-raw,
#taf-decoded-output {
    font-family: 'Courier New', monospace;
    white-space: pre-wrap;
    line-height: 1.8;
    color: var(--text-primary);
    font-size: 0.95rem;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-size: 1rem;
}

textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    resize: vertical;
    transition: border-color 0.3s;
}

textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Date inputs */
.date-input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.date-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Buttons */
.button-group {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

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

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

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #475569;
    transform: translateY(-2px);
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Examples */
.examples {
    margin-top: 25px;
    padding: 20px;
    background: var(--background);
    border-radius: 8px;
}

.examples-title {
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.example-btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 15px;
    margin-bottom: 8px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.example-btn:hover {
    border-color: var(--primary-color);
    background: #f1f5f9;
}

/* Loading spinner */
.loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Error message */
.error-message {
    padding: 15px 20px;
    background: #fee2e2;
    border-left: 4px solid var(--error-color);
    border-radius: 8px;
    margin-bottom: 20px;
    color: #991b1b;
}

/* Results */
.result-section {
    margin-top: 30px;
}

.result-section h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.3s;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-btn:hover {
    color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Result card */
.result-card {
    background: var(--background);
    border-radius: 8px;
    padding: 25px;
    border: 1px solid var(--border-color);
}

/* METAR table */
.metar-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.metar-table th {
    background: var(--primary-color);
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border: 1px solid var(--primary-hover);
}

.metar-table th.metar-header {
    padding: 12px;
    text-align: center;
}

.metar-table td {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    background: white;
}

.metar-table tr.metar-raw-row {
    cursor: pointer;
    transition: background-color 0.2s;
}

.metar-table tr.metar-raw-row:hover {
    background-color: #e0f2fe;
}

.metar-table tr.metar-raw-row:hover td {
    background-color: #e0f2fe;
}

.metar-table td.metar-arrow {
    width: 40px;
    text-align: center;
    background: #f8fafc;
    font-size: 1.2rem;
    vertical-align: middle;
    user-select: none;
}

.toggle-icon {
    display: inline-block;
    transition: transform 0.3s;
    color: var(--primary-color);
}

.metar-table td.metar-raw {
    background: #f8fafc;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    padding: 15px;
}

.metar-table td.metar-raw code {
    background: none;
    padding: 0;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-break: break-word;
}

.metar-table td.metar-decoded {
    background: white;
    padding: 20px;
}

.metar-table td.metar-decoded pre {
    margin: 0;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--text-primary);
}

.metar-table tr.metar-details {
    transition: all 0.3s;
}

/* METAR History table */
.metar-history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.metar-history-table th {
    background: var(--primary-color);
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border: 1px solid var(--primary-hover);
}

.metar-history-table td {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    background: white;
}

.metar-history-table tr.metar-history-row {
    cursor: pointer;
    transition: background-color 0.2s;
}

.metar-history-table tr.metar-history-row:hover {
    background-color: #e0f2fe;
}

.metar-history-table tr.metar-history-row:hover td {
    background-color: #e0f2fe;
}

.metar-history-table td.metar-time {
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
}

.metar-history-table td.metar-raw {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.metar-history-table td.metar-raw code {
    background: none;
    padding: 0;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-break: break-word;
}

.metar-history-table td.metar-arrow {
    width: 40px;
    text-align: center;
    font-size: 1.2rem;
    vertical-align: middle;
    user-select: none;
}

.metar-history-table tr.metar-history-details {
    transition: all 0.3s;
}

.metar-history-table td.metar-decoded {
    background: white;
    padding: 20px;
}

.metar-history-table td.metar-decoded pre {
    margin: 0;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--text-primary);
}

/* TAF History table */
.taf-history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.taf-history-table th {
    background: var(--primary-color);
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border: 1px solid var(--primary-hover);
}

.taf-history-table td {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    background: white;
}

.taf-history-table tr.taf-history-row {
    cursor: pointer;
    transition: background-color 0.2s;
}

.taf-history-table tr.taf-history-row:hover {
    background-color: #e0f2fe;
}

.taf-history-table tr.taf-history-row:hover td {
    background-color: #e0f2fe;
}

.taf-history-table td.taf-time {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.4;
}

.taf-history-table td.taf-raw {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
}

.taf-history-table td.taf-raw code {
    background: none;
    padding: 0;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-break: break-word;
}

.taf-history-table td.taf-arrow {
    width: 40px;
    text-align: center;
    font-size: 1.2rem;
    vertical-align: middle;
    user-select: none;
}

.taf-history-table tr.taf-history-details {
    transition: all 0.3s;
}

.taf-history-table td.taf-decoded {
    background: white;
    padding: 20px;
}

.taf-history-table td.taf-decoded pre {
    margin: 0;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--text-primary);
}

#pretty-output {
    font-family: 'Courier New', monospace;
    white-space: pre-wrap;
    line-height: 1.8;
    color: var(--text-primary);
    font-size: 0.95rem;
}

#detailed-output {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.detail-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.detail-value {
    color: var(--text-primary);
    margin-left: 10px;
}

/* Footer */
footer {
    background: var(--background);
    padding: 25px 30px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
}

.info {
    margin-top: 8px;
    font-size: 0.85rem;
}

/* Footer sources */
.sources {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-top: 5px;
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        padding: 0;
    }

    .container {
        margin: 10px;
        border-radius: 12px;
    }

    /* Mobile navigation */
    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(7px, 7px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    .nav-menu {
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        gap: 0;
        box-shadow: var(--shadow-lg);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .nav-menu.active {
        max-height: 500px;
    }

    .nav-item {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-link {
        padding: 15px 20px;
        border-radius: 0;
    }

    header h1 {
        font-size: 2rem;
    }

    main {
        padding: 25px 20px;
    }

    .button-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .tabs {
        flex-direction: column;
    }

    .tab-btn {
        text-align: left;
        border-bottom: 1px solid var(--border-color);
        border-left: 3px solid transparent;
    }

    .tab-btn.active {
        border-left-color: var(--primary-color);
        border-bottom-color: var(--border-color);
    }
}

/* Выбранные аэропорты */
.selected-airports {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
}

.airports-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.airport-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow);
    transition: all 0.2s;
}

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

.airport-tag-name {
    display: flex;
    align-items: center;
    gap: 5px;
}

.airport-tag-remove {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
    transition: all 0.2s;
}

.airport-tag-remove:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Карточки аэропортов в результатах */
.airport-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.airport-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.airport-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.airport-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.airport-card-icao {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 700;
}

.airport-card-content {
    margin-top: 15px;
}

/* ==============================================
   Оптимизация для старых устройств и смартфонов
   ============================================== */

/* Отключаем тяжелые эффекты на устройствах с низкой производительностью */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Упрощенные стили для слабых устройств */
@media (max-width: 768px), (max-device-width: 768px) {
    /* Убираем backdrop-filter (очень тяжелый эффект) */
    .navbar {
        backdrop-filter: none;
        background: rgb(255, 255, 255);
    }

    /* Упрощаем градиенты */
    body {
        background: #667eea;
    }

    .nav-logo .logo-text {
        background: #667eea;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .airport-card-icao {
        background: #667eea;
    }

    /* Уменьшаем тени */
    .navbar,
    .container,
    .airport-card,
    .result-card,
    .info-box {
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    }

    /* Уменьшаем отступы для экономии места */
    .container {
        padding: 15px;
        margin: 15px auto;
    }

    .nav-container {
        min-height: 60px;
    }

    /* Оптимизация шрифтов */
    body {
        font-size: 14px;
    }

    h1, h2 {
        font-size: 1.3rem;
    }

    h3 {
        font-size: 1.1rem;
    }
}

/* Дополнительная оптимизация для очень маленьких экранов */
@media (max-width: 480px) {
    .container {
        padding: 10px;
        margin: 10px auto;
    }

    .nav-container {
        padding: 0 10px;
        min-height: 50px;
    }

    .nav-logo a {
        font-size: 1.1rem;
    }

    .nav-menu a {
        font-size: 0.9rem;
        padding: 8px 12px;
    }

    /* Делаем кнопки на всю ширину */
    .button-group {
        flex-direction: column;
    }

    .button-group button {
        width: 100%;
    }

    /* Упрощаем таблицы */
    table {
        font-size: 0.85rem;
    }

    .metar-table th,
    .metar-table td,
    .taf-table th,
    .taf-table td {
        padding: 8px;
    }
}

/* Оптимизация для GPU-ускорения на мобильных */
.airport-card,
.result-card,
.navbar {
    transform: translateZ(0);
    will-change: auto;
}

/* Адаптивная верстка для мобильных устройств */
@media (max-width: 768px) {
    /* Теги аэропортов */
    .airport-tag {
        font-size: 12px;
        padding: 6px 10px;
    }

    /* Результаты поиска на весь экран */
    .search-results {
        max-height: 50vh;
    }

    .search-result-item {
        padding: 10px 12px;
    }

    /* Карточки аэропортов */
    .airport-card {
        padding: 15px;
        margin-bottom: 15px;
    }

    .airport-card-title {
        font-size: 1.1rem;
        flex-wrap: wrap;
    }

    .airport-card-icao {
        font-size: 0.9rem;
        padding: 3px 10px;
    }

    /* Таблицы METAR/TAF */
    .metar-table,
    .taf-table,
    .metar-history-table,
    .taf-history-table {
        overflow-x: auto;
        display: block;
    }

    /* Графики на полную ширину */
    #temp-chart,
    #wind-chart {
        max-width: 100%;
        overflow-x: auto;
    }

    /* Панель с переключателями */
    .info-box {
        min-width: 100%;
        margin-bottom: 10px;
    }

    /* Форма выбора аэропорта */
    .search-container {
        width: 100%;
    }

    /* Кнопки действий */
    button {
        font-size: 14px;
        padding: 10px 16px;
    }
}

@media (max-width: 480px) {
    /* Очень маленькие экраны - убираем все лишнее */
    .airport-tag {
        font-size: 11px;
        padding: 5px 8px;
    }

    .airport-tag-name strong {
        font-size: 12px;
    }

    /* Уменьшаем отступы в карточках */
    .airport-card {
        padding: 10px;
        border-radius: 8px;
    }

    .airport-card-header {
        padding-bottom: 10px;
    }

    /* Упрощаем навигацию */
    .nav-logo .logo-icon {
        font-size: 1.5rem;
    }

    .nav-menu {
        gap: 3px;
    }

    .nav-menu a {
        padding: 6px 10px;
    }

    /* Компактные таблицы */
    .metar-table td,
    .taf-table td {
        font-size: 0.8rem;
        padding: 6px;
    }

    /* Информационные блоки */
    .info-box {
        padding: 10px;
        font-size: 13px;
    }
}

/* ==============================================
   Индексы неустойчивости атмосферы
   ============================================== */

.indices-container {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
}

.indices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.index-card {
    background: var(--background);
    border-radius: 10px;
    padding: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.index-header {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.index-value {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 15px 0;
    text-align: center;
}

.index-rating {
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    padding: 8px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 6px;
    margin: 10px 0;
    color: var(--text-primary);
}

.index-formula {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 10px;
    font-family: 'Courier New', monospace;
    background: rgba(100, 116, 139, 0.1);
    padding: 5px 10px;
    border-radius: 4px;
}

.index-details {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 8px;
    font-style: italic;
}

/* Адаптивность для индексов */
@media (max-width: 768px) {
    .indices-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .index-value {
        font-size: 2rem;
    }

    .indices-container {
        padding: 15px;
    }

    .index-card {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .index-value {
        font-size: 1.8rem;
    }

    .index-header {
        font-size: 1rem;
    }

    .indices-container {
        padding: 10px;
    }
}
