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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

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

header {
    background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    font-size: 1rem;
    opacity: 0.9;
}

main {
    padding: 30px;
}

.canvas-section {
    margin-bottom: 30px;
}

.canvas-section h3 {
    color: #374151;
    margin-bottom: 15px;
    font-size: 1.25rem;
}

#circuitCanvas {
    width: 100%;
    background: #faf5ff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: block;
}

.canvas-info {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 15px;
    padding: 15px;
    background: #f5f3ff;
    border-radius: 8px;
}

.info-item {
    font-size: 0.9rem;
    color: #4b5563;
}

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

.info-item span:last-child {
    color: #7c3aed;
    font-family: 'Courier New', monospace;
    font-weight: 700;
}

.controls-panel {
    background: #faf5ff;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

.controls-panel h3 {
    color: #374151;
    margin-bottom: 20px;
    font-size: 1.25rem;
}

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

.control-group {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.control-group h4 {
    color: #7c3aed;
    margin-bottom: 15px;
    font-size: 1rem;
    font-weight: 600;
}

.control-group label {
    display: block;
    margin-bottom: 15px;
    color: #4b5563;
    font-size: 0.9rem;
}

.control-group input[type="range"] {
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    outline: none;
    margin-top: 8px;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    background: #7c3aed;
    border-radius: 50%;
    cursor: pointer;
}

.control-group input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #7c3aed;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.select-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    color: #374151;
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
}

.select-input:focus {
    border-color: #7c3aed;
}

.checkbox-input {
    width: auto;
    margin-right: 8px;
    cursor: pointer;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.control-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.control-btn.close {
    background: #10b981;
    color: white;
}

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

.control-btn.open {
    background: #ef4444;
    color: white;
}

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

.control-btn.reset {
    background: #6b7280;
    color: white;
}

.control-btn.reset:hover {
    background: #4b5563;
    transform: translateY(-2px);
}

.formulas-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.formulas-section h3 {
    color: #7c3aed;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.formula-list {
    display: grid;
    gap: 12px;
}

.formula-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 15px;
    background: #f5f3ff;
    border-radius: 6px;
}

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

.formula {
    font-family: 'Times New Roman', serif;
    font-size: 1.1rem;
    color: #7c3aed;
}

.parameter-display {
    margin-top: 15px;
    padding: 12px;
    background: #ede9fe;
    border-radius: 6px;
    text-align: center;
    color: #4b5563;
    font-size: 0.9rem;
}

.parameter-display span:last-child {
    color: #7c3aed;
    font-family: 'Courier New', monospace;
    font-weight: 700;
}

.instructions {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.instructions h4 {
    color: #7c3aed;
    margin-bottom: 12px;
    font-size: 1rem;
}

.instructions ul {
    list-style: none;
    padding: 0;
}

.instructions li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    color: #4b5563;
    font-size: 0.9rem;
    line-height: 1.5;
}

.instructions li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: #7c3aed;
    font-weight: 700;
}

.explanation {
    background: #faf5ff;
    padding: 30px;
    border-radius: 12px;
    margin-top: 30px;
}

.explanation h2 {
    color: #7c3aed;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.explanation h3 {
    color: #6d28d9;
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

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

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

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

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

    .canvas-info {
        flex-direction: column;
        gap: 10px;
    }
}
