/* Основные стили и переменные */
:root {
    --metro-dark: #1a1a1a;
    --metro-darker: #0d0d0d;
    --metro-orange: #cc9900;
    --metro-light: #e6e6e6;
    --metro-gray: #333333;
    --metro-green: #00aa00;
    --metro-red: #cc0000;
    --metro-blue: #0066cc;
}

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

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: var(--metro-dark);
    color: var(--metro-light);
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(204, 153, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 102, 204, 0.1) 0%, transparent 50%),
        linear-gradient(to bottom, var(--metro-dark), var(--metro-darker));
    background-attachment: fixed;
    min-height: 100vh;
}

/* Анимированный фон */
.metro-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.tunnel-effect {
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(204, 153, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(102, 0, 204, 0.1) 0%, transparent 50%);
    animation: tunnelPulse 8s ease-in-out infinite;
}

.particles::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(255,255,255,0.1) 2px, transparent 0),
        radial-gradient(circle at 75% 75%, rgba(255,255,255,0.05) 1px, transparent 0);
    background-size: 50px 50px, 30px 30px;
    animation: particlesMove 20s linear infinite;
}

@keyframes tunnelPulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.02); }
}

@keyframes particlesMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Дипломный заголовок */
.diploma-header {
    background: linear-gradient(135deg, var(--metro-darker), #2a0a4a);
    padding: 20px;
    text-align: center;
    border-bottom: 3px solid var(--metro-orange);
    position: relative;
    overflow: hidden;
}

.diploma-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(204, 153, 0, 0.2), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.rainbow-text {
    background: linear-gradient(45deg, #ff0000, #ff9900, #33ff00, #0099ff, #6633ff);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: rainbow 3s ease-in-out infinite;
    font-size: 2.5em;
    font-weight: bold;
}

.subtitle {
    color: var(--metro-light);
    opacity: 0.8;
    margin-top: 10px;
    font-size: 1.1em;
}

@keyframes rainbow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Статусная панель */
.station-status {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 15px;
    background: rgba(51, 51, 51, 0.9);
    border-bottom: 1px solid var(--metro-gray);
    flex-wrap: wrap;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--metro-light);
}

.status-icon {
    font-size: 1.2em;
}

/* Улучшенный хедер */
.metro-header {
    background-color: rgba(13, 13, 13, 0.95);
    border-bottom: 2px solid var(--metro-orange);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    height: 60px;
    border-radius: 5px;
    border: 2px solid var(--metro-orange);
}

.title-group h1 {
    font-family: 'Playfair Display', serif;
    color: var(--metro-orange);
    margin: 0;
    font-size: 2.2rem;
    text-shadow: 0 0 10px rgba(204, 153, 0, 0.3);
}

.tagline {
    font-style: italic;
    color: var(--metro-light);
    margin: 5px 0 0;
    font-size: 1.1rem;
    opacity: 0.9;
}

.header-stats {
    display: flex;
    gap: 30px;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: var(--metro-orange);
    font-family: 'Orbitron', monospace;
    text-shadow: 0 0 5px rgba(204, 153, 0, 0.5);
}

.stat-label {
    font-size: 0.8rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Навигация */
.metro-nav {
    background-color: rgba(51, 51, 51, 0.95);
    padding: 15px 0;
    margin-top: 15px;
    border-top: 1px solid var(--metro-gray);
}

.metro-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.metro-nav li {
    margin: 0;
}

.nav-link {
    color: var(--metro-light);
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    padding: 10px 20px;
    border-radius: 25px;
    border: 2px solid transparent;
}

.nav-link:hover {
    color: var(--metro-orange);
    background: rgba(204, 153, 0, 0.1);
    border-color: var(--metro-orange);
    transform: translateY(-2px);
}

.nav-icon {
    margin-right: 8px;
    font-size: 1.2rem;
}

/* Основное содержимое */
.metro-main {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.metro-section {
    background-color: rgba(26, 26, 26, 0.8);
    border: 1px solid var(--metro-gray);
    border-radius: 10px;
    margin-bottom: 40px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.metro-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-header {
    position: relative;
    padding: 25px;
    background: linear-gradient(135deg, rgba(204, 153, 0, 0.2), rgba(204, 153, 0, 0.05));
    border-bottom: 1px solid var(--metro-orange);
}

.section-header h2 {
    margin: 0;
    font-family: 'Playfair Display', serif;
    color: var(--metro-orange);
    font-size: 1.8rem;
    text-shadow: 0 0 10px rgba(204, 153, 0, 0.3);
}

.section-icon {
    margin-right: 10px;
}

.section-image {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    height: 60px;
    border-radius: 5px;
    opacity: 0.8;
    border: 1px solid var(--metro-gray);
}

.metro-article {
    padding: 30px;
}

h3 {
    color: var(--metro-orange);
    font-size: 1.5rem;
    margin-top: 25px;
    border-bottom: 2px solid var(--metro-gray);
    padding-bottom: 10px;
    font-family: 'Playfair Display', serif;
}

h4 {
    color: var(--metro-light);
    font-size: 1.2rem;
    margin: 20px 0 10px;
}

/* Приветственная секция */
.welcome-section {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.9), rgba(76, 0, 153, 0.3));
    border: 2px solid var(--metro-orange);
}

.welcome-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

@media (max-width: 768px) {
    .welcome-content {
        grid-template-columns: 1fr;
    }
}

.features-grid {
    display: grid;
    gap: 20px;
    margin-top: 25px;
}

.feature-card {
    background: rgba(51, 51, 51, 0.6);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--metro-orange);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateX(10px);
    background: rgba(51, 51, 51, 0.8);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: block;
}

.feature-card h4 {
    color: var(--metro-orange);
    margin: 0 0 10px 0;
    font-size: 1.3rem;
}

.feature-card p {
    margin: 0;
    opacity: 0.9;
    line-height: 1.5;
}

/* Терминал */
.terminal {
    background: #1a1a1a;
    border: 2px solid #333;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.terminal-header {
    background: #333;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    border-bottom: 1px solid #555;
}

.terminal-title {
    color: var(--metro-light);
    letter-spacing: 1px;
}

.terminal-controls {
    display: flex;
    gap: 8px;
}

.control-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.control-dot.red { background: #ff5f57; }
.control-dot.yellow { background: #ffbd2e; }
.control-dot.green { background: #28ca42; }

.control-dot:hover {
    transform: scale(1.2);
}

.terminal-content {
    padding: 20px;
    font-family: 'Courier New', monospace;
    color: #00ff00;
    min-height: 150px;
    background: #0d0d0d;
}

.terminal-line {
    margin-bottom: 8px;
    animation: typewriter 0.5s ease-in-out;
}

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

.status-ready {
    color: #00ff00;
    font-weight: bold;
    text-shadow: 0 0 5px #00ff00;
}

/* Карточки и сетки */
.metro-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin: 25px 0;
}

.metro-card {
    background-color: rgba(51, 51, 51, 0.6);
    border: 1px solid var(--metro-gray);
    padding: 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.metro-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(204, 153, 0, 0.1), transparent);
    transition: left 0.5s ease;
}

.metro-card:hover::before {
    left: 100%;
}

.metro-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border-color: var(--metro-orange);
}

.metro-card h4 {
    color: var(--metro-orange);
    margin-top: 0;
    font-size: 1.3rem;
}

.metro-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    margin: 30px 0;
}

