* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #1a2a6c, #2c3e50);
    color: #ecf0f1;
    min-height: 100vh;
    padding: 5px;
}

.top-bar {
    display: flex;
    align-items: center;
    padding: 2px;
    margin-bottom: 2px;
    background: rgba(44, 62, 80, 0.6);
    border-radius: 8px;
}

.back-btn {
    padding: 8px 16px;
    background: #27ae60;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    margin-right: 20px;
}

.back-btn:hover {
    background: #219a52;
}

.container {
    max-width: 100%;
    margin: 0;
    padding: 0 10px;
}

header {
    text-align: center;
    padding: 15px 0;
    margin-bottom: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

h1 {
    font-size: 2.8rem;
    margin-bottom: 15px;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.8;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    padding: 6px;
    background: rgba(44, 62, 80, 0.6);
    border-radius: 6px;
    margin-bottom: 6px;
    align-items: flex-end;
}

.input-group {
    display: flex;
    flex-direction: column;
    min-width: 200px;
}

.input-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #3498db;
}

input, select {
    padding: 14px 18px;
    border-radius: 8px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

input:focus, select:focus {
    outline: none;
    border-color: #3498db;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.5);
}

input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

.price-input {
    min-width: 120px;
}

.price-input.high-price input {
    border-color: #e74c3c;
}

.price-input.low-price input {
    border-color: #2ecc71;
}

.btn-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.load-btn {
    background: linear-gradient(90deg, #3498db, #2ecc71);
    color: white;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    text-transform: uppercase;
    font-size: 12px;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
    padding: 12px 20px;
    border: none;
    letter-spacing: 1px;
}

.load-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.6);
}

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

.charts-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
}

.chart-box {
    background: rgba(30, 40, 60, 0.7);
    border-radius: 8px;
    padding: 6px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
    width: 100%;
}

.chart-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.chart-title {
    text-align: center;
    font-size: 0.8rem;
    margin-bottom: 5px;
    color: #2ecc71;
    font-weight: 600;
    padding-bottom: 3px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chart {
    height: 200px;
    width: 100%;
}

.chart-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 3px;
    padding: 2px 0;
    font-size: 0.8rem;
}

.header-symbol {
    font-weight: bold;
    color: #3498db;
}

.header-year {
    color: #2ecc71;
    font-weight: 600;
}

.header-high {
    color: #e74c3c;
}

.header-low {
    color: #2ecc71;
}

.header-change {
    font-weight: bold;
}

.header-interval {
    color: #f39c12;
}

.stat-item {
    text-align: center;
    padding: 3px 5px;
    min-width: 70px;
}

.stat-value {
    font-size: 0.75rem;
    font-weight: bold;
    color: #3498db;
}

.stat-label {
    font-size: 0.6rem;
    opacity: 0.8;
    margin-top: 2px;
}

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

.info-card {
    background: rgba(30, 40, 60, 0.7);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.info-card h3 {
    color: #3498db;
    margin-bottom: 15px;
    font-size: 1.3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.info-content {
    line-height: 1.8;
}

.loader {
    display: none;
    text-align: center;
    padding: 30px;
}

.spinner {
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 5px solid #3498db;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.server-status {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px 0;
    padding: 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 10px;
}

.status-online {
    background-color: #2ecc71;
}

.status-offline {
    background-color: #e74c3c;
}

.error-message {
    background: rgba(231, 76, 60, 0.8);
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
}

.footer {
    text-align: center;
    padding: 20px 0;
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.year-navigation {
    position: sticky;
    top: 10px;
    z-index: 100;
    background: rgba(30, 40, 60, 0.9);
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.year-link {
    padding: 8px 15px;
    background: rgba(52, 152, 219, 0.3);
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.year-link:hover {
    background: rgba(52, 152, 219, 0.5);
}

@media (max-width: 768px) {
    .controls {
        flex-direction: column;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    .chart {
        height: 400px;
    }
    
    .year-statistics {
        flex-direction: column;
        gap: 10px;
    }
    
    .input-row {
        flex-direction: column;
        align-items: stretch;
    }
}