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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.waves-container {
    max-width: 1600px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 600;
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.9;
}

main {
    padding: 30px;
}

.waves-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.wave-panel {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.wave-panel h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.3em;
    font-weight: 600;
    text-align: center;
}

.wave-panel canvas {
    width: 100%;
    height: 300px;
    background: white;
    border-radius: 10px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1);
}

.wave-info {
    display: grid;
    gap: 10px;
    margin-top: 15px;
}

.info-item {
    background: white;
    padding: 10px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-size: 0.9em;
}

.info-item span:first-child {
    font-weight: 600;
    color: #667eea;
}

.chart-panel {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.chart-panel h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.3em;
    font-weight: 600;
}

.chart-panel canvas {
    width: 100%;
    height: 150px;
    background: white;
    border-radius: 10px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1);
}

.properties-display {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.property-item {
    background: white;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-weight: 600;
    color: #667eea;
}

.controls-panel {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.controls-panel h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.3em;
    font-weight: 600;
}

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

.control-group {
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.control-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #667eea;
}

.control-group input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #e0e7ff;
    outline: none;
    -webkit-appearance: none;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.control-group input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    border: none;
}

.button-group {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    justify-content: center;
}

.control-button {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.control-button.start {
    background: #10b981;
    color: white;
}

.control-button.start:hover {
    background: #059669;
    transform: translateY(-2px);
}

.control-button.pause {
    background: #f59e0b;
    color: white;
}

.control-button.pause:hover {
    background: #d97706;
    transform: translateY(-2px);
}

.control-button.reset {
    background: #ef4444;
    color: white;
}

.control-button.reset:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

.options-panel {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.options-panel h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.2em;
    font-weight: 600;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.option-item:hover {
    background: #f0f9ff;
}

.option-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.formulas-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #e0e7ff;
}

.formulas-section h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.3em;
    font-weight: 600;
}

.formula-list {
    display: grid;
    gap: 15px;
    margin-bottom: 20px;
}

.formula-item {
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.formula-label {
    font-weight: 600;
    color: #667eea;
    min-width: 150px;
}

.formula {
    font-family: 'Courier New', monospace;
    background: #f0f9ff;
    padding: 8px 15px;
    border-radius: 6px;
    color: #0369a1;
    font-size: 0.95em;
}

.comparison-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #e0e7ff;
}

.comparison-section h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.3em;
    font-weight: 600;
}

.comparison-table {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
}

.comparison-table th {
    background: #667eea;
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

.comparison-table td {
    padding: 12px;
    border-bottom: 1px solid #e0e7ff;
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

.comparison-table tr:hover {
    background: #f8f9fa;
}

.explanation {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.explanation h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.8em;
    font-weight: 600;
}

.explanation h3 {
    color: #667eea;
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 1.3em;
    font-weight: 600;
}

.explanation p {
    line-height: 1.8;
    color: #555;
    margin-bottom: 15px;
}

@media (max-width: 1200px) {
    .waves-layout {
        grid-template-columns: 1fr;
    }
}

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

    .controls-grid {
        grid-template-columns: 1fr;
    }

    .button-group {
        flex-direction: column;
    }

    .options-grid {
        grid-template-columns: 1fr;
    }
}