.concept-card {
    flex: 1;
    min-width: 250px;
    background-color: rgba(51, 51, 51, 0.6);
    border: 1px solid var(--metro-gray);
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
}

.concept-card:hover {
    border-color: var(--metro-orange);
    background-color: rgba(51, 51, 51, 0.8);
    transform: scale(1.05);
}

.concept-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--metro-orange);
    display: block;
}

/* Блоки с кодом */
.code-block {
    background-color: rgba(13, 13, 13, 0.9);
    border: 1px solid var(--metro-gray);
    border-left: 4px solid var(--metro-orange);
    padding: 20px;
    margin: 25px 0;
    overflow-x: auto;
    border-radius: 0 8px 8px 0;
}

pre {
    margin: 0;
    white-space: pre-wrap;
    font-family: 'Courier New', Courier, monospace;
}

code {
    font-family: 'Courier New', Courier, monospace;
    color: var(--metro-green);
    background-color: transparent;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Примеры кода */
.example-container {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    margin: 30px 0;
}

.code-example {
    flex: 1;
    min-width: 300px;
}

.example-output {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
}

/* Практическая область */
.practice-area {
    background-color: rgba(13, 13, 13, 0.9);
    border: 1px solid var(--metro-gray);
    padding: 25px;
    margin-top: 30px;
    border-radius: 8px;
}

.editor-tabs {
    display: flex;
    border-bottom: 1px solid var(--metro-gray);
    margin-bottom: 20px;
    background: rgba(51, 51, 51, 0.6);
    border-radius: 5px 5px 0 0;
    overflow: hidden;
}

.tab-btn {
    background: none;
    border: none;
    padding: 12px 25px;
    cursor: pointer;
    color: var(--metro-light);
    font-weight: bold;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    flex: 1;
    text-align: center;
}

.tab-btn.active {
    color: var(--metro-orange);
    border-bottom-color: var(--metro-orange);
    background-color: rgba(51, 51, 51, 0.8);
}

.tab-btn:hover:not(.active) {
    color: var(--metro-orange);
    background-color: rgba(51, 51, 51, 0.3);
}

.tab-pane {
    display: none;
}

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

.code-editor {
    width: 100%;
    height: 300px;
    background-color: #1e1e1e;
    border: 1px solid var(--metro-gray);
    color: var(--metro-green);
    font-family: 'Courier New', Courier, monospace;
    padding: 15px;
    resize: vertical;
    border-radius: 5px;
    font-size: 14px;
    line-height: 1.5;
}

.metro-run-btn {
    background: linear-gradient(135deg, var(--metro-orange), #e6b800);
    color: var(--metro-dark);
    border: none;
    padding: 12px 30px;
    font-weight: bold;
    cursor: pointer;
    margin: 20px 0;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.metro-run-btn:hover {
    background: linear-gradient(135deg, #e6b800, var(--metro-orange));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(204, 153, 0, 0.3);
}

.output-frame {
    width: 100%;
    border: 1px solid var(--metro-gray);
    background-color: white;
    border-radius: 5px;
    overflow: hidden;
    margin-top: 15px;
}

.output-frame h4 {
    margin: 0;
    padding: 15px;
    background-color: var(--metro-gray);
    color: var(--metro-light);
    border-bottom: 1px solid #555;
}

#code-output {
    width: 100%;
    height: 300px;
    border: none;
}

/* Пример элементов интерфейса */
.gas-mask-ui {
    width: 100%;
    max-width: 350px;
    background: rgba(30, 30, 30, 0.9);
    border: 2px solid #555;
    padding: 20px;
    font-family: 'Courier New', monospace;
    color: #00ff00;
    margin: 0 auto;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.filter-status {
    margin-bottom: 15px;
}

.filter-text {
    font-size: 0.9rem;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 8px;
}

.filter-bar {
    height: 25px;
    background: linear-gradient(to right, #00aa00, #ff0000);
    margin-top: 5px;
    border: 1px solid #333;
    border-radius: 3px;
    overflow: hidden;
    width: 100%;
    transition: width 0.5s ease, background 0.5s ease;
}

.timer {
    font-size: 28px;
    text-align: center;
    margin: 15px 0;
    color: #00ff00;
    font-weight: bold;
    text-shadow: 0 0 5px #00ff00;
    font-family: 'Orbitron', monospace;
}

.metro-btn {
    background: #333;
    color: #fff;
    border: 1px solid #555;
    padding: 10px 20px;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    border-radius: 3px;
}

.metro-btn:hover {
    background: #444;
    border-color: var(--metro-orange);
}

.metro-btn:active {
    transform: translateY(1px);
}

/* Подвал */
.metro-footer {
    background-color: var(--metro-darker);
    color: var(--metro-light);
    padding: 50px 20px 30px;
    border-top: 2px solid var(--metro-orange);
    margin-top: 50px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3 {
    color: var(--metro-orange);
    margin-bottom: 20px;
    border: none;
    padding: 0;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--metro-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--metro-orange);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-link {
    color: var(--metro-orange);
    text-decoration: none;
    padding: 5px 10px;
    border: 1px solid var(--metro-orange);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--metro-orange);
    color: var(--metro-dark);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--metro-gray);
    max-width: 1200px;
    margin: 0 auto;
}

.footer-bottom p {
    margin: 5px 0;
    opacity: 0.8;
}

/* Адаптивность */
@media (max-width: 768px) {
    .section-image {
        display: none;
    }
    
    .metro-nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    .metro-nav li {
        margin: 5px 0;
        width: 100%;
        text-align: center;
    }
    
    .nav-link {
        justify-content: center;
    }
    
    .example-container {
        flex-direction: column;
    }
    
    .code-example, .example-output {
        min-width: 100%;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .header-stats {
        justify-content: center;
    }
    
    .station-status {
        gap: 15px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* Утилитарные классы */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.p-20 { padding: 20px; }

/* Анимации появления */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Специфические стили для новых компонентов */
.air-quality {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #444;
}

.quality-indicator {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.quality-dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #333;
    transition: background 0.3s ease;
}

.quality-dot.active {
    background: #00ff00;
    box-shadow: 0 0 5px #00ff00;
}

/* Убедитесь, что все элементы видны */
.metro-section {
    opacity: 1 !important;
    transform: none !important;
}

.metro-card, .concept-card {
    opacity: 1 !important;
    transform: none !important;
}
