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

body{
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background: black;
    background-image: 
        radial-gradient(ellipse at 20% 30%, rgba(15, 15, 30, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(15, 7, 15, 0.3) 0%, transparent 50%),
        linear-gradient(135deg, black 0%, rgb(22, 22, 22) 50%, rgb(18, 18, 18) 100%);
    background-attachment: fixed;
    color: #fff;
    min-height: 100vh;
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #080808;
    border-bottom: 1px solid #1d1d1d;
    padding: 1rem 2rem;
}

nav > a {
    text-decoration: none;
    font-size: 20px;
    font-weight: bold;
    color: #fff;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 3rem;
    margin: 0;
    padding: 0;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

nav ul a {
    text-decoration: none;
    font-size: 18px;
    color: #fff;
    position: relative;
    display: inline-block;
    transition: color 0.4s ease;
}

nav ul a::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #b8c0ff;
    border-radius: 2px;
    transform: translateX(-50%);
    transition:
        width 0.15s ease,
        left 0.15s ease,
        transform 0.15s ease;
}

nav ul a:hover:not(.active1) {
    color: #b8c0ff;
}

nav ul a:hover:not(.active1)::after {
    width: 50%;
}

nav ul a.active1 {
    color: #b8c0ff;
    font-weight: 600;
}

nav ul a.active1::after {
    width: 100%;
}

.sim-container{
    max-width: 1400px;
    margin: 80px auto 0;
    padding: 2rem;
    padding-top: 0;
}
.sim-header{
    margin-bottom: 2rem;
    text-align: center;
}

.sim-header h1{
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff, #aaa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sim-header p{
    color: #aaa;
    font-size: 1.1rem;   
}

.sim-subtitle{
    color: #888;
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

.sim-layout{
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

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

.sim-canvas-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sim-canvas-wrapper{
    background: rgba(20, 20, 20, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: border-color 0.3s;
}

.sim-canvas-wrapper:hover{
    border-color: rgba(255, 255, 255, 0.2);
}

.sim-canvas{
    width: 100%;
    border-radius: 0.5rem;
    background: #0a0a0a;
    display: block;
}

.sim-controls {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
}

.sim-btn{
    padding: 0.75rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 2rem;
    background: linear-gradient(135deg, rgba(80, 80, 160, 0.6), rgba(120, 60, 120, 0.6));
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95rem;
    font-family: inherit;
}

.sim-btn:hover{
    background: linear-gradient(135deg, rgba(100, 100, 180, 0.8), rgba(140, 80, 140, 0.8));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(100, 100, 180, 0.3);
}

.sim-btn:active{
    transform: translateY(0);
}

.sim-btn:disabled{
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.sim-btn-primary{
    background: linear-gradient(135deg, rgba(100,100,200,0.7), rgba(150,80,150,0.7));
}

.sim-btn-secondary{
    background: rgba(40, 40, 40, 0.8);
}

.sim-btn-secondary:hover{
    background: rgba(60, 60, 60, 0.9);
}

.sim-btn-danger{
    background: linear-gradient(135deg, rgba(200,80,80,0.6), rgba(150,60,100,0.6));
}

/* === STATS GRID === */
.sim-stats{
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.sim-stat-card{
    background: rgba(20, 20, 20, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 1.25rem;
    text-align: center;
    transition: all 0.3s;
}

.sim-stat-card:hover{
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.sim-stat-value{
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.sim-stat-value.blue{ color: #6b9eff; }
.sim-stat-value.green{ color: #6bffb4; }
.sim-stat-value.purple{ color: #b56bff; }
.sim-stat-value.orange{ color: #ffb56b; }
.sim-stat-value.red{ color: #ff6b6b; }
.sim-stat-value.yellow{ color: #ffeb6b; }

.sim-stat-label{
    font-size: 0.85rem;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sim-sidebar{
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 0;
}

.sim-panel{
    background: rgba(20, 20, 20, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: border-color 0.3s;
    overflow: hidden;
    word-wrap: break-word;
}

.sim-panel-header{
    font-size: 1.3rem;
    margin-bottom: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sim-panel-icon{
    font-size: 1.5rem;
}

.sim-control-group{
    margin-bottom: 1.5rem;
}

.sim-control-group:last-child{
    margin-bottom: 0;
}

.sim-control-label{
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
    font-size: 0.9rem;
    color: #ccc;
}

.sim-control-value{
    color: #6b9eff;
    font-weight: 600;
    font-size: 1rem;
}

input[type="range"]{
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb{
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6b9eff, #a56bff);
    cursor: pointer;
    transition: all 0.2s;
}

input[type="range"]::-webkit-slider-thumb:hover{
    width: 22px;
    height: 22px;
    box-shadow: 0 0 10px rgba(107, 158, 255, 0.5);
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6b9eff, #a56bff);
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

input[type="range"]::-moz-range-thumb:hover {
    width: 22px;
    height: 22px;
    box-shadow: 0 0 10px rgba(107, 158, 255, 0.5);
}

input[type="range"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.sim-toggle{
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
}

.sim-toggle-switch{
    position: relative;
    width: 50px;
    height: 26px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 13px;
    cursor: pointer;
    transition: background 0.3s;
}

.sim-toggle-switch.active{
    background: linear-gradient(135deg, #6b9eff, #a56bff);
}

.sim-toggle-switch::after{
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
}

.sim-toggle-switch.active::after{
    transform: translateX(24px);
}

.sim-info-list{
    list-style: none;
    font-size: 0.9rem;
    line-height: 1.8;
    color: #ccc;
    padding: 0;
    margin: 0;
}

.sim-info-list li{
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.sim-info-list li::before{
    content: "•";
    position: absolute;
    left: 0;
    color: #6b9eff;
    font-weight: bold;
    font-size: 1.2rem;
}

.sim-badge{
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sim-badge-easy{
    background: rgba(107, 255, 180, 0.2);
    color: #6bffb4;
    border: 1px solid rgba(107, 255, 180, 0.3);
}

.sim-badge-medium{
    background: rgba(255, 235, 107, 0.2);
    color: #ffeb6b;
    border: 1px solid rgba(255, 235, 107, 0.3);
}

.sim-badge-hard{
    background: rgba(255, 107, 107, 0.2);
    color: #ff6b6b;
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.sim-divider{
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 1.5rem 0;
}

.sim-formula{
    background: rgba(10, 10, 40, 0.6);
    border-left: 3px solid #6b9eff;
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    margin: 1rem 0;
    font-family: 'Georgia', 'Times New Roman', serif;
}

.sim-formula-equation{
    text-align: center;
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: 1px;
    color: #ffffff;
    margin-bottom: 0.5rem;
    font-style: italic;
}

.sim-formula-description{
    text-align: center;
    font-size: 0.85rem;
    color: #b8c0ff;
    font-family: system-ui, -apple-system, sans-serif;
    font-style: normal;
}

.sim-alert {
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    border-left: 4px solid;
}

.sim-alert-info{
    background: rgba(107, 158, 255, 0.15);
    border-color: #6b9eff;
    color: #b8d0ff;
}

.sim-alert-warning{
    background: rgba(255, 235, 107, 0.15);
    border-color: #ffeb6b;
    color: #fff4b8;
}

.sim-alert-success{
    background: rgba(107, 255, 180, 0.15);
    border-color: #6bffb4;
    color: #b8ffdb;
}

.sim-graph-container{
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-top: 1.5rem;
}

.sim-graph-title{
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #ccc;
    text-align: center;
}

.sim-input-group{
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.sim-input{
    flex: 1;
    padding: 0.65rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    color: white;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.3s;
}

.sim-input:focus{
    outline: none;
    border-color: #6b9eff;
    background: rgba(255, 255, 255, 0.08);
}

.sim-input::placeholder{
    color: rgba(255, 255, 255, 0.3);
}

.sim-loading{
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: #6b9eff;
    font-size: 1.1rem;
}

.sim-loading::after{
    content: '...';
    animation: loading 1.5s infinite;
}

@keyframes loading{
    0%, 20%{ content: '.'; }
    40%{ content: '..'; }
    60%, 100%{ content: '...'; }
}

.sim-vector-display{
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 0.5rem;
    margin-top: 1rem;
}

.sim-vector-component{
    flex: 1;
    text-align: center;
}

.sim-vector-component-label{
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.sim-vector-component-value{
    font-size: 1.3rem;
    font-weight: bold;
    font-family: 'Courier New', monospace;
}

@media (max-width: 768px){
    body{
        padding: 1rem;
    }
    
    .sim-container{
        padding: 1rem;
        margin-top: 70px;
    }
    
    .sim-header h1{
        font-size: 1.8rem;
    }
    
    .sim-stats{
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sim-controls{
        flex-direction: column;
    }
    
    .sim-btn{
        width: 100%;
    }
}

.text-center{
    text-align: center;
}
.text-left{
    text-align: left;
}
.text-right{
    text-align: right;
}

.mb-1 {
    margin-bottom: 0.5rem;
}
.mb-2 {
    margin-bottom: 1rem;
}
.mb-3 {
    margin-bottom: 1.5rem;
}
.mb-4 {
    margin-bottom: 2rem;
}

.mt-1 {
    margin-top: 0.5rem;
}
.mt-2 {
    margin-top: 1rem;
}
.mt-3 {
    margin-top: 1.5rem;
}
.mt-4 {
    margin-top: 2rem;
}

.hidden{
    display: none;
}
.visible{
    display: block;
}

.simulation-area {
    position: relative;
    background: #1a1a2e;
    border-radius: 12px;
    padding: 20px;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

#magneticCanvas {
    display: block;
    background: #1a1a2e;
    border-radius: 8px;
    cursor: crosshair;
}

.mode-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.mode-btn {
    padding: 12px;
    background: #111;
    border: 2px solid transparent;
    border-radius: 8px;
    color: var(--sim-text);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mode-btn:hover:not(.active){
    transform: translateY(-2px);
}

.mode-btn.active {
    border-color:rgba(255, 255, 255, 0.5);
}

.compass {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    color: #ff6b6b;
    font-size: 20px;
    font-weight: bold;
}

.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

.phase-indicator {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 1.2em;
    margin-top: 10px;
}

.phase-solid {
    background: rgba(107, 158, 255, 0.3);
    color: #6b9eff;
}

.phase-liquid {
    background: rgba(107, 255, 185, 0.3);
    color: #6bffb9;
}

.phase-gas {
    background: rgba(255, 107, 107, 0.3);
    color: #ff6b6b;
}

.cycle-toggle{
    display: flex;
    gap: 0.75rem;
}

.cycle-btn{
    flex: 1;
    padding: 0.75rem 1.25rem;
    border-radius: 2rem;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(30,30,30,0.8);
    color: #ccc;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cycle-btn:hover{
    background: rgba(60,60,60,0.9);
    color: #fff;
}

.cycle-btn.active{
    background: linear-gradient(135deg, #6b9eff, #a56bff);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(107,158,255,0.35);
}

.sim-badge-hard{
    background: rgba(255, 107, 107, 0.2);
    color: #ff6b6b;
    border: 1px solid rgba(255, 107, 107, 0.3);
}

#planetControls{
    max-height: 300px;
    overflow-y: auto;
    padding-right: 8px;
}

#planetControls::-webkit-scrollbar{
    width: 8px;
}

#planetControls::-webkit-scrollbar-track{
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

#planetControls::-webkit-scrollbar-thumb{
    background: rgba(107, 158, 255, 0.4);
    border-radius: 4px;
    transition: background 0.3s;
}

#planetControls::-webkit-scrollbar-thumb:hover{
    background: rgba(107, 158, 255, 0.6);
}

.planet-control-card{
    margin-bottom: 12px;
    padding: 12px;
    background: rgba(42, 42, 74, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.planet-control-card:hover{
    background: rgba(52, 52, 84, 0.5);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateX(2px);
}

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

.planet-name-wrapper{
    display: flex;
    align-items: center;
    gap: 10px;
}

.planet-color-dot{
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 8px currentColor;
}

.planet-name{
    font-weight: 600;
    font-size: 0.95rem;
    color: #fff;
}

.planet-active-toggle{
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
}

.planet-active-toggle input[type="checkbox"]{
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #6b9eff;
}

.planet-active-label{
    font-size: 11px;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.planet-params{
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: #ccc;
}

.planet-param{
    display: flex;
    align-items: center;
    gap: 4px;
}

.planet-param-label{
    color: #888;
}

.planet-param input[type="number"]{
    width: 55px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 11px;
    transition: all 0.2s;
}

.planet-param input[type="number"]:focus{
    outline: none;
    border-color: #6b9eff;
    background: rgba(255, 255, 255, 0.12);
}

.planet-remove-btn{
    margin-top: 8px;
    padding: 5px 10px;
    background: rgba(255, 107, 107, 0.2);
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 6px;
    color: #ff6b6b;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.2s;
    width: 100%;
}

.planet-remove-btn:hover{
    background: rgba(255, 107, 107, 0.3);
    border-color: rgba(255, 107, 107, 0.5);
    transform: translateY(-1px);
}

.help-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(122, 147, 194, 0.2);
    border: 2px solid rgb(70, 74, 82);
    border-radius: 50%;
    color: #d4e2f3;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.help-tooltip {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 20, 40, 0.95);
    border: 1px solid rgba(107, 158, 255, 0.4);
    border-radius: 8px;
    padding: 12px 16px;
    color: #e0e0e0;
    font-size: 13px;
    line-height: 1.5;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.help-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: rgba(107, 158, 255, 0.4);
}

.help-icon:hover .help-tooltip {
    opacity: 1;
}

li::before{
    transform: translateY(-6px);
}

.oscilloscope-container {
    background: #050510;
    border: 1px solid #1a1a3a;
    border-radius: 8px;
    margin-top: 20px;
    padding: 10px;
    position: relative;
}

.energy-meter {
    height: 12px;
    background: #111;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    margin: 10px 0;
    border: 1px solid #333;
}

#energy-cap {
    background: #ff6b6b;
    height: 100%;
    transition: width 0.1s linear;
}

#energy-ind {
    background: #6b9eff;
    height: 100%;
    transition: width 0.1s linear;
}

.legend {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    margin-top: 5px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.field-indicator-overlay {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.6);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: none;
    backdrop-filter: blur(5px);
}

.field-symbol {
    font-size: 1.2rem;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.b-field-visual {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #6b9eff;
    border-radius: 50%;
    font-size: 10px;
    color: #6b9eff;
}

#simCanvas {
    cursor: crosshair;
}

/* Custom styles for the B-field visual symbols */
.b-point {
    width: 4px;
    height: 4px;
    background: #6b9eff;
    border-radius: 50%;
}

.b-cross {
    position: relative;
    width: 12px;
    height: 12px;
}

.b-cross::before,
.b-cross::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1.5px;
    background: #6b9eff;
    transform: rotate(45deg);
}

.b-cross::after {
    transform: rotate(-45deg);
}

.cycle-phase{
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 1rem;
    margin-top: 10px;
    border: 2px solid;
}

.phase-expansion{
    background: rgba(255, 107, 107, 0.2);
    color: #ff6b6b;
    border-color: rgba(255, 107, 107, 0.4);
}

.phase-transfer{
    background: rgba(255, 235, 107, 0.2);
    color: #ffeb6b;
    border-color: rgba(255, 235, 107, 0.4);
}

.phase-compression{
    background: rgba(107, 158, 255, 0.2);
    color: #6b9eff;
    border-color: rgba(107, 158, 255, 0.4);
}

.phase-return{
    background: rgba(107, 255, 180, 0.2);
    color: #6bffb4;
    border-color: rgba(107, 255, 180, 0.4);
}

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

.pv-diagram{
    background: rgba(20, 20, 20, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-top: 1rem;
}

.pv-title{
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #ccc;
}

.dropdown {
    position: relative;
    cursor: pointer;
}

.dropdown > a {
    cursor: default;
    pointer-events: none;
}

.dropdown-content {
    position: absolute;
    top: calc(100% + 20px);
    left: 50%;
    transform: translateX(-10%);
    background: linear-gradient(135deg, rgba(3, 3, 5, 0.98), rgba(3, 3, 5, 0.98));
    backdrop-filter: blur(10px);
    min-width: 200px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    padding: 8px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
}

.dropdown-content a {
    display: block;
    padding: 12px 20px;
    color: #fff;
    text-decoration: none;
    font-size: 18px;
    border-radius: 8px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.dropdown-content a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(3, 3, 5, 0.98), rgba(3, 3, 5, 0.98));
    transition: left 0.4s ease;
    z-index: -1;
}

.dropdown-content a:not(:last-child) {
    margin-bottom: 4px;
}

.dropdown-content a:hover:not(.active2) {
    background-color: rgba(80, 80, 160, 0.3);
    color: #b8c0ff;
    transform: translateX(4px);
}

.dropdown-content a.active2 {
    background-color: rgba(80, 80, 160, 0.3);
    color: #b8c0ff;
}

.dropdown-content a:hover:not(.active2)::before {
    left: 100%;
}

.dropdown-content::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-600%);
    width: 0;
    height: 0;
    background: linear-gradient(135deg, rgba(3, 3, 5, 0.98), rgba(3, 3, 5, 0.98));
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid rgba(255, 255, 255, 0.12);
}

.dropdown-content::after {
    content: '';
    position: absolute;
    top: -7px;
    left: 50%;
    transform: translateX(-600%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid rgba(3, 3, 5, 0.98);
}
.dropdown::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #b8c0ff;
    border-radius: 2px;
    transform: translateX(-50%);
    transition:
        width 0.15s ease,
        left 0.15s ease,
        transform 0.15s ease;
}

.dropdown:hover::after {
    width: 50%;
}
.dropdown:hover > a {
    color: #b8c0ff;
}
.dropdown::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 20px;
    background: transparent;
}