/**
// ╔════════════════════════════════════════════════════════════════════════╗
// ║  PF_pwmgen.css - PFWS Interaktiver PWM Signal Generator                ║
// ║  Version: 1.1.2b                                                       ║
// ║  Autor: Franz Pfuisi                                                   ║
// ║  PFWS-System: 1.4.1.3.27                                               ║
// ║  Erstellt: 2023-11-15 02:31 (CET)                                      ║
// ║  Update: 2025-12-03 -21:12 (CET)                                       ║
// ║                                                                        ║
// ║  Beschreibung:                                                         ║
// ║     Labor-Design System (#1a1a1a → #4CAF50 → #9FFF9F) – Dark Lab Theme ║
// ║                                                                        ║
// ║  Changelog:                                                            ║
// ║  2025-12-09: v1.0.9b — PFWS 1.4.1.3.27, Integration n, render.php      ║
// ║  2025-12-03: v1.0.3b — PFWS 1.4.1.3.12, Bugs behoben                   ║
// ║  2025-12-02: v1.0.0  — PFWS 1.4.1.3.12, initiale version               ║
// ╚════════════════════════════════════════════════════════════════════════╝
*/


/* ═══════════════════════════════════════════════════════════════════════════════════
   CSS VARIABLES (Labor-Theme mit Grüntönen)
   ═══════════════════════════════════════════════════════════════════════════════════ */
:root {
    --pwmgen-dark-bg: #1a1a1a;
    --pwmgen-panel-bg: #2c2c2c;
    --pwmgen-bg-primary: #1a1a1a;
    --pwmgen-bg-secondary: #242424;
    --pwmgen-bg-tertiary: #101010;
    --pwmgen-primary: #4CAF50;
    --pwmgen-primary-light: #9FFF9F;
    --pwmgen-primary-dark: #388E3C;
    --pwmgen-accent: #ff9800;
    --pwmgen-oscilloscope-bg: #0d1f0d;
    --pwmgen-grid-dark: #1a3a1a;
    --pwmgen-grid-light: #2a4a2a;
    --pwmgen-text: #f0f0f0;
    --pwmgen-text-muted: #cccccc;
    --pwmgen-border: #4a4a4a;
    --pwmgen-border-active: #4CAF50;
    --pwmgen-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    --pwmgen-shadow-hover: 0 6px 20px rgba(0, 0, 0, 0.7);
    --pwmgen-radius: 10px;
    --pwmgen-transition: all 0.3s ease;
    --pwmgen-gradient: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
}

/* ═══════════════════════════════════════════════════════════════════════════════════
   CUSTOM SCROLLBARS (PWM-Gen Green Style)
   ═══════════════════════════════════════════════════════════════════════════════════ */
.pf-pwmgen-box *::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.pf-pwmgen-box *::-webkit-scrollbar-track {
    background: var(--pwmgen-dark-bg);
    border-radius: 5px;
    border: 1px solid var(--pwmgen-border);
}

.pf-pwmgen-box *::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--pwmgen-primary-dark), var(--pwmgen-primary));
    border-radius: 5px;
    border: 2px solid var(--pwmgen-dark-bg);
}

.pf-pwmgen-box *::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--pwmgen-primary), var(--pwmgen-primary-light));
}

/* Firefox Scrollbar */
.pf-pwmgen-box * {
    scrollbar-width: thin;
    scrollbar-color: var(--pwmgen-primary) var(--pwmgen-dark-bg);
}

/* ═══════════════════════════════════════════════════════════════════════════════════
   LAYOUT STRUCTURE (PF_grazratgeber Pattern)
   ═══════════════════════════════════════════════════════════════════════════════════ */
.pf-pwmgen-layout-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
}

.pf-pwmgen-box {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    background: var(--pwmgen-dark-bg);
    border-radius: 14px;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.pf-pwmgen-layout-wrapper.pf-pwmgen-overlay:not(.pf-overlay-dashboard-shell),
.pf-pwmgen-layout-wrapper.pf-pwmgen-dashboard-shell:not(.pf-overlay-dashboard-shell) {
    height: calc(100dvh - 4rem);
    min-height: calc(100svh - 4rem);
    padding: 24px 12px;
    box-sizing: border-box;
    justify-content: center;
    overflow: hidden;
}

.pf-overlay .pf-pwmgen-layout-wrapper.pf-pwmgen-overlay,
.pf-pwmgen-layout-wrapper.pf-pwmgen-overlay {
    height: 100%;
    min-height: 0;
    padding: 0;
    justify-content: flex-start;
}

.pf-pwmgen-launch-context {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 10px 16px;
    background: rgba(76, 175, 80, 0.12);
    border-bottom: 1px solid rgba(159, 255, 159, 0.2);
    color: var(--pwmgen-text);
    font-size: 0.76rem;
}

.pf-pwmgen-launch-context strong,
.pf-pwmgen-launch-context span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(16, 16, 16, 0.52);
    border: 1px solid rgba(159, 255, 159, 0.18);
}

.pf-pwmgen-layout-wrapper.pf-pwmgen-overlay .pf-pwmgen-box,
.pf-pwmgen-box.overlay-mode {
    width: 100%;
    max-width: 1450px;
    height: 100%;
    max-height: 100%;
    background: var(--pwmgen-panel-bg);
    border-radius: 14px;
    overflow: hidden;
    margin: 0 auto;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.pf-pwmgen-layout-wrapper.pf-pwmgen-dashboard-shell .pf-pwmgen-box,
.pf-pwmgen-layout-wrapper.pf-pwmgen-standalone .pf-pwmgen-box,
.pf-pwmgen-layout-wrapper:not(.pf-pwmgen-overlay) .pf-pwmgen-box {
    width: 100%;
    max-width: 1450px;
    height: 100%;
    max-height: 100%;
    margin: 0 auto;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.pf-pwmgen-layout-wrapper.pf-pwmgen-standalone {
    min-height: 100%;
}

.pf-pwmgen-module {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    min-width: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 14px;
}

/* ═══════════════════════════════════════════════════════════════════════════════════
   HEADER (PF_quizgen Pattern mit Lab Green Gradient)
   ═══════════════════════════════════════════════════════════════════════════════════ */
.pf-pwmgen-header {
    background: linear-gradient(135deg, #203320 0%, #254525 34%, #1a2f1a 68%, #162316 100%);
    color: white;
    padding: 12px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0;
    position: sticky;
    top: 0;
    z-index: 2000;
    overflow: visible;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
    flex-shrink: 0;
    isolation: isolate;
}

.pf-pwmgen-header-compact-logo {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.46);
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 0;
    margin: 0;
    cursor: pointer;
}

.pf-pwmgen-header-compact-logo-image {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    object-fit: contain;
}

.pf-pwmgen-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(135deg, #2a4a2a 0%, #3f7a3f 38%, #67b267 74%, #2a4a2a 100%);
    background-size: 300% 300%;
    background-position: 0% 50%;
    pointer-events: none;
    z-index: -1;
    animation: pwmgenHeaderWave 9s ease-in-out infinite;
}

.pf-pwmgen-header::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(ellipse 80% 120% at 20% 30%, rgba(255, 255, 255, 0.58) 0%, rgba(255, 255, 255, 0.18) 50%, transparent 72%);
    animation: pwmgenHeaderShimmer 7s ease-in-out infinite;
}

@keyframes pwmgenHeaderWave {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes pwmgenHeaderShimmer {
    0%, 100% { opacity: 0.45; }
    50% { opacity: 1; }
}

.pf-pwmgen-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
    min-width: 0;
}

.pf-pwmgen-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.pf-pwmgen-drag-handle {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0.1) 100%);
    border: 1px solid rgba(255, 255, 255, 0.32);
    box-shadow: 0 3px 10px rgba(33, 74, 33, 0.22);
}

.pf-pwmgen-drag-handle svg {
    width: 1em;
    height: 1em;
}

.pf-drag-handle {
    display: none;
}

.pf-pwmgen-icon-wrapper {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.24) 0%, rgba(255, 255, 255, 0.1) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 2px 6px rgba(33, 74, 33, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.22);
    flex-shrink: 0;
    padding: 0;
    margin: 0;
}

.pf-pwmgen-icon-wrapper:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.34) 0%, rgba(255, 255, 255, 0.16) 100%);
    box-shadow: 0 6px 14px rgba(33, 74, 33, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.pf-pwmgen-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.08rem;
    line-height: 1;
}

.pf-pwmgen-icon[hidden],
.pf-pwmgen-icon-wrapper [data-icon-state][hidden] {
    display: none !important;
}

.pf-pwmgen-icon svg {
    width: 1.08em;
    height: 1.08em;
    display: block;
    flex-shrink: 0;
}

.pf-pwmgen-label-icon,
.pf-pwmgen-viz-title,
.pf-pwmgen-run-state,
.pf-pwmgen-copy-btn,
.pf-pwmgen-settings-actions .pf-pwmgen-reset-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.pf-pwmgen-label-icon {
    width: 1em;
    height: 1em;
    flex-shrink: 0;
}

.pf-pwmgen-label-icon svg,
.pf-pwmgen-tab-icon svg,
.pf-pwmgen-btn-icon svg,
.pf-pwmgen-reset-icon svg,
.pf-pwmgen-panel-drag-icon svg,
.pf-pwmgen-collapse-icon svg,
.pf-pwmgen-settings-icon svg,
.pf-pwmgen-help-icon svg,
.pf-pwmgen-help-hero-icon svg,
.pf-pwmgen-help-highlight-icon svg,
.pf-pwmgen-help-card-icon svg,
.pf-pwmgen-help-app-icon svg,
.pf-pwmgen-oszi-hint-icon svg,
.pf-pwmgen-scroll-icon svg,
.pf-pwmgen-viz-title-icon svg,
.pf-pwmgen-room-icon svg,
.pf-pwmgen-converter-icon svg {
    width: 1em;
    height: 1em;
    display: block;
    flex-shrink: 0;
}

.pf-pwmgen-viz-title-icon,
.pf-pwmgen-btn-icon,
.pf-pwmgen-reset-icon,
.pf-pwmgen-help-icon,
.pf-pwmgen-help-highlight-icon,
.pf-pwmgen-help-card-icon,
.pf-pwmgen-help-app-icon,
.pf-pwmgen-oszi-hint-icon,
.pf-pwmgen-scroll-icon,
.pf-pwmgen-panel-drag-icon,
.pf-pwmgen-collapse-icon,
.pf-pwmgen-room-icon,
.pf-pwmgen-converter-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.pf-pwmgen-run-icon-state {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pf-pwmgen-run-icon-state[hidden] {
    display: none !important;
}

.pf-pwmgen-run-text {
    letter-spacing: 0.5px;
}

.pf-pwmgen-title-section {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.pf-pwmgen-title {
    margin: 0;
    font-size: 1.18rem;
    font-weight: 700;
    color: var(--pwmgen-primary-light);
    text-shadow: 0 0 10px rgba(159, 255, 159, 0.5);
    line-height: 1.08;
}

.pf-pwmgen-meta {
    font-size: 0.76rem;
    opacity: 0.92;
    color: rgba(255, 255, 255, 0.95);
}

.pf-pwmgen-user {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    height: 34px;
    min-height: 34px;
    padding: 3px 6px;
    font-size: 0.75rem;
    font-weight: 600;
    opacity: 1;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.1) 100%);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 0 0 1px rgba(255, 255, 255, 0.06);
    cursor: pointer;
}

.pf-pwmgen-user:focus-visible {
    outline: 2px solid rgba(159, 255, 159, 0.8);
    outline-offset: 2px;
}

.pf-pwmgen-bubu-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    min-height: 34px;
    padding: 3px 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.24) 0%, rgba(255, 255, 255, 0.1) 100%);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.06);
    cursor: default;
}

.pf-pwmgen-bubu-icon {
    font-size: 0.88rem;
    line-height: 1;
}

.pf-pwmgen-bubu-value {
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.01em;
}

.pf-pwmgen-dashboard-menu {
    position: relative;
}

.pf-pwmgen-dashboard-submenu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 218px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
    border-radius: 12px;
    background: rgba(8, 20, 16, 0.98);
    border: 1px solid rgba(159, 255, 159, 0.24);
    box-shadow: 0 14px 26px rgba(1, 6, 4, 0.45);
    z-index: 1300;
}

.pf-pwmgen-dashboard-submenu[hidden] {
    display: none !important;
}

.pf-pwmgen-dashboard-submenu-item {
    border: 0;
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    border-radius: 9px;
    padding: 9px 12px;
    font-size: 0.86rem;
    font-weight: 600;
    color: #ecfff1;
    background: rgba(255, 255, 255, 0.05);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.pf-pwmgen-dashboard-submenu-item:hover,
.pf-pwmgen-dashboard-submenu-item:focus-visible {
    background: rgba(159, 255, 159, 0.17);
    transform: translateX(1px);
    outline: none;
}

.pf-pwmgen-dashboard-submenu-switch {
    justify-content: space-between;
    gap: 12px;
}

.pf-pwmgen-dashboard-submenu-switch-label {
    flex: 1 1 auto;
}

.pf-pwmgen-dashboard-submenu-switch-ui {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.pf-pwmgen-dashboard-submenu-switch-track {
    width: 36px;
    height: 20px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.18);
    display: inline-flex;
    align-items: center;
    padding: 2px;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.pf-pwmgen-dashboard-submenu-switch-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, #9fff9f 0%, #4caf50 100%);
    transform: translateX(16px);
    transition: transform 0.2s ease, background 0.2s ease;
}

.pf-pwmgen-dashboard-submenu-switch[aria-pressed="false"] .pf-pwmgen-dashboard-submenu-switch-track {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
}

.pf-pwmgen-dashboard-submenu-switch[aria-pressed="false"] .pf-pwmgen-dashboard-submenu-switch-dot {
    transform: translateX(0);
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
}

.pf-pwmgen-header.no-shimmer,
.pf-pwmgen-footer.no-shimmer {
    animation: none !important;
    background: linear-gradient(135deg, #1f1f1f 0%, #121212 100%);
}

.pf-pwmgen-header.no-shimmer::before,
.pf-pwmgen-footer.no-shimmer::before,
.pf-pwmgen-header.no-shimmer::after,
.pf-pwmgen-footer.no-shimmer::after {
    display: none !important;
}

.pf-pwmgen-header.no-shimmer {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.32);
}

.pf-pwmgen-footer.no-shimmer {
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.45);
}

