/* subjects/power-systems/css/module1.css */

:root {
    --ps-cyan: #00f5ff;
    --ps-gold: #facc15;
    --ps-orange: #f97316;
    --ps-red: #ef4444;
    --ps-purple: #a78bfa;
    --ps-green: #00ff88;
    --ps-blue: #60a5fa;
    --ps-rose: #fb7185;
}

/* Card Borders */
.card-transmission { border-top: 4px solid var(--ps-cyan); }
.card-distribution { border-top: 4px solid var(--ps-gold); }

.ps-card {
    background-color: #111827;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.formula-zone {
    background-color: #0d1117;
    border-radius: 8px;
    padding: 20px;
}

.anim-zone {
    height: 260px;
    background: #080c14;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Voltage Pyramid Styles */
.pyramid-level {
    cursor: pointer;
    transition: filter 0.3s, transform 0.3s;
}
.pyramid-level:hover {
    filter: brightness(1.3);
    transform: scale(1.02);
}

/* Current Particles */
.current-particle {
    fill: var(--ps-cyan);
    filter: drop-shadow(0 0 5px var(--ps-cyan));
}

@keyframes particleFlow {
    from { offset-distance: 0%; }
    to { offset-distance: 100%; }
}

/* Heat Animation for Power Loss */
@keyframes heatBlur {
    0%, 100% { opacity: 0.3; transform: scale(1); filter: blur(5px); }
    50% { opacity: 0.7; transform: scale(1.1); filter: blur(8px); }
}

.heat-loss-glow {
    fill: var(--ps-red);
    animation: heatBlur 2s infinite ease-in-out;
}

/* Badge Styling */
.ps-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    font-family: 'Orbitron', sans-serif;
    z-index: 10;
}

.badge-cyan { background: rgba(0, 245, 255, 0.2); color: var(--ps-cyan); border: 1px solid var(--ps-cyan); }
.badge-gold { background: rgba(250, 204, 21, 0.2); color: var(--ps-gold); border: 1px solid var(--ps-gold); }
.badge-rose { background: rgba(251, 113, 133, 0.2); color: var(--ps-rose); border: 1px solid var(--ps-rose); }

/* D3 Chart Tooltips */
.d3-tooltip {
    position: absolute;
    background: rgba(0,0,0,0.9);
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 11px;
    pointer-events: none;
    border: 1px solid #444;
    z-index: 100;
}

/* Master Quiz Styles */
.quiz-container {
    perspective: 1000px;
}
.quiz-card-inner {
    transition: transform 0.6s;
    transform-style: preserve-3d;
    cursor: pointer;
}
.quiz-card-inner.flipped {
    transform: rotateY(180deg);
}
.quiz-front, .quiz-back {
    backface-visibility: hidden;
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
}
.quiz-back {
    transform: rotateY(180deg);
    background: #1e293b;
    border: 2px solid var(--ps-green);
}

/* Custom Sliders */
.neon-slider {
    -webkit-appearance: none;
    background: #333;
    height: 4px;
    border-radius: 2px;
}
.neon-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: var(--ps-cyan);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--ps-cyan);
    cursor: pointer;
}
