/* =============================================
   ULTRA-MODERN GLASSMORPHISM DARK DASHBOARD
   Генератор отчетов ЦУР и ИМ | Тёмная премиальная эстетика
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,300;14..32,400;14..32,500;14..32,600;14..32,700;14..32,800;14..32,900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #0a0a0f;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #eef2ff;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(0, 200, 255, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(150, 0, 255, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 40% 90%, rgba(0, 255, 200, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 24px 32px;
    position: relative;
    z-index: 1;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(18, 18, 24, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #a0b4d8;
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 40px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 24px;
}

.back-button:hover {
    background: rgba(0, 200, 255, 0.15);
    color: #00ccff;
    border-color: rgba(0, 200, 255, 0.4);
    transform: translateX(-2px);
    box-shadow: 0 0 20px rgba(0, 200, 255, 0.1);
}

.header {
    text-align: center;
    margin-bottom: 32px;
    position: relative;
}

.header h1 {
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #a0b4d8 30%, #00ccff 60%, #7b2cbf 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
    text-shadow: 0 0 30px rgba(0, 200, 255, 0.2);
}

.glow-text {
    font-size: 13px;
    color: #00ccff;
    background: rgba(0, 200, 255, 0.08);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 18px;
    border-radius: 40px;
    border: 1px solid rgba(0, 200, 255, 0.2);
    backdrop-filter: blur(4px);
}

.main-panel {
    display: flex;
    gap: 20px;
    min-height: 600px;
}

.sidebar {
    width: 380px;
    background: rgba(18, 18, 24, 0.5);
    backdrop-filter: blur(15px);
    border-radius: 24px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.upload-area {
    background: rgba(0, 200, 255, 0.05);
    border: 1px dashed rgba(0, 200, 255, 0.2);
    border-radius: 16px;
    padding: 25px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.upload-area:hover {
    border-color: rgba(0, 200, 255, 0.5);
    background: rgba(0, 200, 255, 0.1);
}

.upload-area.drag-over {
    border-color: #00ccff;
    background: rgba(0, 200, 255, 0.15);
    box-shadow: 0 0 30px rgba(0, 200, 255, 0.15);
}

.upload-icon {
    font-size: 42px;
    color: #00ccff;
    margin-bottom: 12px;
    opacity: 0.8;
}

.upload-btn {
    background: linear-gradient(135deg, rgba(0, 200, 255, 0.15) 0%, rgba(100, 0, 255, 0.15) 100%);
    color: #00ccff;
    border: 1px solid rgba(0, 200, 255, 0.3);
    padding: 8px 24px;
    border-radius: 40px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.upload-btn:hover {
    background: linear-gradient(135deg, rgba(0, 200, 255, 0.25) 0%, rgba(100, 0, 255, 0.25) 100%);
    border-color: #00ccff;
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(0, 200, 255, 0.2);
}

.file-info {
    padding: 15px;
    background: rgba(10, 10, 15, 0.4);
    border-radius: 14px;
    display: none;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.file-info h3, .file-info h4 {
    color: #a0b4d8;
    margin-bottom: 8px;
    font-size: 13px;
}

.file-item {
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    color: #00ccff;
    font-weight: 500;
    word-break: break-all;
    border: 1px solid rgba(0, 200, 255, 0.1);
}

.process-btn {
    width: 100%;
    background: linear-gradient(135deg, rgba(0, 200, 255, 0.2) 0%, rgba(100, 0, 255, 0.2) 100%);
    color: #00ccff;
    border: 1px solid rgba(0, 200, 255, 0.4);
    padding: 14px 24px;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    backdrop-filter: blur(8px);
    letter-spacing: 0.5px;
}

.process-btn:hover {
    background: linear-gradient(135deg, rgba(0, 200, 255, 0.35) 0%, rgba(100, 0, 255, 0.35) 100%);
    border-color: #00ccff;
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(0, 200, 255, 0.3);
}

.process-btn:disabled {
    opacity: 0.5;
    transform: none;
    cursor: not-allowed;
}

.reset-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    color: #a0b4d8;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 24px;
    border-radius: 40px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    backdrop-filter: blur(8px);
}

.reset-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #eef2ff;
    border-color: rgba(255, 255, 255, 0.2);
}

.stats-panel {
    margin-bottom: 20px;
    padding: 16px;
    background: rgba(10, 10, 15, 0.4);
    border-radius: 16px;
    display: block;
    max-height: 350px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stats-panel h4 {
    color: #00ccff;
    margin-bottom: 12px;
    font-size: 14px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    color: #8a9bb0;
    font-size: 13px;
}

.stat-value {
    color: #eef2ff;
    font-weight: 600;
}

.map-container {
    flex: 1;
    background: linear-gradient(145deg, #0a0a0f 0%, #1a1a2e 100%);
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(0, 200, 255, 0.15);
    position: relative;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 200, 255, 0.1);
}

#map {
    width: 100%;
    height: 100%;
    min-height: 600px;
    background: transparent;
}

.loading {
    text-align: center;
    padding: 60px 20px;
    background: rgba(18, 18, 24, 0.5);
    backdrop-filter: blur(12px);
    border-radius: 32px;
    margin: 24px 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 2px solid rgba(0, 200, 255, 0.2);
    border-top-color: #00ccff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
    box-shadow: 0 0 15px rgba(0, 200, 255, 0.2);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading p {
    color: #00ccff;
    font-weight: 500;
}

.error-result {
    background: rgba(255, 50, 100, 0.1);
    backdrop-filter: blur(8px);
    border-left: 3px solid #ff3366;
    border-radius: 20px;
    padding: 20px 24px;
    margin: 24px 0;
    display: none;
}

.error-result h3 {
    color: #ff6699;
    font-size: 16px;
    margin-bottom: 8px;
}

.footer {
    text-align: center;
    padding: 32px 0 16px;
    color: #5a6e7c;
    font-size: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 48px;
}

::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: rgba(18, 18, 24, 0.5);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 200, 255, 0.3);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 200, 255, 0.5);
}

::selection {
    background: rgba(0, 200, 255, 0.3);
    color: #ffffff;
}

@media (max-width: 900px) {
    .container {
        padding: 16px;
    }
    
    .main-panel {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .header h1 {
        font-size: 28px;
    }
    
    #map {
        min-height: 400px;
    }
    
    .map-container {
        min-height: 400px;
    }
}

@media (max-width: 600px) {
    .header h1 {
        font-size: 22px;
    }
    
    .glow-text {
        font-size: 11px;
        padding: 4px 14px;
    }
}

/* Анимация пульсации для иконок */
@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.fa-spinner, .fa-spinner-pulse {
    animation: fa-spin 1s infinite linear;
}

.fa-pulse {
    animation: pulse 1.5s infinite;
}

/* Прогресс-бар */
#progressBar {
    transition: width 0.3s ease-out;
}

/* Детали шага */
#stepDetail {
    font-family: 'Inter', monospace;
    letter-spacing: 0.3px;
}