.pf-pwmgen-dashboard-menu.is-open .pf-pwmgen-btn-dashboard {
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.4);
}

/* TOOLTIPS */
.pf-pwmgen-tooltip-anchor {
    position: relative;
}

.pf-pwmgen-tooltip-anchor::after {
    content: attr(data-pf-tooltip);
    position: absolute;
    left: 50%;
    top: calc(100% + 8px);
    transform: translateX(-50%) translateY(-4px);
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.94);
    color: #f8fafc;
    font-size: 0.74rem;
    font-weight: 700;
    white-space: normal;
    min-width: 84px;
    max-width: min(220px, calc(100vw - 24px));
    text-align: center;
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.28);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 1400;
}

.pf-pwmgen-tooltip-anchor::before {
    content: '';
    position: absolute;
    left: 50%;
    top: calc(100% + 3px);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid rgba(15, 23, 42, 0.94);
    transform: translateX(-50%) translateY(-4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 1400;
}

.pf-pwmgen-tooltip-anchor:hover::after,
.pf-pwmgen-tooltip-anchor:focus-visible::after,
.pf-pwmgen-tooltip-anchor:hover::before,
.pf-pwmgen-tooltip-anchor:focus-visible::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.pf-pwmgen-tooltip-left::after {
    left: 0;
    right: auto;
    transform: translateY(-4px);
}

.pf-pwmgen-tooltip-left::before {
    left: 14px;
    right: auto;
    transform: translateY(-4px);
}

.pf-pwmgen-tooltip-bottom-left::after {
    left: 0;
    right: auto;
    transform: translateY(-4px);
}

.pf-pwmgen-tooltip-bottom-left::before {
    left: 14px;
    right: auto;
    transform: translateY(-4px);
}

.pf-pwmgen-tooltip-right::after {
    left: auto;
    right: 0;
    transform: translateY(-4px);
}

.pf-pwmgen-tooltip-right::before {
    left: auto;
    right: 14px;
    transform: translateY(-4px);
}

.pf-pwmgen-tooltip-left:hover::after,
.pf-pwmgen-tooltip-left:focus-visible::after,
.pf-pwmgen-tooltip-bottom-left:hover::after,
.pf-pwmgen-tooltip-bottom-left:focus-visible::after,
.pf-pwmgen-tooltip-right:hover::after,
.pf-pwmgen-tooltip-right:focus-visible::after {
    transform: translateY(0);
}

.pf-pwmgen-tooltip-left:hover::before,
.pf-pwmgen-tooltip-left:focus-visible::before,
.pf-pwmgen-tooltip-bottom-left:hover::before,
.pf-pwmgen-tooltip-bottom-left:focus-visible::before,
.pf-pwmgen-tooltip-right:hover::before,
.pf-pwmgen-tooltip-right:focus-visible::before {
    transform: translateY(0);
}

.pf-pwmgen-tooltip-info::after {
    min-width: 98px;
    text-align: left;
}

.pf-pwmgen-tooltip-profile::after {
    min-width: 94px;
}

.pf-pwmgen-tooltip-dashboard::after {
    min-width: 138px;
}

.pf-pwmgen-tooltip-reveal::after {
    min-width: 160px;
}

@media (hover: none) {
    .pf-pwmgen-tooltip-anchor::before,
    .pf-pwmgen-tooltip-anchor::after {
        display: none;
    }
}

.pf-pwmgen-user-avatar {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.24) 0%, rgba(255, 255, 255, 0.12) 100%);
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: none;
    line-height: 1;
}

.pf-pwmgen-user-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.pf-pwmgen-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pf-pwmgen-user-name {
    display: inline-flex;
    align-items: center;
    line-height: 1;
    white-space: nowrap;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
}

.pf-pwmgen-btn-dashboard {
    padding: 6px 10px;
    height: 34px;
    min-height: 34px;
    background: rgba(8, 17, 31, 0.28);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--pwmgen-transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
    text-shadow: none;
}

.pf-pwmgen-btn-dashboard:hover {
    background: rgba(8, 17, 31, 0.42);
    border-color: rgba(255, 255, 255, 0.34);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
    transform: translateY(0);
}

.pf-pwmgen-dash-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    box-shadow: none;
    flex-shrink: 0;
}

.pf-pwmgen-dash-logo {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    filter: none;
    transition: transform 0.45s ease, filter 0.45s ease;
}

.pf-pwmgen-dash-link:hover .pf-pwmgen-dash-logo {
    transform: rotate(180deg) scale(1.06);
    filter: none;
}

.pf-pwmgen-dash-label {
    letter-spacing: 0.02em;
}

/* ═══════════════════════════════════════════════════════════════════════════════════
   INFO SECTION (PF_quizgen 2-Spalten-Layout - Dark Lab Theme)
   ═══════════════════════════════════════════════════════════════════════════════════ */
.pf-pwmgen-info-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #0d1f0d 100%);
    padding: 25px 30px;
    border-bottom: 2px solid var(--pwmgen-primary);
    flex-shrink: 0;
}

.pf-pwmgen-info-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.pf-pwmgen-info-description label,
.pf-pwmgen-info-description .pf-pwmgen-info-heading {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--pwmgen-primary-light);
    margin-bottom: 10px;
}

.pf-pwmgen-desc {
    background: var(--pwmgen-panel-bg);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--pwmgen-border);
    max-height: 476px;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.6;
    color: var(--pwmgen-text);
}

.pf-pwmgen-desc h3 {
    color: var(--pwmgen-primary-light);
    margin-top: 0;
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(159, 255, 159, 0.5);
}

.pf-pwmgen-desc h4 {
    color: var(--pwmgen-primary);
    margin: 15px 0 8px 0;
    font-size: 1.1em;
}

.pf-pwmgen-desc ul {
    margin: 10px 0;
    padding-left: 20px;
    color: var(--pwmgen-text-muted);
}

.pf-pwmgen-desc p {
    margin: 10px 0;
    color: var(--pwmgen-text-muted);
}

.pf-pwmgen-desc strong {
    color: var(--pwmgen-primary-light);
}

/* Scrollbar für Beschreibung (Lab Green) */
.pf-pwmgen-desc::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.pf-pwmgen-desc::-webkit-scrollbar-track {
    background: var(--pwmgen-dark-bg);
    border-radius: 5px;
}

.pf-pwmgen-desc::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--pwmgen-primary) 0%, var(--pwmgen-primary-dark) 100%);
    border-radius: 5px;
    border: 2px solid var(--pwmgen-dark-bg);
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

.pf-pwmgen-desc::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--pwmgen-primary-light) 0%, var(--pwmgen-primary) 100%);
    box-shadow: 0 0 15px rgba(159, 255, 159, 0.7);
}

/* Firefox Scrollbar */
.pf-pwmgen-desc {
    scrollbar-width: thin;
    scrollbar-color: var(--pwmgen-primary) var(--pwmgen-dark-bg);
}

.pf-pwmgen-info-metadata label,
.pf-pwmgen-info-metadata .pf-pwmgen-info-heading {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--pwmgen-primary-light);
    margin-bottom: 10px;
}

.pf-pwmgen-metadata-list {
    background: var(--pwmgen-panel-bg);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--pwmgen-border);
}

.pf-pwmgen-metadata-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 0;
    border-bottom: 1px solid var(--pwmgen-border);
}

.pf-pwmgen-metadata-item:last-child {
    border-bottom: none;
}

.pf-pwmgen-metadata-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--pwmgen-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pf-pwmgen-metadata-value {
    font-size: 14px;
    color: var(--pwmgen-primary-light);
    font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════════════════════════
   MAIN CONTENT (mit Tab-System)
   ═══════════════════════════════════════════════════════════════════════════════════ */
.pf-pwmgen-content {
    flex: 1;
    overflow: hidden;
    background: var(--pwmgen-dark-bg);
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

/* ═══════════════════════════════════════════════════════════════════════════════════
   TAB NAVIGATION (PF_quizgen Style exakt mit PWM-Green)
   ═══════════════════════════════════════════════════════════════════════════════════ */

.pf-pwmgen-tabs {
    display: flex;
    gap: 0;
    background: var(--pwmgen-dark-bg);
    position: relative;
    flex-shrink: 0;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 10px 20px 0 20px;
    margin-top: 0;
}

/* Border-Bottom mit Gradient (Grün → Dunkelgrün) */
.pf-pwmgen-tabs::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--pwmgen-primary) 0%, var(--pwmgen-primary-dark) 100%);
    z-index: 0;
}

.pf-pwmgen-tabs::-webkit-scrollbar {
    display: none;
}

.pf-pwmgen-tab-btn {
    padding: 12px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--pwmgen-text-muted);
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Nicht-aktive Tabs: Gradient Border-Bottom */
.pf-pwmgen-tab-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--pwmgen-primary) 0%, var(--pwmgen-primary-dark) 100%);
    opacity: 0.3;
    transition: all 0.3s ease;
}

.pf-pwmgen-tab-btn:hover {
    color: var(--pwmgen-primary-light);
}

.pf-pwmgen-tab-btn:hover::after {
    opacity: 0.6;
}

.pf-pwmgen-tab-btn.active {
    color: var(--pwmgen-primary-light);
    background: var(--pwmgen-dark-bg);
}

/* Aktiver Tab: Gradient-Border unten ausblenden */
.pf-pwmgen-tab-btn.active::after {
    opacity: 0;
}

/* Active Tab: Border oben, links (2px), rechts (2px) - KEIN Border unten */
.pf-pwmgen-tab-btn.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: -2px;
    right: -2px;
    bottom: 0;
    border-top: 2px solid var(--pwmgen-primary);
    border-left: 2px solid var(--pwmgen-primary);
    border-right: 2px solid var(--pwmgen-primary-dark);
    border-bottom: 2px solid var(--pwmgen-dark-bg);  /* Verbindet Tab mit Content */
    z-index: -1;
}

/* Active Tab Text mit Gradient */
.pf-pwmgen-tab-btn.active .pf-pwmgen-tab-label {
    background: linear-gradient(90deg, var(--pwmgen-primary) 0%, var(--pwmgen-primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Active Tab Icon bleibt sichtbar */
.pf-pwmgen-tab-btn.active .pf-pwmgen-tab-icon {
    filter: drop-shadow(0 1px 0 var(--pwmgen-primary))
            drop-shadow(0 2px 0 var(--pwmgen-primary))
            drop-shadow(0 3px 0 var(--pwmgen-primary-light))
            hue-rotate(90deg)
            saturate(2)
            brightness(1.3);
}

.pf-pwmgen-tab-icon {
    font-size: 18px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: filter 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pf-pwmgen-tab-icon .pf-pwmgen-tab-icon-svg {
    width: 1em;
    height: 1em;
    display: block;
    flex-shrink: 0;
}

.pf-pwmgen-tab-label {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* ═══════════════════════════════════════════════════════════════════════════════════
   TAB CONTENT WRAPPER (PF_quizgen Style - Borders hier, nicht bei tab-content)
   ═══════════════════════════════════════════════════════════════════════════════════ */
.pf-pwmgen-content-wrapper {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    
    /* Content bekommt die seitlichen Borders (wie quizgen) */
    border-left: 4px solid var(--pwmgen-primary);
    border-right: 4px solid var(--pwmgen-primary-dark);
    background: var(--pwmgen-dark-bg);
}

/* Beautiful Scrollbar Styling */
.pf-pwmgen-content-wrapper::-webkit-scrollbar {
    width: 12px;
}

.pf-pwmgen-content-wrapper::-webkit-scrollbar-track {
    background: var(--pwmgen-panel-bg);
}

.pf-pwmgen-content-wrapper::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--pwmgen-primary) 0%, var(--pwmgen-primary-dark) 100%);
    border-radius: 6px;
}

.pf-pwmgen-content-wrapper::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--pwmgen-primary-light) 0%, var(--pwmgen-primary) 100%);
}

/* Firefox Scrollbar */
.pf-pwmgen-content-wrapper {
    scrollbar-width: thin;
    scrollbar-color: var(--pwmgen-primary) var(--pwmgen-panel-bg);
}


.pf-pwmgen-tab-content {
    display: none;
    padding: 30px;
    animation: pfPwmgenFadeIn 0.3s ease;
    min-height: 100%;
    position: relative;
}

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

@keyframes pfPwmgenFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ═══════════════════════════════════════════════════════════════════════════════════
   LEARNING SECTIONS (Transistor-Tab, Code-Tab)
   ═══════════════════════════════════════════════════════════════════════════════════ */
.pf-pwmgen-learning-section {
    margin-bottom: 25px;
}

