﻿:root {
    --bg-primary: #f5f5f5;
    --bg-secondary: white;
    --bg-tertiary: #f8f9fa;
    --bg-accent: #f0f8ff;
    --bg-legend: #fff9e6;
    --border-primary: #dee2e6;
    --border-accent: #b3d9ff;
    --border-legend: #ffd700;
    --text-primary: #333;
    --text-secondary: #495057;
    --text-muted: #6c757d;
    --shadow: rgba(0,0,0,0.1);
}

[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-tertiary: #3a3a3a;
    --bg-accent: #2a3a4a;
    --bg-legend: #3a3020;
    --border-primary: #4a4a4a;
    --border-accent: #4a5a6a;
    --border-legend: #6a5a2a;
    --text-primary: #e0e0e0;
    --text-secondary: #c0c0c0;
    --text-muted: #a0a0a0;
    --shadow: rgba(0,0,0,0.3);
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--bg-secondary);
    border-radius: 10px;
    box-shadow: 0 4px 6px var(--shadow);
    padding: 20px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

h1 {
    text-align: center;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
}

.theme-toggle {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 20px;
    padding: 8px 16px;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background: var(--bg-accent);
}

.main-content {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

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

.chart-container {
    flex: 2;
    min-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.axis-control {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.color-controls, .chart-controls {
    background: var(--bg-accent);
    border: 1px solid var(--border-accent);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.legend-container {
    background: var(--bg-legend);
    border: 1px solid var(--border-legend);
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
    width: 100%;
    max-width: 500px;
}

.axis-control h3, .color-controls h3, .chart-controls h3 {
    margin: 0 0 10px 0;
    color: var(--text-secondary);
    font-size: 16px;
}

.control-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.control-row label {
    min-width: 60px;
    font-weight: bold;
    color: var(--text-muted);
}

.color-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.color-row label {
    min-width: 120px;
    font-weight: bold;
    color: var(--text-muted);
}

.value-weight-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.value-weight-row label {
    min-width: 60px;
    font-weight: bold;
    color: var(--text-muted);
}

input[type="text"] {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid var(--border-primary);
    border-radius: 4px;
    font-size: 14px;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

input[type="number"] {
    width: 60px;
    padding: 6px 8px;
    border: 1px solid var(--border-primary);
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    background: var(--border-primary);
    outline: none;
    transition: background 0.3s;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
    transition: background 0.3s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: #0056b3;
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
    border: none;
    transition: background 0.3s;
}

input[type="range"]::-moz-range-thumb:hover {
    background: #0056b3;
}

input[type="range"]:focus {
    background: #c3d9ff;
}

input[type="color"] {
    width: 40px;
    height: 30px;
    border: 1px solid var(--border-primary);
    border-radius: 4px;
    cursor: pointer;
}

input[type="checkbox"] {
    margin-right: 5px;
}

.buttons {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.download-buttons {
    display: flex;
    gap: 10px;
    margin: 15px 0;
    flex-wrap: wrap;
}

button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #545b62;
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #1e7e34;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-info {
    background-color: #17a2b8;
    color: white;
}

.btn-info:hover {
    background-color: #138496;
}

.btn-warning {
    background-color: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background-color: #e0a800;
}

#radarChart {
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    background: var(--bg-secondary);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.legend-color {
    width: 20px;
    height: 15px;
    border-radius: 3px;
    border: 1px solid var(--border-primary);
}

@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    .chart-container {
        order: -1;
    }
}