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

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

header {
    background-color: #0066cc;
    color: white;
    text-align: center;
    padding: 1rem;
}

.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.tabs {
    display: flex;
    margin-bottom: 1rem;
}

.tab-btn {
    padding: 0.5rem 1rem;
    background-color: #ddd;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.tab-btn.active {
    background-color: #0066cc;
    color: white;
}

.tab-content {
    display: none;
    padding: 1rem;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.tab-content.active {
    display: block;
}

.simulation-area {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
}

.generator-container {
    position: relative;
    width: 300px;
    height: 300px;
    border: 2px solid #333;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f0f0f0;
}

.permanent-magnet {
    position: absolute;
    width: 80%;
    height: 80%;
    display: flex;
    flex-direction: column;
}

.north-pole, .south-pole {
    height: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 2rem;
}

.north-pole {
    background-color: #ff6b6b;
    border-top-left-radius: 100px;
    border-top-right-radius: 100px;
}

.south-pole {
    background-color: #4d96ff;
    border-bottom-left-radius: 100px;
    border-bottom-right-radius: 100px;
}

.rotor {
    position: absolute;
    width: 60%;
    height: 60%;
    border-radius: 50%;
    background-color: #ccc;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.5s;
}

.coil {
    width: 80%;
    height: 10px;
    background-color: #ff9800;
    position: relative;
}

.coil::before, .coil::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 80%;
    background-color: #ff9800;
    top: -35px;
}

.coil::before {
    left: 0;
}

.coil::after {
    right: 0;
}

.stator {
    position: absolute;
    width: 80%;
    height: 80%;
    border-radius: 50%;
    border: 5px solid #555;
}

.reference-coil, .quadrature-coil {
    position: absolute;
    background-color: #ff9800;
    text-align: center;
    font-size: 0.8rem;
    color: white;
    padding: 5px;
}

.reference-coil {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.quadrature-coil {
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.squirrel-cage {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 5px dashed #888;
    position: relative;
}

.squirrel-cage::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 5px;
    background-color: #888;
    top: 50%;
    transform: translateY(-50%);
}

.squirrel-cage::after {
    content: '';
    position: absolute;
    width: 5px;
    height: 100%;
    background-color: #888;
    left: 50%;
    transform: translateX(-50%);
}

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

input[type="range"] {
    width: 100%;
    margin: 1rem 0;
}

.output-display {
    margin-top: 2rem;
    border: 1px solid #ddd;
    padding: 1rem;
    border-radius: 5px;
}

.voltage-meter {
    height: 30px;
    background-color: #eee;
    border-radius: 15px;
    margin: 1rem 0;
    position: relative;
    overflow: hidden;
}

.voltage-bar {
    height: 100%;
    width: 0;
    background-color: #0066cc;
    transition: width 0.3s;
}

.info-section {
    margin-top: 2rem;
    padding: 1rem;
    background-color: #f9f9f9;
    border-radius: 5px;
    border-left: 5px solid #0066cc;
}

.info-section h3 {
    margin-bottom: 1rem;
    color: #0066cc;
}

.info-section p, .info-section ul {
    margin-bottom: 1rem;
}

.info-section ul {
    padding-left: 2rem;
}