.pf-pwmgen-learning-section h3 {
    color: var(--pwmgen-primary-light);
    font-size: 20px;
    margin-bottom: 12px;
    border-left: 4px solid var(--pwmgen-primary);
    padding-left: 12px;
}

.pf-pwmgen-learning-section p {
    color: var(--pwmgen-text-muted);
    line-height: 1.6;
    margin-bottom: 12px;
}

.pf-pwmgen-info-box {
    background: var(--pwmgen-panel-bg);
    border: 2px solid var(--pwmgen-border);
    border-radius: 8px;
    padding: 15px;
    color: var(--pwmgen-text-muted);
    line-height: 1.6;
}

.pf-pwmgen-info-box p {
    margin: 10px 0;
}

.pf-pwmgen-info-box strong {
    color: var(--pwmgen-primary-light);
}

.pf-pwmgen-info-box ul {
    margin: 10px 0;
    padding-left: 20px;
}

.pf-pwmgen-info-box li {
    margin: 8px 0;
}

/* ═══════════════════════════════════════════════════════════════════════════════════
   CIRCUIT SECTION (Transistor-Tab)
   ═══════════════════════════════════════════════════════════════════════════════════ */
.pf-pwmgen-circuit-section {
    margin-bottom: 25px;
}

.pf-pwmgen-circuit-section h3 {
    color: var(--pwmgen-primary-light);
    font-size: 20px;
    margin-bottom: 12px;
    border-left: 4px solid var(--pwmgen-primary);
    padding-left: 12px;
}

.pf-pwmgen-circuit-hint {
    background: rgba(76, 175, 80, 0.1);
    border-left: 4px solid var(--pwmgen-primary);
    padding: 10px 15px;
    margin-bottom: 15px;
    border-radius: 5px;
    color: var(--pwmgen-text);
}

.pf-pwmgen-circuit-container {
    background: var(--pwmgen-panel-bg);
    border: 2px solid var(--pwmgen-border-active);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#pf-pwmgen-circuit-svg {
    width: 100%;
    max-width: 600px;
    height: auto;
    margin: 0 auto;
    background: var(--pwmgen-oscilloscope-bg);
    border-radius: 8px;
    padding: 15px;
    border: 2px solid var(--pwmgen-grid-dark);
}

.pf-pwmgen-hoverable {
    cursor: help;
    transition: var(--pwmgen-transition);
}

.pf-pwmgen-hoverable:hover {
    filter: brightness(1.3);
}

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

.pf-pwmgen-circuit-card {
    background: var(--pwmgen-dark-bg);
    border: 2px solid var(--pwmgen-border);
    border-radius: 8px;
    padding: 15px;
}

.pf-pwmgen-circuit-card strong {
    display: block;
    color: var(--pwmgen-primary-light);
    font-size: 14px;
    margin-bottom: 8px;
}

.pf-pwmgen-circuit-card p {
    color: var(--pwmgen-text-muted);
    font-size: 13px;
    margin: 5px 0;
}

#pf-pwmgen-led-indicator {
    transition: opacity 0.1s ease, filter 0.1s ease;
}

/* ═══════════════════════════════════════════════════════════════════════════════════
   CODE SECTIONS (Mikrocontroller-Tab)
   ═══════════════════════════════════════════════════════════════════════════════════ */
.pf-pwmgen-code-section {
    margin-bottom: 25px;
}

.pf-pwmgen-code-section h4 {
    color: var(--pwmgen-primary-light);
    font-size: 18px;
    margin-bottom: 10px;
    padding-left: 8px;
    border-left: 3px solid var(--pwmgen-primary);
}

.pf-pwmgen-code {
    display: block;
    background: #0f0f0f;
    border: 2px solid var(--pwmgen-border-active);
    border-radius: 8px;
    padding: 15px;
    color: #9FFF9F;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre;
    margin: 10px 0;
}

.pf-pwmgen-code-info {
    background: var(--pwmgen-panel-bg);
    border: 2px solid var(--pwmgen-border);
    border-left: 4px solid var(--pwmgen-primary);
    border-radius: 8px;
    padding: 12px 15px;
    margin-top: 10px;
}

.pf-pwmgen-code-info p {
    color: var(--pwmgen-text-muted);
    font-size: 13px;
    margin: 5px 0;
}

.pf-pwmgen-code-info strong {
    color: var(--pwmgen-primary-light);
}

/* ═══════════════════════════════════════════════════════════════════════════════════
   SETTINGS TAB
   ═══════════════════════════════════════════════════════════════════════════════════ */
.pf-pwmgen-settings-section {
    max-width: 900px;
    margin: 0 auto;
}

.pf-pwmgen-settings-section h3 {
    color: var(--pwmgen-primary-light);
    font-size: 24px;
    margin-bottom: 12px;
    border-left: 5px solid var(--pwmgen-primary);
    padding-left: 15px;
}

.pf-pwmgen-settings-hint {
    background: rgba(76, 175, 80, 0.1);
    border-left: 4px solid var(--pwmgen-primary);
    padding: 12px 15px;
    margin-bottom: 25px;
    border-radius: 5px;
    color: var(--pwmgen-text);
    font-size: 14px;
}

.pf-pwmgen-settings-group {
    background: var(--pwmgen-panel-bg);
    border: 2px solid var(--pwmgen-border);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.pf-pwmgen-settings-group.pf-pwmgen-highlight {
    background: rgba(76, 175, 80, 0.15);
    border-color: var(--pwmgen-primary);
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.4);
}

.pf-pwmgen-settings-group h4 {
    color: var(--pwmgen-primary-light);
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--pwmgen-border);
}

.pf-pwmgen-setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid var(--pwmgen-border);
}

.pf-pwmgen-setting-item:last-child {
    border-bottom: none;
}

.pf-pwmgen-setting-item label {
    flex: 0 0 auto;
    max-width: 150px;
    color: var(--pwmgen-text);
    font-weight: 500;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pf-pwmgen-setting-select,
.pf-pwmgen-setting-input {
    flex: 0 0 200px;
    padding: 8px 12px;
    background: var(--pwmgen-dark-bg);
    border: 2px solid var(--pwmgen-border);
    border-radius: 6px;
    color: var(--pwmgen-text);
    font-size: 14px;
}

.pf-pwmgen-setting-select:focus,
.pf-pwmgen-setting-input:focus {
    outline: none;
    border-color: var(--pwmgen-primary);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.pf-pwmgen-setting-range {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    background: var(--pwmgen-dark-bg);
    border-radius: 5px;
    outline: none;
}

.pf-pwmgen-setting-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, var(--pwmgen-primary), var(--pwmgen-primary-light));
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.4);
}

.pf-pwmgen-setting-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, var(--pwmgen-primary), var(--pwmgen-primary-light));
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.4);
}

.pf-pwmgen-setting-value {
    flex: 0 0 80px;
    text-align: right;
    color: var(--pwmgen-primary-light);
    font-weight: 600;
}

.pf-pwmgen-setting-info {
    flex: 1;
    color: var(--pwmgen-text-muted);
    font-size: 12px;
}

.pf-pwmgen-setting-color {
    flex: 0 0 80px;
    height: 40px;
    border: 2px solid var(--pwmgen-border);
    border-radius: 6px;
    cursor: pointer;
    background: transparent;
}

.pf-pwmgen-setting-color::-webkit-color-swatch {
    border-radius: 4px;
    border: none;
}

.pf-pwmgen-setting-color::-moz-color-swatch {
    border-radius: 4px;
    border: none;
}

/* Color Preview Container */
.pf-pwmgen-color-preview-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
    padding: 15px;
    background: var(--pwmgen-bg-secondary);
    border: 1px solid var(--pwmgen-border);
    border-radius: 8px;
}

.pf-pwmgen-color-preview-container label,
.pf-pwmgen-color-preview-container .pf-pwmgen-color-preview-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--pwmgen-text);
}

.pf-pwmgen-color-preview-canvas {
    width: 100%;
    max-width: 300px;
    height: 150px;
    border: 2px solid var(--pwmgen-border);
    border-radius: 6px;
    background: #000;
    cursor: crosshair;
}

/* Toggle Switch */
.pf-pwmgen-toggle-switch {
    position: relative;
    width: 60px;
    height: 30px;
    display: inline-block;
}

.pf-pwmgen-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.pf-pwmgen-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--pwmgen-dark-bg);
    border: 2px solid var(--pwmgen-border);
    border-radius: 30px;
    transition: var(--pwmgen-transition);
}

.pf-pwmgen-toggle-slider:before {
    content: '';
    position: absolute;
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 2px;
    background: var(--pwmgen-text-muted);
    border-radius: 50%;
    transition: var(--pwmgen-transition);
}

.pf-pwmgen-toggle-switch input:checked + .pf-pwmgen-toggle-slider {
    background: var(--pwmgen-primary);
    border-color: var(--pwmgen-primary-light);
}

.pf-pwmgen-toggle-switch input:checked + .pf-pwmgen-toggle-slider:before {
    transform: translateX(30px);
    background: #ffffff;
}

/* Preset Buttons */
.pf-pwmgen-preset-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.pf-pwmgen-preset-btn {
    padding: 12px 20px;
    background: var(--pwmgen-dark-bg);
    border: 2px solid var(--pwmgen-border);
    border-radius: 8px;
    color: var(--pwmgen-text);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--pwmgen-transition);
}

.pf-pwmgen-preset-btn:hover {
    background: var(--pwmgen-primary);
    border-color: var(--pwmgen-primary-light);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

/* Reset Buttons */
.pf-pwmgen-reset-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
}

.pf-pwmgen-reset-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pf-pwmgen-reset-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: linear-gradient(135deg, #d32f2f, #c62828);
    border: 2px solid #ef5350;
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(211, 47, 47, 0.3);
    white-space: nowrap;
    min-width: 150px;
}

.pf-pwmgen-reset-btn:hover {
    background: linear-gradient(135deg, #c62828, #b71c1c);
    border-color: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(211, 47, 47, 0.5);
}

.pf-pwmgen-reset-btn:active {
    transform: translateY(0);
}

.pf-pwmgen-reset-icon {
    font-size: 18px;
}

.pf-pwmgen-reset-text {
    font-weight: 600;
}

.pf-pwmgen-reset-desc {
    flex: 1;
    font-size: 0.9rem;
    color: var(--pwmgen-text-muted);
    line-height: 1.4;
}

/* Custom Confirm Dialog */
.pf-pwmgen-confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: pf-pwmgen-fade-in 0.3s ease;
}

.pf-pwmgen-confirm-overlay.active {
    display: flex;
}

.pf-pwmgen-confirm-dialog {
    background: linear-gradient(135deg, #1a1a1a, #0d0d0d);
    border: 2px solid var(--pwmgen-primary);
    border-radius: 16px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(76, 175, 80, 0.4);
    animation: pf-pwmgen-scale-in 0.3s ease;
    text-align: center;
}

.pf-pwmgen-confirm-icon {
    font-size: 64px;
    margin-bottom: 20px;
    animation: pf-pwmgen-pulse 2s ease-in-out infinite;
}

.pf-pwmgen-confirm-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--pwmgen-primary-light);
    margin-bottom: 15px;
}

.pf-pwmgen-confirm-message {
    font-size: 16px;
    color: var(--pwmgen-text);
    line-height: 1.6;
    margin-bottom: 30px;
}

