/* Fourier Series Simulator - Dark Theme */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #e0e0e0;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5em;
    background: linear-gradient(135deg, #00ff88, #00d4ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.1em;
    color: #8892b0;
    font-weight: 300;
}

.controls-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.control-group {
    display: inline-block;
    margin-right: 30px;
    margin-bottom: 15px;
    vertical-align: top;
}

.control-group label {
    display: block;
    margin-bottom: 8px;
    color: #a0a0a0;
    font-size: 0.9em;
}

.control-group select {
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    color: #e0e0e0;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.control-group select:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(0, 255, 136, 0.5);
}

.control-group input[type="range"] {
    width: 150px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #00ff88, #00d4ff);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 255, 136, 0.3);
}

.control-group input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #00ff88, #00d4ff);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 5px rgba(0, 255, 136, 0.3);
}

.control-group button {
    padding: 10px 20px;
    background: linear-gradient(135deg, #00ff88, #00d4ff);
    border: none;
    border-radius: 5px;
    color: #1a1a2e;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 10px;
}

.control-group button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 136, 0.4);
}

.control-group button:active {
    transform: translateY(0);
}

.control-group.checkboxes {
    display: block;
}

.control-group.checkboxes label {
    display: inline-block;
    margin-right: 20px;
    margin-bottom: 5px;
    cursor: pointer;
}

.control-group.checkboxes input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

.canvas-container {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

canvas {
    display: block;
    margin: 0 auto;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
    cursor: crosshair;
}

.canvas-label {
    text-align: center;
    margin-top: 10px;
    color: #8892b0;
    font-size: 0.9em;
}

.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-box {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 255, 136, 0.2);
    border-color: rgba(0, 255, 136, 0.3);
}

.stat-label {
    color: #8892b0;
    font-size: 0.9em;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 2em;
    font-weight: bold;
    background: linear-gradient(135deg, #00ff88, #00d4ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.info-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.info-section h3 {
    color: #00ff88;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.info-section ul {
    list-style: none;
    padding-left: 0;
}

.info-section li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    line-height: 1.6;
}

.info-section li:last-child {
    border-bottom: none;
}

.info-section strong {
    color: #00d4ff;
}

/* Responsive design */
@media (max-width: 968px) {
    canvas {
        max-width: 100%;
        height: auto;
    }

    .control-group {
        display: block;
        margin-right: 0;
        margin-bottom: 20px;
    }

    .stats-section {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    header h1 {
        font-size: 1.8em;
    }

    .stats-section {
        grid-template-columns: 1fr;
    }
}