.pf-pwmgen-confirm-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.pf-pwmgen-confirm-btn {
    padding: 12px 30px;
    border: 2px solid;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.pf-pwmgen-confirm-cancel {
    background: transparent;
    border-color: #666;
    color: #999;
}

.pf-pwmgen-confirm-cancel:hover {
    background: #333;
    border-color: #888;
    color: #fff;
}

.pf-pwmgen-confirm-ok {
    background: linear-gradient(135deg, #d32f2f, #c62828);
    border-color: #ef5350;
    color: #fff;
}

.pf-pwmgen-confirm-ok:hover {
    background: linear-gradient(135deg, #c62828, #b71c1c);
    border-color: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(211, 47, 47, 0.5);
}

@keyframes pf-pwmgen-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pf-pwmgen-scale-in {
    from { 
        transform: scale(0.8);
        opacity: 0;
    }
    to { 
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes pf-pwmgen-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Share & Save Actions */
.pf-pwmgen-share-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.pf-pwmgen-action-btn {
    padding: 12px 16px;
    background: var(--pwmgen-dark-bg);
    border: 2px solid var(--pwmgen-border);
    border-radius: 8px;
    color: var(--pwmgen-text);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.pf-pwmgen-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.pf-pwmgen-share-btn:hover {
    border-color: #2196F3;
    color: #2196F3;
}

.pf-pwmgen-embed-btn:hover {
    border-color: #9C27B0;
    color: #9C27B0;
}

.pf-pwmgen-save-btn:hover {
    border-color: var(--pwmgen-primary);
    color: var(--pwmgen-primary);
}

.pf-pwmgen-load-btn:hover {
    border-color: #FF9800;
    color: #FF9800;
}

/* Guest Buttons (Login required) */
.pf-pwmgen-guest-btn {
    opacity: 0.5;
    cursor: not-allowed !important;
}

.pf-pwmgen-guest-btn:hover {
    border-color: #666 !important;
    color: #666 !important;
}

.pf-pwmgen-btn-icon {
    font-size: 18px;
}

.pf-pwmgen-share-result {
    margin-top: 15px;
    padding: 15px;
    background: var(--pwmgen-dark-bg);
    border: 2px solid var(--pwmgen-primary);
    border-radius: 8px;
}

.pf-pwmgen-share-textarea {
    width: 100%;
    min-height: 100px;
    padding: 10px;
    background: var(--pwmgen-oscilloscope-bg);
    border: 1px solid var(--pwmgen-border);
    border-radius: 6px;
    color: var(--pwmgen-primary-light);
    font-family: 'Courier New', monospace;
    font-size: 12px;
    resize: vertical;
    margin-bottom: 10px;
}

.pf-pwmgen-copy-btn {
    padding: 8px 16px;
    background: var(--pwmgen-primary);
    border: none;
    border-radius: 6px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pf-pwmgen-copy-btn:hover {
    background: var(--pwmgen-primary-light);
    transform: scale(1.05);
}

/* Settings Actions */
.pf-pwmgen-settings-actions {
    text-align: center;
    margin-top: 30px;
}

.pf-pwmgen-settings-actions .pf-pwmgen-reset-btn {
    padding: 14px 30px;
    background: linear-gradient(135deg, #d32f2f, #f44336);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--pwmgen-transition);
}

.pf-pwmgen-settings-actions .pf-pwmgen-reset-btn:hover {
    background: linear-gradient(135deg, #b71c1c, #d32f2f);
    box-shadow: 0 4px 15px rgba(211, 47, 47, 0.4);
    transform: translateY(-2px);
}

/* ═══════════════════════════════════════════════════════════════════════════════════
   OSZILLOSKOP TAB (Controls, Canvas, Stats)
   ═══════════════════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════════════════════
   OSZILLOSKOP LAYOUT (Flexbox: Oben Oszi, Unten Boxen)
   ═══════════════════════════════════════════════════════════════════════════════════ */
.pf-pwmgen-oszi-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    height: 100%;
    align-items: flex-start;
}

.pf-pwmgen-oszi-left {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1 1 600px;
    min-width: 600px;
}

/* Container für die verschiebbaren Boxen rechts */
.pf-pwmgen-oszi-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 0 0 400px;
    width: 400px;
}

/* Boxen haben ihre natürliche Größe */
.pf-pwmgen-oszi-panel {
    flex: 0 0 auto;
    width: 100%;
}

.pf-pwmgen-application-section {
    flex: 0 0 auto;
    width: 100%;
}

/* ═══════════════════════════════════════════════════════════════════════════════════
   OSZILLOSKOP CONTROL PANEL (wie echtes Tektronix)
   ═══════════════════════════════════════════════════════════════════════════════════ */
.pf-pwmgen-oszi-panel {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 3px solid #444;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5), inset 0 2px 4px rgba(255, 255, 255, 0.1);
    padding: 0;
    overflow: hidden;
}

.pf-pwmgen-oszi-panel-header {
    background: linear-gradient(to bottom, #3a3a3a, #2a2a2a);
    border-bottom: 2px solid #555;
    padding: 12px 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: move;
    user-select: none;
}

.pf-pwmgen-panel-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--pwmgen-primary-light);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
    flex: 1;
}

/* Drag Handle */
.pf-pwmgen-panel-drag-icon {
    font-size: 18px;
    color: #666;
    cursor: move;
    margin-right: 12px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.pf-pwmgen-panel-drag-handle:hover .pf-pwmgen-panel-drag-icon {
    opacity: 1;
    color: var(--pwmgen-primary-light);
}

/* Collapse Button */
.pf-pwmgen-panel-collapse-btn {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid var(--pwmgen-primary-light);
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--pwmgen-primary-light);
}

.pf-pwmgen-panel-collapse-btn:hover {
    background: rgba(76, 175, 80, 0.4);
    transform: scale(1.05);
}

.pf-pwmgen-collapse-icon {
    display: inline-block;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.pf-pwmgen-panel-collapsed .pf-pwmgen-collapse-icon {
    transform: rotate(-90deg);
}

/* Collapsible Content */
.pf-pwmgen-collapsible-content {
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    max-height: 5000px;
    opacity: 1;
}

.pf-pwmgen-panel-collapsed .pf-pwmgen-collapsible-content {
    max-height: 0;
    opacity: 0;
    padding: 0;
    margin: 0;
}

/* Draggable Panel States */
.pf-pwmgen-draggable-panel {
    position: relative;
    transition: box-shadow 0.2s ease;
}

.pf-pwmgen-draggable-panel.pf-pwmgen-dragging {
    box-shadow: 0 12px 30px rgba(76, 175, 80, 0.4);
    z-index: 100;
    cursor: move;
}

.pf-pwmgen-oszi-panel-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pf-pwmgen-control-section {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #444;
    border-radius: 8px;
    padding: 15px;
}

.pf-pwmgen-section-label {
    font-size: 11px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #333;
}

.pf-pwmgen-dial-group {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.pf-pwmgen-dual-dials {
    gap: 40px;
    flex-wrap: nowrap;
}

.pf-pwmgen-dial-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.pf-pwmgen-dial-label {
    font-size: 10px;
    font-weight: 600;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Drehknopf (Dial) */
.pf-pwmgen-dial {
    position: relative;
    width: 80px;
    height: 80px;
    cursor: pointer;
}

.pf-pwmgen-dial-knob {
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 30%, #555, #222);
    border: 3px solid #444;
    border-radius: 50%;
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.5),
        inset 0 -2px 8px rgba(0, 0, 0, 0.5),
        inset 0 2px 4px rgba(255, 255, 255, 0.1);
    position: relative;
    transition: transform 0.2s ease;
}

.pf-pwmgen-dial:active .pf-pwmgen-dial-knob {
    transform: scale(0.95);
}

.pf-pwmgen-dial-indicator {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 20px;
    background: var(--pwmgen-primary);
    border-radius: 2px;
    box-shadow: 0 0 8px var(--pwmgen-primary);
}

.pf-pwmgen-dial-value {
    font-size: 12px;
    font-weight: 700;
    color: var(--pwmgen-primary-light);
    font-family: 'Courier New', monospace;
    text-align: center;
    text-shadow: 0 0 8px rgba(76, 175, 80, 0.5);
}

/* Switches */
.pf-pwmgen-switches {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Color Switch Button (styled like other switches) */
.pf-pwmgen-color-switch {
    background: none;
    border: none;
    padding: 0;
}

.pf-pwmgen-color-switch .pf-pwmgen-switch-slider {
    background: linear-gradient(135deg, #7b1fa2, #9c27b0);
    border-color: #ba68c8;
}

.pf-pwmgen-color-switch:hover .pf-pwmgen-switch-slider {
    background: linear-gradient(135deg, #9c27b0, #ba68c8);
    box-shadow: 0 0 10px rgba(156, 39, 176, 0.6);
}

.pf-pwmgen-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    position: relative;
}

.pf-pwmgen-switch input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.pf-pwmgen-switch-slider {
    position: relative;
    width: 40px;
    height: 20px;
    background: #333;
    border: 2px solid #555;
    border-radius: 20px;
    transition: background 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

.pf-pwmgen-switch-slider::before {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    background: #666;
    border-radius: 50%;
    top: 1px;
    left: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.pf-pwmgen-switch input[type="checkbox"]:checked + .pf-pwmgen-switch-slider {
    background: var(--pwmgen-primary);
    border-color: var(--pwmgen-primary-light);
}

.pf-pwmgen-switch input[type="checkbox"]:checked + .pf-pwmgen-switch-slider::before {
    left: 20px;
    background: #fff;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.8);
}

.pf-pwmgen-switch-label {
    font-size: 11px;
    font-weight: 600;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    user-select: none;
}

/* AUTO Switch (wie andere Switches, aber als Button und hellblau) */
.pf-pwmgen-auto-switch {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
}

.pf-pwmgen-auto-switch .pf-pwmgen-switch-slider {
    background: #1a4d5c;
    border-color: #2a6d7c;
}

.pf-pwmgen-auto-switch:hover .pf-pwmgen-switch-slider {
    background: #2a6d7c;
    border-color: #3a8d9c;
}

.pf-pwmgen-auto-switch:active .pf-pwmgen-switch-slider::before,
.pf-pwmgen-auto-switch.active .pf-pwmgen-switch-slider::before {
    left: 20px;
    background: #4dd0e1;
    box-shadow: 0 0 8px rgba(77, 208, 225, 0.8);
}

.pf-pwmgen-auto-switch:active .pf-pwmgen-switch-slider,
.pf-pwmgen-auto-switch.active .pf-pwmgen-switch-slider {
    background: #4dd0e1;
    border-color: #80deea;
}

/* Cursor Controls */
.pf-pwmgen-cursor-control {
    margin-top: 12px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid #333;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pf-pwmgen-cursor-label {
    font-size: 10px;
    font-weight: 600;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pf-pwmgen-cursor-slider {
    width: 100%;
    height: 6px;
    background: #333;
    border-radius: 3px;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    border: 1px solid #444;
}

.pf-pwmgen-cursor-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: var(--pwmgen-primary);
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.6);
    transition: all 0.2s ease;
}

.pf-pwmgen-cursor-slider::-webkit-slider-thumb:hover {
    background: var(--pwmgen-primary-light);
    box-shadow: 0 0 12px rgba(159, 255, 159, 0.8);
    transform: scale(1.1);
}

.pf-pwmgen-cursor-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: var(--pwmgen-primary);
    cursor: pointer;
    border-radius: 50%;
    border: none;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.6);
    transition: all 0.2s ease;
}

.pf-pwmgen-cursor-slider::-moz-range-thumb:hover {
    background: var(--pwmgen-primary-light);
    box-shadow: 0 0 12px rgba(159, 255, 159, 0.8);
    transform: scale(1.1);
}

.pf-pwmgen-cursor-value {
    font-size: 12px;
    font-weight: 700;
    color: var(--pwmgen-primary-light);
    font-family: 'Courier New', monospace;
    text-align: center;
    text-shadow: 0 0 8px rgba(76, 175, 80, 0.5);
}

/* ═══════════════════════════════════════════════════════════════════════════════════
   CONTROLS (Slider)
   ═══════════════════════════════════════════════════════════════════════════════════ */
.pf-pwmgen-controls {
    display: flex;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
    background: var(--pwmgen-panel-bg);
    padding: 25px;
    border-radius: var(--pwmgen-radius);
    box-shadow: var(--pwmgen-shadow);
    width: 100%;
}

.pf-pwmgen-control-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.pf-pwmgen-control-group label {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--pwmgen-primary-light);
    margin-bottom: 5px;
}

.pf-pwmgen-value-display {
    font-weight: bold;
    color: var(--pwmgen-primary);
    font-size: 1.3rem;
    text-shadow: 0 0 8px rgba(76, 175, 80, 0.5);
    min-width: 80px;
    text-align: center;
}

/* Slider Styling */
.pf-pwmgen-box input[type="range"] {
    width: 200px;
    height: 8px;
    background: var(--pwmgen-border);
    border-radius: 5px;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.pf-pwmgen-box input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--pwmgen-primary);
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.7);
    transition: var(--pwmgen-transition);
}

.pf-pwmgen-box input[type="range"]::-webkit-slider-thumb:hover {
    background: var(--pwmgen-primary-light);
    box-shadow: 0 0 15px rgba(159, 255, 159, 0.9);
    transform: scale(1.1);
}

.pf-pwmgen-box input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--pwmgen-primary);
    cursor: pointer;
    border-radius: 50%;
    border: none;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.7);
    transition: var(--pwmgen-transition);
}

.pf-pwmgen-box input[type="range"]::-moz-range-thumb:hover {
    background: var(--pwmgen-primary-light);
    box-shadow: 0 0 15px rgba(159, 255, 159, 0.9);
    transform: scale(1.1);
}

/* ═══════════════════════════════════════════════════════════════════════════════════
   CANVAS / OSCILLOSCOPE
   ═══════════════════════════════════════════════════════════════════════════════════ */
.pf-pwmgen-canvas-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    position: relative;
}

/* Editierbare Spannungswerte im Oszilloskop */
.pf-pwmgen-voltage-section {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    display: none; /* Standard ausgeblendet */
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.pf-pwmgen-voltage-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--pwmgen-primary-light);
    text-align: center;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    padding: 8px 12px;
    border-radius: 6px;
    border: 2px solid var(--pwmgen-border);
    text-shadow: 0 0 8px rgba(76, 175, 80, 0.5);
    margin-bottom: 5px;
    pointer-events: auto;
}

.pf-pwmgen-voltage-labels {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pf-pwmgen-voltage-label {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    padding: 10px 14px;
    border-radius: 8px;
    border: 2px solid var(--pwmgen-border);
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: auto;
    min-width: 140px;
}

.pf-pwmgen-voltage-label:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: var(--pwmgen-primary);
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.4);
    transform: translateX(3px);
}

.pf-pwmgen-voltage-text {
    font-size: 14px;
    font-weight: 700;
    color: var(--pwmgen-primary-light);
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 8px rgba(76, 175, 80, 0.5);
    white-space: nowrap;
}

.pf-pwmgen-voltage-edit {
    display: flex;
    gap: 6px;
    align-items: center;
}

.pf-pwmgen-voltage-value-input {
    width: 70px;
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid var(--pwmgen-primary);
    border-radius: 4px;
    color: var(--pwmgen-primary-light);
    font-size: 14px;
    font-weight: 700;
    padding: 6px 8px;
    text-align: center;
    font-family: 'Courier New', monospace;
}

.pf-pwmgen-voltage-value-input:focus {
    outline: none;
    background: rgba(76, 175, 80, 0.3);
    border-color: var(--pwmgen-primary-light);
    box-shadow: 0 0 12px rgba(76, 175, 80, 0.5);
}

.pf-pwmgen-voltage-unit-select {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid var(--pwmgen-primary);
    border-radius: 4px;
    color: var(--pwmgen-primary-light);
    font-size: 13px;
    font-weight: 600;
    padding: 6px 4px;
    font-family: 'Courier New', monospace;
    cursor: pointer;
}

.pf-pwmgen-voltage-unit-select:focus {
    outline: none;
    border-color: var(--pwmgen-primary-light);
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.4);
}

.pf-pwmgen-canvas-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 10px;
    z-index: 10;
}

.pf-pwmgen-oszi-settings-btn {
    position: relative;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--pwmgen-primary-dark), var(--pwmgen-primary));
    border: 2px solid var(--pwmgen-primary-light);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(76, 175, 80, 0.4);
}

.pf-pwmgen-oszi-share-btn {
    background: linear-gradient(135deg, #1e88e5, #1565c0);
    border-color: #42a5f5;
    box-shadow: 0 3px 10px rgba(33, 150, 243, 0.4);
}

.pf-pwmgen-oszi-auto-btn {
    background: linear-gradient(135deg, #f57c00, #ef6c00);
    border-color: #ff9800;
    box-shadow: 0 3px 10px rgba(255, 152, 0, 0.4);
}

.pf-pwmgen-oszi-run-btn {
    background: linear-gradient(135deg, #2e7d32, #1b5e20);
    border-color: #4caf50;
    box-shadow: 0 3px 10px rgba(76, 175, 80, 0.4);
}

.pf-pwmgen-oszi-auto-btn {
    width: 36px;
    min-width: 36px;
    height: 36px;
    border-radius: 50%;
    padding: 0;
}

.pf-pwmgen-oszi-run-btn {
    width: 36px;
    min-width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
}

.pf-pwmgen-oszi-run-btn .pf-pwmgen-settings-icon {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0;
    gap: 0;
    white-space: normal;
}

.pf-pwmgen-oszi-settings-btn .pf-pwmgen-settings-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.pf-pwmgen-oszi-run-btn .pf-pwmgen-settings-icon svg,
.pf-pwmgen-oszi-settings-btn .pf-pwmgen-settings-icon svg {
    width: 18px;
    height: 18px;
}

.pf-pwmgen-oszi-share-btn .pf-pwmgen-settings-icon svg {
    width: 19px;
    height: 19px;
}

.pf-pwmgen-oszi-run-btn.pf-pwmgen-run-active {
    background: linear-gradient(135deg, #c62828, #b71c1c);
    border-color: #ef5350;
    box-shadow: 0 3px 14px rgba(239, 83, 80, 0.6);
    animation: pf-pwmgen-run-pulse 1.2s ease-in-out infinite;
}

@keyframes pf-pwmgen-run-pulse {
    0%, 100% { box-shadow: 0 3px 14px rgba(239, 83, 80, 0.6); }
    50%       { box-shadow: 0 3px 22px rgba(239, 83, 80, 1.0); }
}

.pf-pwmgen-oszi-run-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 16px rgba(76, 175, 80, 0.7);
}

.pf-pwmgen-oszi-auto-btn .pf-pwmgen-settings-icon {
    font-size: 12px;
    font-weight: bold;
    color: #fff;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.pf-pwmgen-oszi-share-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 16px rgba(33, 150, 243, 0.6);
}

.pf-pwmgen-oszi-auto-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 16px rgba(255, 152, 0, 0.6);
}

.pf-pwmgen-oszi-settings-btn:hover {
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 5px 16px rgba(76, 175, 80, 0.6);
}

.pf-pwmgen-settings-icon {
    font-size: 18px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

#pf-pwmgen-oscilloscope {
    border: 2px solid var(--pwmgen-border);
    background-color: var(--pwmgen-oscilloscope-bg);
    display: block;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.3);
    width: 100%;
    max-width: 100%;
    height: auto;
}

/* ═══════════════════════════════════════════════════════════════════════════════════
   OSZILLOSKOP SETTINGS OVERLAY
   ═══════════════════════════════════════════════════════════════════════════════════ */
.pf-pwmgen-oszi-settings-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    backdrop-filter: blur(5px);
    animation: pfPwmgenFadeIn 0.3s ease;
}

.pf-pwmgen-oszi-settings-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.pf-pwmgen-oszi-settings-panel {
    background: var(--pwmgen-panel-bg);
    border: 3px solid var(--pwmgen-primary);
    border-radius: 16px;
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 10px 50px rgba(76, 175, 80, 0.5);
    animation: pfPwmgenSlideIn 0.3s ease;
}

@keyframes pfPwmgenSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.pf-pwmgen-oszi-settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 2px solid var(--pwmgen-border);
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(76, 175, 80, 0.05));
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background-clip: padding-box;
}

.pf-pwmgen-oszi-settings-header h3 {
    margin: 0;
    color: var(--pwmgen-primary-light);
    font-size: 22px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pf-pwmgen-oszi-settings-close {
    background: rgba(244, 67, 54, 0.2);
    border: 2px solid #f44336;
    color: #f44336;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.pf-pwmgen-oszi-settings-close:hover {
    background: #f44336;
    color: white;
    transform: rotate(90deg);
}

.pf-pwmgen-oszi-settings-content {
    padding: 25px;
}

/* ═══════════════════════════════════════════════════════════════════════════════════
   APPLICATION VISUALIZATION SECTION
   ═══════════════════════════════════════════════════════════════════════════════════ */
.pf-pwmgen-application-section {
    width: 100%;
    background: linear-gradient(180deg, rgba(12, 27, 13, 0.96), rgba(8, 19, 9, 0.98));
    padding: 0;
    border: 1px solid rgba(76, 175, 80, 0.18);
    border-radius: 14px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(159, 255, 159, 0.06);
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
}

.pf-pwmgen-application-header {
    background: linear-gradient(to bottom, #3a3a3a, #2a2a2a);
    border-bottom: 2px solid #555;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: move;
    user-select: none;
}

.pf-pwmgen-application-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--pwmgen-primary-light);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
    flex: 1;
}

.pf-pwmgen-application-section .pf-pwmgen-collapsible-content,
.pf-pwmgen-application-section .pf-pwmgen-application-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.pf-pwmgen-cursor-control {
    gap: 12px;
}

.pf-pwmgen-cursor-body {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pf-pwmgen-cursor-body input[type="range"] {
    flex: 1;
}

.pf-pwmgen-cursor-body .pf-pwmgen-cursor-value {
    min-width: 76px;
    text-align: right;
}

.pf-pwmgen-application-section label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--pwmgen-primary-light);
}

.pf-pwmgen-application-select {
    padding: 12px 16px;
    background: var(--pwmgen-dark-bg);
    color: var(--pwmgen-text);
    border: 2px solid var(--pwmgen-border);
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--pwmgen-transition);
}

.pf-pwmgen-application-select:hover,
.pf-pwmgen-application-select:focus {
    border-color: var(--pwmgen-primary);
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
    outline: none;
}

.pf-pwmgen-visualization {
    min-height: 200px;
}

.pf-pwmgen-viz-item {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
    background: var(--pwmgen-dark-bg);
    border-radius: 8px;
    border: 1px solid var(--pwmgen-border);
    box-shadow: inset 0 1px 0 rgba(159, 255, 159, 0.04);
}

.pf-pwmgen-viz-item[hidden] {
    display: none !important;
}

.pf-pwmgen-viz-display {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background: var(--pwmgen-oscilloscope-bg);
    border-radius: 8px;
    border: 1px solid var(--pwmgen-grid-dark);
    min-height: 200px;
}

.pf-pwmgen-viz-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: var(--pwmgen-text);
    padding: 10px 15px;
    background: rgba(76, 175, 80, 0.05);
    border-radius: 6px;
    border-left: 3px solid var(--pwmgen-primary);
}

.pf-pwmgen-viz-info strong {
    font-size: 1.1rem;
    color: var(--pwmgen-primary-light);
    margin-bottom: 5px;
}

.pf-pwmgen-viz-info p {
    margin: 0;
    line-height: 1.6;
    font-size: 0.95rem;
}

.pf-pwmgen-viz-info span {
    color: var(--pwmgen-primary);
    font-weight: bold;
}

.pf-pwmgen-viz-desc {
    font-size: 0.9rem;
    color: var(--pwmgen-text-muted);
    font-style: italic;
    margin-top: 5px;
}

/* Signal Parameters Display (for 'none' visualization) */
.pf-pwmgen-signal-params {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 10px 0;
}

.pf-pwmgen-signal-params p {
    background: rgba(76, 175, 80, 0.08);
    padding: 6px 10px;
    border-radius: 4px;
    border-left: 2px solid var(--pwmgen-primary);
    margin: 0;
}

.pf-pwmgen-signal-params strong {
    font-size: 0.8rem;
    color: var(--pwmgen-text-muted);
    font-weight: 500;
}

.pf-pwmgen-signal-params span {
    display: block;
    font-size: 1rem;
    color: var(--pwmgen-primary-light);
    font-weight: bold;
    margin-top: 2px;
}

/* LED Visualization */
.pf-pwmgen-led {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--pwmgen-primary);
    box-shadow: 0 0 20px var(--pwmgen-primary), 0 0 40px var(--pwmgen-primary);
    transition: all 0.3s ease;
}

/* Motor Visualization - 3D Rotating Fan */
.pf-pwmgen-motor-container {
    width: 120px;
    height: 120px;
    perspective: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pf-pwmgen-motor {
    width: 100px;
    height: 100px;
    position: relative;
    transform-style: preserve-3d;
    animation: pf-pwmgen-motor-rotate 2s linear infinite;
}

@keyframes pf-pwmgen-motor-rotate {
    from { transform: rotateZ(0deg); }
    to { transform: rotateZ(360deg); }
}

.pf-pwmgen-motor-blade {
    position: absolute;
    width: 50px;
    height: 12px;
    background: linear-gradient(90deg, var(--pwmgen-primary) 0%, var(--pwmgen-primary-light) 50%, var(--pwmgen-primary) 100%);
    top: 50%;
    left: 50%;
    transform-origin: 0% 50%;
    border-radius: 0 6px 6px 0;
    box-shadow: 
        0 2px 8px rgba(76, 175, 80, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

.pf-pwmgen-motor-blade:nth-child(1) { 
    transform: translate(0, -50%) rotate(0deg);
}
.pf-pwmgen-motor-blade:nth-child(2) { 
    transform: translate(0, -50%) rotate(120deg);
}
.pf-pwmgen-motor-blade:nth-child(3) { 
    transform: translate(0, -50%) rotate(240deg);
}

.pf-pwmgen-motor-center {
    position: absolute;
    width: 24px;
    height: 24px;
    background: radial-gradient(circle, var(--pwmgen-primary-light) 0%, var(--pwmgen-primary) 70%, #1a4d1a 100%);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 
        0 0 15px var(--pwmgen-primary),
        0 0 30px rgba(76, 175, 80, 0.5),
        inset 0 2px 4px rgba(255, 255, 255, 0.3),
        inset 0 -2px 4px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.pf-pwmgen-motor-center-inner {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #2a5a2a;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Servo Visualization */
.pf-pwmgen-servo {
    position: relative;
    width: 100px;
    height: 60px;
}

.pf-pwmgen-servo-body {
    width: 60px;
    height: 40px;
    background: var(--pwmgen-panel-bg);
    border: 2px solid var(--pwmgen-primary);
    border-radius: 4px;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.pf-pwmgen-servo-arm {
    width: 4px;
    height: 40px;
    background: var(--pwmgen-primary);
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform-origin: bottom center;
    transform: translateX(-50%) rotate(0deg);
    border-radius: 2px;
    box-shadow: 0 0 10px var(--pwmgen-primary);
    transition: transform 0.5s ease;
}

.pf-pwmgen-servo-scale {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--pwmgen-text-muted);
}

/* Audio Visualization */
.pf-pwmgen-audio-filter {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 20px;
}

.pf-pwmgen-audio-signal-row {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    justify-content: center;
}

.pf-pwmgen-audio-signal-canvas {
    border: 2px solid var(--pwmgen-border);
    border-radius: 6px;
    background: var(--pwmgen-dark-bg);
}

.pf-pwmgen-audio-label {
    font-size: 0.9rem;
    font-weight: 600;
    min-width: 60px;
    text-align: center;
}

.pf-pwmgen-audio-label-left {
    color: #2196F3;
}

.pf-pwmgen-audio-label-right {
    color: #f44336;
}

.pf-pwmgen-audio-circuit {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: rgba(76, 175, 80, 0.1);
    border: 2px solid var(--pwmgen-border);
    border-radius: 8px;
}

.pf-pwmgen-audio-resistor {
    width: 60px;
    height: 20px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--pwmgen-text) 20%, 
        var(--pwmgen-text) 25%,
        transparent 25%,
        transparent 30%,
        var(--pwmgen-text) 30%,
        var(--pwmgen-text) 35%,
        transparent 35%,
        transparent 40%,
        var(--pwmgen-text) 40%,
        var(--pwmgen-text) 45%,
        transparent 45%,
        transparent 50%,
        var(--pwmgen-text) 50%,
        var(--pwmgen-text) 55%,
        transparent 55%,
        transparent 60%,
        var(--pwmgen-text) 60%,
        var(--pwmgen-text) 65%,
        transparent 65%,
        transparent 70%,
        var(--pwmgen-text) 70%,
        var(--pwmgen-text) 75%,
        transparent 75%,
        transparent 80%,
        var(--pwmgen-text) 80%,
        transparent 100%
    );
    border-top: 2px solid var(--pwmgen-text);
    border-bottom: 2px solid var(--pwmgen-text);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--pwmgen-primary-light);
}

.pf-pwmgen-audio-junction {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.pf-pwmgen-audio-capacitor {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.pf-pwmgen-audio-cap-symbol {
    width: 30px;
    height: 40px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--pwmgen-primary-light);
}

.pf-pwmgen-audio-cap-symbol::before,
.pf-pwmgen-audio-cap-symbol::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background: var(--pwmgen-text);
    left: 0;
}

.pf-pwmgen-audio-cap-symbol::before {
    top: 30%;
}

.pf-pwmgen-audio-cap-symbol::after {
    bottom: 30%;
}

.pf-pwmgen-audio-ground {
    font-size: 1.2rem;
    color: var(--pwmgen-text);
    margin-top: 5px;
}

/* Old Audio Bars (keeping for backwards compatibility) */
.pf-pwmgen-audio-viz {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 100px;
}

.pf-pwmgen-audio-bar {
    flex: 1;
    background: var(--pwmgen-primary);
    border-radius: 4px 4px 0 0;
    min-height: 10px;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
    animation: pf-pwmgen-audio-pulse 1s ease-in-out infinite;
}

.pf-pwmgen-audio-bar:nth-child(1) { animation-delay: 0s; }
.pf-pwmgen-audio-bar:nth-child(2) { animation-delay: 0.1s; }
.pf-pwmgen-audio-bar:nth-child(3) { animation-delay: 0.2s; }
.pf-pwmgen-audio-bar:nth-child(4) { animation-delay: 0.3s; }
.pf-pwmgen-audio-bar:nth-child(5) { animation-delay: 0.4s; }
.pf-pwmgen-audio-bar:nth-child(6) { animation-delay: 0.5s; }
.pf-pwmgen-audio-bar:nth-child(7) { animation-delay: 0.6s; }
.pf-pwmgen-audio-bar:nth-child(8) { animation-delay: 0.7s; }

@keyframes pf-pwmgen-audio-pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* DC-DC Converter Visualization */
.pf-pwmgen-dcdc {
    display: flex;
    align-items: center;
    gap: 20px;
}

.pf-pwmgen-voltage-in,
.pf-pwmgen-voltage-out {
    text-align: center;
}

.pf-pwmgen-voltage-in span,
.pf-pwmgen-voltage-out span {
    color: var(--pwmgen-text-muted);
    font-size: 0.9rem;
}

.pf-pwmgen-voltage-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--pwmgen-primary-light);
    margin-top: 5px;
}

.pf-pwmgen-converter-icon {
    font-size: 2rem;
    color: var(--pwmgen-primary);
    animation: pf-pwmgen-pulse 0.5s ease-in-out infinite;
}

@keyframes pf-pwmgen-pulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.2); opacity: 1; }
}

/* EV Charger Visualization (ISO 15118 & DIN 70121) */
.pf-pwmgen-evcharger {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 20px;
    width: 100%;
}

.pf-pwmgen-car {
    font-size: 60px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

.pf-pwmgen-charging-cable {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.pf-pwmgen-plug {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, var(--pwmgen-primary) 0%, var(--pwmgen-primary-dark) 100%);
    border-radius: 50%;
    border: 3px solid var(--pwmgen-text);
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.6);
}

.pf-pwmgen-cable-line {
    width: 6px;
    height: 60px;
    background: repeating-linear-gradient(
        0deg,
        var(--pwmgen-text) 0px,
        var(--pwmgen-text) 10px,
        transparent 10px,
        transparent 20px
    );
    border-radius: 3px;
}

.pf-pwmgen-wallbox {
    width: 100px;
    height: 120px;
    background: var(--pwmgen-panel-bg);
    border: 3px solid var(--pwmgen-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.4);
}

.pf-pwmgen-wallbox-screen {
    width: 80px;
    height: 90px;
    background: var(--pwmgen-dark-bg);
    border: 2px solid var(--pwmgen-grid-dark);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px;
}

.pf-pwmgen-current-display {
    font-size: 24px;
    font-weight: bold;
    color: var(--pwmgen-primary-light);
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.8);
    font-family: 'Courier New', monospace;
}

.pf-pwmgen-status-led {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--pwmgen-primary);
    box-shadow: 0 0 15px var(--pwmgen-primary);
    animation: pf-pwmgen-pulse 2s ease-in-out infinite;
}

.pf-pwmgen-status-led.charging-off {
    background: #666;
    box-shadow: none;
    animation: none;
}

.pf-pwmgen-status-led.charging-warning {
    background: #ff9800;
    box-shadow: 0 0 15px #ff9800;
}

.pf-pwmgen-status-led.charging-error {
    background: #f44336;
    box-shadow: 0 0 15px #f44336;
}

/* Heating Visualization */
.pf-pwmgen-heating {
    display: flex;
    gap: 30px;
    align-items: center;
    justify-content: center;
}

.pf-pwmgen-thermometer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.pf-pwmgen-temp-label-top {
    font-size: 0.9rem;
    font-weight: bold;
    color: #ff5722;
    text-shadow: 0 0 10px rgba(255, 87, 34, 0.5);
}

.pf-pwmgen-temp-label-bottom {
    font-size: 0.9rem;
    font-weight: bold;
    color: #2196f3;
    text-shadow: 0 0 10px rgba(33, 150, 243, 0.5);
}

.pf-pwmgen-thermometer {
    width: 50px;
    height: 200px;
    background: linear-gradient(to bottom, rgba(255, 87, 34, 0.1), rgba(33, 150, 243, 0.1));
    border: 3px solid var(--pwmgen-primary);
    border-radius: 25px 25px 50px 50px;
    position: relative;
    overflow: visible;
    box-shadow: 
        inset 0 0 20px rgba(0, 0, 0, 0.2),
        0 4px 10px rgba(0, 0, 0, 0.3);
}

.pf-pwmgen-temp-bulb {
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, #2196f3, #1976d2);
    border-radius: 50%;
    border: 3px solid var(--pwmgen-primary);
    box-shadow: 
        0 0 20px rgba(33, 150, 243, 0.6),
        inset 0 2px 5px rgba(255, 255, 255, 0.3);
    z-index: 2;
    transition: background 0.5s ease, box-shadow 0.5s ease;
}

.pf-pwmgen-temp-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, #2196f3 0%, #00bcd4 20%, #4caf50 40%, #ffeb3b 60%, #ff9800 80%, #ff5722 100%);
    transition: height 0.5s ease, box-shadow 0.5s ease;
    border-radius: 0 0 22px 22px;
    z-index: 1;
}

.pf-pwmgen-temp-fill::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 100%;
    background: linear-gradient(to top, rgba(33, 150, 243, 0.8) 0%, rgba(0, 188, 212, 0.8) 20%, rgba(76, 175, 80, 0.8) 40%, rgba(255, 235, 59, 0.8) 60%, rgba(255, 152, 0, 0.8) 80%, rgba(255, 87, 34, 0.8) 100%);
    border-radius: 4px;
}

.pf-pwmgen-temp-scale {
    position: absolute;
    right: -45px;
    top: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--pwmgen-text-muted);
    padding: 5px 0;
}

.pf-pwmgen-temp-scale span {
    line-height: 1;
    background: var(--pwmgen-panel-bg);
    padding: 2px 4px;
    border-radius: 3px;
}

.pf-pwmgen-room-temp {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px 20px;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(76, 175, 80, 0.05));
    border: 2px solid var(--pwmgen-primary);
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.pf-pwmgen-room-icon {
    font-size: 2rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.pf-pwmgen-room-temp-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--pwmgen-primary-light);
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

.pf-pwmgen-room-label {
    font-size: 0.85rem;
    color: var(--pwmgen-text-muted);
    text-align: center;
}

.pf-pwmgen-boiler-label {
    font-size: 0.8rem;
    color: var(--pwmgen-primary-light);
    text-align: center;
    margin-top: 5px;
    font-style: italic;
}

.pf-pwmgen-room-hint {
    font-size: 0.75rem;
    color: #ff9800;
    text-align: center;
    margin-top: 5px;
    font-style: italic;
}

/* ═══════════════════════════════════════════════════════════════════════════════════
   STATS DISPLAY
   ═══════════════════════════════════════════════════════════════════════════════════ */
.pf-pwmgen-stats {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
}

.pf-pwmgen-stat-card {
    background: var(--pwmgen-panel-bg);
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid var(--pwmgen-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    transition: var(--pwmgen-transition);
    flex: 1;
    min-width: 130px;
}

.pf-pwmgen-stat-card:hover {
    border-color: var(--pwmgen-primary);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.pf-pwmgen-stat-label {
    font-size: 0.85rem;
    color: var(--pwmgen-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pf-pwmgen-stat-value {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--pwmgen-primary-light);
    text-shadow: 0 0 8px rgba(159, 255, 159, 0.5);
}

/* Share Overlay */
.pf-pwmgen-share-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: pfPwmgenFadeIn 0.3s ease;
}

.pf-pwmgen-share-overlay.active {
    display: flex;
}

.pf-pwmgen-share-panel {
    background: linear-gradient(135deg, #2c2c2c, #1a3a1a);
    border: 2px solid var(--pwmgen-primary);
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: pfPwmgenSlideIn 0.3s ease;
}

.pf-pwmgen-share-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 2px solid var(--pwmgen-border);
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(76, 175, 80, 0.05));
}

.pf-pwmgen-share-header h3 {
    margin: 0;
    color: var(--pwmgen-primary-light);
    font-size: 22px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pf-pwmgen-share-close {
    background: rgba(244, 67, 54, 0.2);
    border: 2px solid #f44336;
    color: #f44336;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.pf-pwmgen-share-close:hover {
    background: #f44336;
    color: white;
    transform: rotate(90deg);
}

.pf-pwmgen-share-content {
    padding: 25px;
}

/* ═══════════════════════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════════════════════ */
.pf-pwmgen-footer {
    position: sticky;
    bottom: 0;
    z-index: 100;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr);
    background: linear-gradient(135deg, #2c2c2c 0%, #1a3a1a 35%, #0d1f0d 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 -8px 22px rgba(76, 175, 80, 0.24);
    margin-top: auto;
    flex: 0 0 auto;
    padding: 8px 18px;
    overflow: hidden;
    position: relative;
    align-items: center;
    color: var(--pwmgen-text);
}

.pf-pwmgen-footer-left,
.pf-pwmgen-footer-center,
.pf-pwmgen-footer-right {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.pf-pwmgen-footer-center {
    justify-content: center;
    text-align: center;
}

.pf-pwmgen-footer-right {
    justify-content: flex-end;
    flex-wrap: wrap;
    overflow: visible;
}

.pf-pwmgen-footer::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(135deg, #2d4d2d 0%, #3a653a 42%, #4c7f4c 78%, #2d4d2d 100%);
    background-size: 300% 300%;
    background-position: 0% 50%;
    pointer-events: none;
    z-index: 0;
    animation: pwmgenFooterWave 9s ease-in-out infinite;
}

.pf-pwmgen-footer::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(ellipse 70% 140% at 78% 60%, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.08) 48%, transparent 70%);
    animation: pwmgenFooterShimmer 7s ease-in-out infinite reverse;
}

@keyframes pwmgenFooterWave {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes pwmgenFooterShimmer {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.pf-pwmgen-footer-module,
.pf-pwmgen-footer-meta,
.pf-pwmgen-footer-runtime {
    color: rgba(255, 255, 255, 0.94);
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pf-pwmgen-footer-module,
.pf-pwmgen-footer-meta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.72rem;
    line-height: 1.1;
}

.pf-pwmgen-footer-runtime {
    display: block;
    font-size: 0.82rem;
    line-height: 1.1;
    opacity: 0.92;
}

.pf-pwmgen-footer-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
}

.pf-pwmgen-footer-icon svg {
    width: 20px;
    height: 20px;
}

.pf-pwmgen-footer-fx-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
    box-shadow: none;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.pf-pwmgen-footer-fx-toggle .pf-pwmgen-footer-icon-off {
    display: none;
}

.pf-pwmgen-footer-fx-toggle .pf-pwmgen-footer-icon,
.pf-pwmgen-footer-fx-toggle .pf-pwmgen-footer-icon svg {
    width: 12px;
    height: 12px;
    flex: 0 0 12px;
}

.pf-pwmgen-footer-fx-toggle:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.52);
}

.pf-pwmgen-module.is-footer-fx-off .pf-pwmgen-header,
.pf-pwmgen-module.is-footer-fx-off .pf-pwmgen-footer,
.pf-pwmgen-box.is-footer-fx-off .pf-pwmgen-header,
.pf-pwmgen-box.is-footer-fx-off .pf-pwmgen-footer,
.pf-pwmgen-footer.no-shimmer {
    background: linear-gradient(135deg, #2a2a2a 0%, #1d2d1d 50%, #1a1a1a 100%);
}

.pf-pwmgen-module.is-footer-fx-off .pf-pwmgen-header::before,
.pf-pwmgen-module.is-footer-fx-off .pf-pwmgen-header::after,
.pf-pwmgen-module.is-footer-fx-off .pf-pwmgen-footer::before,
.pf-pwmgen-module.is-footer-fx-off .pf-pwmgen-footer::after,
.pf-pwmgen-box.is-footer-fx-off .pf-pwmgen-header::before,
.pf-pwmgen-box.is-footer-fx-off .pf-pwmgen-header::after,
.pf-pwmgen-box.is-footer-fx-off .pf-pwmgen-footer::before,
.pf-pwmgen-box.is-footer-fx-off .pf-pwmgen-footer::after {
    animation: none !important;
    opacity: 0.65;
}

.pf-pwmgen-module.is-footer-fx-off .pf-pwmgen-footer-fx-toggle,
.pf-pwmgen-box.is-footer-fx-off .pf-pwmgen-footer-fx-toggle {
    border-color: rgba(255, 255, 255, 0.22);
    color: rgba(255, 255, 255, 0.58);
    background: rgba(15, 23, 42, 0.2);
}

.pf-pwmgen-module.is-footer-fx-off .pf-pwmgen-footer-fx-toggle .pf-pwmgen-footer-icon-on,
.pf-pwmgen-box.is-footer-fx-off .pf-pwmgen-footer-fx-toggle .pf-pwmgen-footer-icon-on,
.pf-pwmgen-footer-fx-toggle[aria-pressed="false"] .pf-pwmgen-footer-icon-on {
    display: none;
}

.pf-pwmgen-module.is-footer-fx-off .pf-pwmgen-footer-fx-toggle .pf-pwmgen-footer-icon-off,
.pf-pwmgen-box.is-footer-fx-off .pf-pwmgen-footer-fx-toggle .pf-pwmgen-footer-icon-off,
.pf-pwmgen-footer-fx-toggle[aria-pressed="false"] .pf-pwmgen-footer-icon-off {
    display: inline-flex;
}

.pf-pwmgen-module.is-footer-fx-off .pf-pwmgen-footer-fx-toggle:hover,
.pf-pwmgen-box.is-footer-fx-off .pf-pwmgen-footer-fx-toggle:hover,
.pf-pwmgen-footer-fx-toggle[aria-pressed="false"]:hover {
    background: rgba(15, 23, 42, 0.28);
}

/* Scroll to Top Button (wie bei PF_quizgen) */
button.pf-pwmgen-scroll-top {
    position: absolute;
    bottom: 90px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #f57c00, #ef6c00);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(255, 152, 0, 0.4);
    transition: all 0.3s ease;
    z-index: 1000;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

button.pf-pwmgen-scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

button.pf-pwmgen-scroll-top.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

button.pf-pwmgen-scroll-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(255, 152, 0, 0.6);
}

button.pf-pwmgen-scroll-top:active {
    transform: translateY(-2px);
}

.pf-pwmgen-scroll-icon {
    font-size: 24px;
    line-height: 1;
    color: #ffffff;
}

/* ═══════════════════════════════════════════════════════════════════════════════════
   RESPONSIVE DESIGN
   ═══════════════════════════════════════════════════════════════════════════════════ */
   
@media (max-width: 1200px) {
    .pf-pwmgen-oszi-layout {
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
    }

    .pf-pwmgen-oszi-left,
    .pf-pwmgen-oszi-right {
        flex: 1 1 auto;
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    .pf-pwmgen-oszi-right {
        max-height: 600px;
    }
}

@media (max-width: 768px) {
    .pf-pwmgen-info-section {
        padding: 14px 12px;
        max-height: min(52vh, 460px);
        overflow-y: auto;
        overflow-x: hidden;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .pf-pwmgen-info-layout {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .pf-pwmgen-info-section .pf-pwmgen-desc {
        max-height: none;
        overflow: visible;
    }

    .pf-pwmgen-info-section::-webkit-scrollbar {
        width: 8px;
    }

    .pf-pwmgen-info-section::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.06);
        border-radius: 999px;
    }

    .pf-pwmgen-info-section::-webkit-scrollbar-thumb {
        background: linear-gradient(180deg, var(--pwmgen-primary) 0%, var(--pwmgen-primary-dark) 100%);
        border-radius: 999px;
    }

    .pf-pwmgen-tab-content {
        padding: 18px 14px;
    }

    .pf-pwmgen-tabs {
        padding: 8px 10px 0;
        justify-content: flex-start;
    }

    .pf-pwmgen-tab-btn {
        padding: 12px 14px;
        gap: 0;
        justify-content: center;
    }

    .pf-pwmgen-tab-label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        clip-path: inset(50%);
        border: 0;
        white-space: nowrap;
    }

    .pf-pwmgen-tab-icon {
        font-size: 20px;
    }

    .pf-pwmgen-oszi-layout,
    .pf-pwmgen-oszi-left,
    .pf-pwmgen-oszi-right,
    .pf-pwmgen-controls,
    .pf-pwmgen-control-group,
    .pf-pwmgen-canvas-wrapper,
    .pf-pwmgen-stats,
    .pf-pwmgen-stat-card {
        min-width: 0;
        max-width: 100%;
    }

    .pf-pwmgen-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
        padding: 18px 14px;
    }

    .pf-pwmgen-control-group {
        width: 100%;
    }

    .pf-pwmgen-control-group label {
        text-align: center;
        overflow-wrap: anywhere;
    }

    .pf-pwmgen-box input[type="range"] {
        width: min(100%, 280px);
    }

    .pf-pwmgen-value-display {
        min-width: 0;
    }

    .pf-pwmgen-canvas-wrapper {
        overflow: hidden;
    }

    .pf-pwmgen-canvas-wrapper #pf-pwmgen-oscilloscope {
        display: block;
        width: 100%;
        max-width: 100%;
        height: auto;
    }

    .pf-pwmgen-oszi-right {
        max-height: none;
    }

    .pf-pwmgen-oszi-panel-content {
        padding: 16px 12px;
    }

    .pf-pwmgen-voltage-section {
        right: 8px;
    }

    .pf-pwmgen-voltage-label {
        min-width: 0;
        max-width: min(130px, calc(100vw - 56px));
        padding: 8px 10px;
    }

    .pf-pwmgen-voltage-text {
        font-size: 12px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .pf-pwmgen-module .pf-pwmgen-header {
        flex-wrap: nowrap;
        gap: 8px;
        padding: 10px 12px;
        text-align: left;
    }

    .pf-pwmgen-module .pf-pwmgen-header .pf-pwmgen-header-left {
        flex: 1 1 auto;
        min-width: 0;
        gap: 8px;
    }

    .pf-pwmgen-module .pf-pwmgen-header .pf-pwmgen-header-right {
        flex-shrink: 0;
        gap: 8px;
        margin-left: auto;
    }

    .pf-pwmgen-box.is-mobile-shell-collapsed .pf-pwmgen-header {
        min-height: 0;
        height: 0;
        padding: 0;
        border: 0;
        box-shadow: none;
        background: transparent;
        overflow: visible;
    }

    .pf-pwmgen-box.is-mobile-shell-collapsed .pf-pwmgen-header::before,
    .pf-pwmgen-box.is-mobile-shell-collapsed .pf-pwmgen-header::after {
        display: none;
    }

    .pf-pwmgen-box.is-mobile-shell-collapsed .pf-pwmgen-header-left,
    .pf-pwmgen-box.is-mobile-shell-collapsed .pf-pwmgen-header-right {
        display: none;
    }

    .pf-pwmgen-box.is-mobile-shell-collapsed .pf-pwmgen-header-compact-logo {
        display: inline-flex;
        position: fixed;
        top: 10px;
        right: 10px;
        left: auto;
        transform: none;
        z-index: 240;
        width: 40px;
        height: 40px;
        border-radius: 999px;
        overflow: hidden;
        box-shadow: none;
        padding: 0;
        border: 1px solid rgba(255, 255, 255, 0.46);
        background: rgba(255, 255, 255, 0.18);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }

    .pf-pwmgen-box.is-mobile-shell-collapsed .pf-pwmgen-header-compact-logo-image {
        width: 34px;
        height: 34px;
        border-radius: 999px;
        object-fit: contain;
        display: block;
    }

    .pf-pwmgen-box.is-mobile-shell-collapsed .pf-pwmgen-footer {
        display: none;
    }

    .pf-pwmgen-box.is-mobile-shell-collapsed .pf-pwmgen-scroll-top {
        bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    }

    .pf-pwmgen-footer {
        grid-template-columns: 1fr;
        min-height: 40px;
        justify-items: center;
        padding: 6px 10px calc(6px + env(safe-area-inset-bottom, 0px));
        gap: 4px;
    }

    .pf-pwmgen-footer-left,
    .pf-pwmgen-footer-right {
        display: none;
    }

    .pf-pwmgen-footer-center,
    .pf-pwmgen-footer-runtime {
        max-width: 100%;
        text-align: center;
    }

    .pf-pwmgen-stats {
        flex-direction: column;
    }

    .pf-pwmgen-stats .pf-pwmgen-stat-card {
        width: 100%;
    }

    .pf-pwmgen-canvas-actions {
        gap: 8px;
    }

    .pf-pwmgen-oszi-auto-btn {
        width: 36px;
        min-width: 36px;
        height: 36px;
        padding: 0;
    }

    .pf-pwmgen-oszi-run-btn {
        width: 36px;
        min-width: 36px;
        height: 36px;
        padding: 0;
    }
}

@media (max-width: 700px) {
    .pf-pwmgen-header .pf-pwmgen-icon-wrapper {
        width: 36px;
        height: 36px;
        border-radius: 9px;
    }

    .pf-pwmgen-header .pf-pwmgen-title {
        font-size: 1.02rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .pf-pwmgen-header .pf-pwmgen-meta,
    .pf-pwmgen-header .pf-pwmgen-user-name,
    .pf-pwmgen-header .pf-pwmgen-bubu-value,
    .pf-pwmgen-header .pf-pwmgen-dash-label {
        display: none;
    }

    .pf-pwmgen-header .pf-pwmgen-bubu-pill {
        width: 40px;
        min-width: 40px;
        height: 40px;
        min-height: 40px;
        flex: 0 0 40px;
        padding: 0;
        justify-content: center;
        align-items: center;
        border-radius: 50%;
        overflow: hidden;
        gap: 0;
    }

    .pf-pwmgen-header .pf-pwmgen-btn-dashboard {
        width: 40px;
        min-width: 40px;
        height: 40px;
        min-height: 40px;
        padding: 0;
        gap: 0;
        border-radius: 50%;
        justify-content: center;
        align-items: center;
        aspect-ratio: 1 / 1;
        overflow: hidden;
    }

    .pf-pwmgen-header .pf-pwmgen-user {
        width: 40px;
        min-width: 40px;
        height: 40px;
        min-height: 40px;
        flex: 0 0 40px;
        gap: 0;
        padding: 0;
        justify-content: center;
        align-items: center;
        aspect-ratio: 1 / 1;
        border-radius: 50%;
        overflow: hidden;
    }

    .pf-pwmgen-header .pf-pwmgen-user-avatar {
        width: 26px;
        height: 26px;
        border-radius: 999px;
    }

    .pf-pwmgen-header .pf-pwmgen-dashboard-submenu {
        right: 0;
        min-width: 200px;
    }

    .pf-pwmgen-header .pf-pwmgen-dash-icon {
        width: 18px;
        height: 18px;
    }

    .pf-pwmgen-footer {
        min-height: 38px;
        padding: clamp(6px, 2.2vw, 8px) clamp(7px, 2.6vw, 10px) calc(clamp(6px, 2.2vw, 8px) + env(safe-area-inset-bottom, 0px));
    }

    .pf-pwmgen-footer-center {
        font-size: 0.74rem;
        line-height: 1.05;
    }

    .pf-pwmgen-footer-runtime {
        max-width: 100%;
        font-size: 0.74rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .pf-pwmgen-layout-wrapper.pf-pwmgen-overlay:not(.pf-overlay-dashboard-shell),
    .pf-pwmgen-layout-wrapper.pf-pwmgen-dashboard-shell:not(.pf-overlay-dashboard-shell) {
        height: 100dvh;
        min-height: 100dvh;
    }

    .pf-pwmgen-box.overlay-mode,
    .pf-pwmgen-layout-wrapper.pf-pwmgen-dashboard-shell:not(.pf-overlay-dashboard-shell) .pf-pwmgen-box {
        border-radius: 0 0 12px 12px;
        max-height: 100%;
    }

    .pf-pwmgen-box .pf-pwmgen-header {
        padding: 8px 10px;
        gap: 6px;
    }

    .pf-pwmgen-box .pf-pwmgen-header .pf-pwmgen-header-left,
    .pf-pwmgen-box .pf-pwmgen-header .pf-pwmgen-header-right {
        gap: 6px;
    }

    .pf-pwmgen-box .pf-pwmgen-header .pf-pwmgen-header-left .pf-pwmgen-icon-wrapper {
        width: 34px;
        height: 34px;
    }

    .pf-pwmgen-box .pf-pwmgen-header .pf-pwmgen-title-section .pf-pwmgen-title {
        font-size: 0.94rem;
        line-height: 1.1;
    }

    .pf-pwmgen-box .pf-pwmgen-header .pf-pwmgen-header-right .pf-pwmgen-user-avatar {
        width: 20px;
        height: 20px;
    }

    .pf-pwmgen-box .pf-pwmgen-header .pf-pwmgen-header-right .pf-pwmgen-dash-icon {
        width: 16px;
        height: 16px;
    }

    .pf-pwmgen-tab-content {
        padding: 14px 10px;
    }

    .pf-pwmgen-controls {
        padding: 14px 10px;
        border-radius: 12px;
    }

    .pf-pwmgen-control-group label {
        font-size: 1rem;
    }

    .pf-pwmgen-value-display {
        font-size: 1.15rem;
    }

    .pf-pwmgen-voltage-section {
        display: none;
    }

    .pf-pwmgen-stat-card {
        padding: 14px 12px;
        min-width: 0;
    }

    .pf-pwmgen-stat-value {
        font-size: 1.15rem;
    }

    .pf-pwmgen-footer {
        border-radius: 0;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════════════
   SETTINGS TAB - OSZILLOSKOP HINT BOX
   ═══════════════════════════════════════════════════════════════════════════════════ */
.pf-pwmgen-oszi-hint-group {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(76, 175, 80, 0.05));
    border: 2px solid var(--pwmgen-primary) !important;
}

.pf-pwmgen-oszi-hint-box {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 20px;
    background: var(--pwmgen-dark-bg);
    border-radius: 8px;
    margin-bottom: 15px;
}

.pf-pwmgen-oszi-hint-icon {
    font-size: 48px;
    flex-shrink: 0;
    animation: pf-pwmgen-pulse 2s ease-in-out infinite;
}

.pf-pwmgen-oszi-hint-content p {
    margin: 8px 0;
    color: var(--pwmgen-text);
    line-height: 1.6;
}

.pf-pwmgen-oszi-hint-content strong {
    color: var(--pwmgen-primary-light);
}

.pf-pwmgen-hint-benefit {
    background: rgba(76, 175, 80, 0.1);
    border-left: 3px solid var(--pwmgen-primary);
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.95rem;
}

.pf-pwmgen-open-oszi-settings-btn {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--pwmgen-primary), var(--pwmgen-primary-light));
    border: 2px solid var(--pwmgen-primary-light);
    border-radius: 10px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.pf-pwmgen-open-oszi-settings-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(76, 175, 80, 0.5);
    background: linear-gradient(135deg, var(--pwmgen-primary-light), #72d572);
}

.pf-pwmgen-open-oszi-settings-btn .pf-pwmgen-btn-icon {
    font-size: 20px;
}

.pf-pwmgen-settings-info-box {
    background: rgba(76, 175, 80, 0.05);
    border: 1px solid var(--pwmgen-border);
    border-left: 4px solid var(--pwmgen-primary);
    border-radius: 8px;
    padding: 15px 20px;
    margin-top: 25px;
}

.pf-pwmgen-settings-info-box p {
    margin: 8px 0;
    color: var(--pwmgen-text-muted);
    font-size: 13px;
    line-height: 1.6;
}

.pf-pwmgen-settings-info-box strong {
    color: var(--pwmgen-primary-light);
}

/* ═══════════════════════════════════════════════════════════════════════════════════
   MODALS (Save/Load Configurations)
   ═══════════════════════════════════════════════════════════════════════════════════ */
.pf-pwmgen-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.pf-pwmgen-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pfPwmgenFadeIn 0.3s ease;
}

.pf-pwmgen-modal-content {
    background: var(--pwmgen-panel-bg);
    border: 3px solid var(--pwmgen-primary);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 50px rgba(76, 175, 80, 0.5);
    animation: pfPwmgenSlideIn 0.3s ease;
}

.pf-pwmgen-modal-large {
    max-width: 800px;
}

.pf-pwmgen-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 2px solid var(--pwmgen-border);
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(76, 175, 80, 0.05));
}

.pf-pwmgen-modal-header h3 {
    margin: 0;
    color: var(--pwmgen-primary-light);
    font-size: 20px;
}

.pf-pwmgen-modal-close {
    background: rgba(244, 67, 54, 0.2);
    border: 2px solid #f44336;
    color: #f44336;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.pf-pwmgen-modal-close:hover {
    background: #f44336;
    color: white;
    transform: rotate(90deg);
}

.pf-pwmgen-modal-body {
    padding: 25px;
}

.pf-pwmgen-form-group {
    margin-bottom: 20px;
}

.pf-pwmgen-form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--pwmgen-text);
    font-weight: 600;
    font-size: 14px;
}

.pf-pwmgen-input,
.pf-pwmgen-textarea {
    width: 100%;
    padding: 10px 12px;
    background: var(--pwmgen-dark-bg);
    border: 2px solid var(--pwmgen-border);
    border-radius: 8px;
    color: var(--pwmgen-text);
    font-size: 14px;
    font-family: inherit;
}

.pf-pwmgen-input:focus,
.pf-pwmgen-textarea:focus {
    outline: none;
    border-color: var(--pwmgen-primary);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.pf-pwmgen-form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
}

.pf-pwmgen-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pf-pwmgen-btn-primary {
    background: linear-gradient(135deg, var(--pwmgen-primary-dark), var(--pwmgen-primary));
    color: white;
}

.pf-pwmgen-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.pf-pwmgen-btn-secondary {
    background: var(--pwmgen-dark-bg);
    border: 2px solid var(--pwmgen-border);
    color: var(--pwmgen-text);
}

.pf-pwmgen-btn-secondary:hover {
    border-color: var(--pwmgen-primary);
}

.pf-pwmgen-config-list {
    display: grid;
    gap: 15px;
}

.pf-pwmgen-config-item {
    padding: 15px;
    background: var(--pwmgen-dark-bg);
    border: 2px solid var(--pwmgen-border);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.pf-pwmgen-config-item:hover {
    border-color: var(--pwmgen-primary);
    transform: translateX(5px);
}

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

.pf-pwmgen-config-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--pwmgen-primary-light);
}

.pf-pwmgen-config-date {
    font-size: 12px;
    color: var(--pwmgen-text-muted);
}

.pf-pwmgen-config-desc {
    font-size: 13px;
    color: var(--pwmgen-text);
    margin-bottom: 10px;
}

.pf-pwmgen-config-actions {
    display: flex;
    gap: 8px;
}

.pf-pwmgen-config-btn {
    padding: 6px 12px;
    font-size: 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.pf-pwmgen-config-load {
    background: var(--pwmgen-primary);
    color: white;
}

.pf-pwmgen-config-load:hover {
    background: var(--pwmgen-primary-light);
}

.pf-pwmgen-config-delete {
    background: rgba(244, 67, 54, 0.2);
    border: 2px solid #f44336;
    color: #f44336;
}

.pf-pwmgen-config-delete:hover {
    background: #f44336;
    color: white;
}

.pf-pwmgen-loading {
    text-align: center;
    padding: 40px;
    color: var(--pwmgen-text-muted);
    font-size: 14px;
}

.pf-pwmgen-no-configs {
    text-align: center;
    padding: 40px;
    color: var(--pwmgen-text-muted);
    font-size: 14px;
}

.pf-pwmgen-error {
    text-align: center;
    padding: 40px;
    color: #f44336;
    font-size: 14px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   HILFE TAB - Inspiriert von PF_quizgen
   ═══════════════════════════════════════════════════════════════════════════ */

/* Hero Section */
.pf-pwmgen-help-hero {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(33, 150, 243, 0.1));
    border-radius: 15px;
    margin-bottom: 40px;
    border: 2px solid var(--pwmgen-border);
    animation: pfPwmgenFadeIn 0.6s ease-out;
}

.pf-pwmgen-help-hero-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: pfPwmgenBounce 1s ease-in-out infinite;
}

.pf-pwmgen-help-hero h1 {
    font-size: 32px;
    margin: 0 0 15px 0;
    color: var(--pwmgen-primary);
    font-weight: 700;
}

.pf-pwmgen-help-hero p {
    font-size: 18px;
    color: var(--pwmgen-text-muted);
    margin: 0;
}

/* Help Sections */
.pf-pwmgen-help-section {
    background: var(--pwmgen-bg-secondary);
    border: 2px solid var(--pwmgen-border);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    animation: pfPwmgenSlideIn 0.5s ease-out;
    transition: all 0.3s ease;
}

.pf-pwmgen-help-section:hover {
    border-color: var(--pwmgen-primary);
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.2);
    transform: translateY(-2px);
}

.pf-pwmgen-help-title {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 24px;
    font-weight: 700;
    color: var(--pwmgen-primary);
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--pwmgen-border);
}

.pf-pwmgen-help-icon {
    font-size: 32px;
    animation: pfPwmgenPulse 2s ease-in-out infinite;
}

/* AUTO Badge im Help Tab (wie echter AUTO Button) */
.pf-pwmgen-help-auto-badge {
    background: linear-gradient(135deg, #f57c00, #ef6c00);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 1.5px;
    box-shadow: 0 3px 10px rgba(255, 152, 0, 0.4);
    animation: pfPwmgenPulse 2s ease-in-out infinite;
}

.pf-pwmgen-help-content {
    color: var(--pwmgen-text);
    line-height: 1.8;
}

.pf-pwmgen-help-content p {
    margin: 0 0 20px 0;
}

.pf-pwmgen-help-content h3 {
    font-size: 20px;
    color: var(--pwmgen-primary-light);
    margin: 30px 0 15px 0;
    font-weight: 600;
}

.pf-pwmgen-help-content ul {
    margin: 15px 0;
    padding-left: 25px;
}

.pf-pwmgen-help-content li {
    margin: 8px 0;
    color: var(--pwmgen-text);
}

/* Highlight Boxes */
.pf-pwmgen-help-highlight {
    display: flex;
    gap: 20px;
    background: rgba(76, 175, 80, 0.1);
    border-left: 4px solid var(--pwmgen-primary);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.pf-pwmgen-help-highlight-icon {
    font-size: 32px;
    flex-shrink: 0;
}

/* Formula Display */
.pf-pwmgen-help-formula {
    background: var(--pwmgen-bg-tertiary);
    border: 2px solid var(--pwmgen-primary);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.pf-pwmgen-formula-title {
    font-size: 14px;
    color: var(--pwmgen-text-muted);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pf-pwmgen-formula-content {
    font-size: 22px;
    font-family: 'Courier New', monospace;
    color: var(--pwmgen-primary);
    font-weight: 700;
}

/* Examples */
.pf-pwmgen-help-examples {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

.pf-pwmgen-help-example {
    background: var(--pwmgen-bg-tertiary);
    padding: 15px 20px;
    border-radius: 8px;
    border-left: 4px solid var(--pwmgen-accent);
    transition: all 0.3s ease;
}

.pf-pwmgen-help-example:hover {
    background: rgba(255, 152, 0, 0.1);
    transform: translateX(5px);
}

/* Grid Layouts */
.pf-pwmgen-help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.pf-pwmgen-help-card {
    background: var(--pwmgen-bg-tertiary);
    border: 2px solid var(--pwmgen-border);
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
}

.pf-pwmgen-help-card:hover {
    border-color: var(--pwmgen-primary);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.2);
    transform: translateY(-5px);
}

.pf-pwmgen-help-card-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.pf-pwmgen-help-card h4 {
    font-size: 18px;
    color: var(--pwmgen-primary);
    margin: 0 0 10px 0;
    font-weight: 600;
}

.pf-pwmgen-help-card p {
    font-size: 14px;
    color: var(--pwmgen-text-muted);
    margin: 0;
    line-height: 1.6;
}

/* Application Cards */
.pf-pwmgen-help-app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.pf-pwmgen-help-app-card {
    background: linear-gradient(135deg, var(--pwmgen-bg-tertiary), var(--pwmgen-bg-secondary));
    border: 2px solid var(--pwmgen-border);
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s ease;
}

.pf-pwmgen-help-app-card:hover {
    border-color: var(--pwmgen-accent);
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.2);
    transform: scale(1.05);
}

.pf-pwmgen-help-app-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.pf-pwmgen-help-app-card h4 {
    font-size: 16px;
    color: var(--pwmgen-primary-light);
    margin: 0 0 10px 0;
    font-weight: 600;
}

.pf-pwmgen-help-app-card p {
    font-size: 13px;
    color: var(--pwmgen-text-muted);
    margin: 0;
    line-height: 1.6;
}

/* Tips */
.pf-pwmgen-help-tip {
    background: rgba(33, 150, 243, 0.1);
    border-left: 4px solid #2196F3;
    padding: 15px 20px;
    border-radius: 8px;
    margin: 20px 0;
    font-size: 15px;
}

/* List Styling */
.pf-pwmgen-help-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.pf-pwmgen-help-list li {
    padding: 12px 15px;
    margin: 10px 0;
    background: var(--pwmgen-bg-tertiary);
    border-radius: 8px;
    border-left: 4px solid var(--pwmgen-primary);
    transition: all 0.3s ease;
}

.pf-pwmgen-help-list li:hover {
    background: rgba(76, 175, 80, 0.1);
    transform: translateX(5px);
}

/* Shortcuts */
.pf-pwmgen-help-shortcuts {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.pf-pwmgen-help-shortcut {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px 20px;
    background: var(--pwmgen-bg-tertiary);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.pf-pwmgen-help-shortcut:hover {
    background: rgba(76, 175, 80, 0.1);
    transform: translateX(5px);
}

.pf-pwmgen-help-shortcut kbd {
    background: var(--pwmgen-bg-primary);
    color: var(--pwmgen-primary);
    padding: 8px 15px;
    border-radius: 6px;
    border: 2px solid var(--pwmgen-border);
    font-family: 'Courier New', monospace;
    font-size: 14px;
    font-weight: 600;
    min-width: 120px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.pf-pwmgen-help-shortcut span {
    color: var(--pwmgen-text);
    font-size: 15px;
}

/* Animations */
@keyframes pfPwmgenFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pfPwmgenSlideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pfPwmgenBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pfPwmgenPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}
