.fd-panel {
    background-color: #0d0d0d;
    color: #c2c2c2;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 12px;
    padding: 24px 24px;
    border-radius: 0px;
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
    box-sizing: border-box;
    border: 1px solid #222;
    user-select: none;
    box-shadow: 0 8px 24px rgba(0,0,0,0.8);
}

.fd-panel * {
    box-sizing: border-box;
}

/* Header */
.fd-title {
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 24px;
    margin-top: 0;
}
.fd-title-field {
    color: #d136ff;
}
.fd-title-driver {
    color: #ffffff;
}

/* Typography & Sections */
.fd-section-title {
    color: #00c8ff;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 10px;
    letter-spacing: 0.3px;
    margin-top: 20px;
}

.fd-top-section .fd-section-title {
    margin-top: 0;
}

.fd-execution-section .fd-section-title {
    margin-top: 0;
}

.fd-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    align-items: center;
}

.fd-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.fd-top-section {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}
.fd-controller-setup {
    flex: 1;
}
.fd-mode {
    flex: 0 0 65px;
}

/* Controls */
.fd-btn {
    background-color: #121212;
    color: #a3a3a3;
    border: 1px solid #2a2a2a;
    border-radius: 3px;
    padding: 6px 10px;
    font-size: 11px;
    cursor: pointer;
    text-align: center;
    transition: opacity 0.1s ease, transform 0.1s ease, background-color 0.1s ease, border-color 0.1s ease, box-shadow 0.1s ease, color 0.1s ease;
    white-space: nowrap;
    display: flex;
    justify-content: center;
    align-items: center;
}
.fd-row > .fd-btn, .fd-grid-2 > .fd-btn, .fd-controller-setup > .fd-btn {
    width: 100%;
}
.fd-controller-setup > .fd-btn {
    margin-bottom: 8px;
}
.fd-count-row {
    justify-content: space-between;
}
.fd-count-row .fd-btn-gen {
    width: 105px !important;
}

.fd-btn:hover {
    background-color: #1a1a1a;
    color: #ffffff;
    border-color: #444;
}

.fd-btn:active {
    background-color: #0a0a0a;
    transform: scale(0.98);
}

.fd-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}
.fd-label {
    font-size: 12px;
    color: #e0e0e0;
    font-weight: 500;
}
.fd-input {
    background-color: #0d0d0d;
    border: 1px solid #2a2a2a;
    color: #fff;
    border-radius: 3px;
    padding: 5px 8px;
    width: 42px;
    font-size: 12px;
    text-align: center;
}

.fd-input:focus {
    outline: none;
    border-color: #00c8ff;
}

/* Checkboxes */
.fd-checkbox-container {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin-bottom: 12px;
}
.fd-checkbox {
    width: 14px;
    height: 14px;
    border: 1px solid #444;
    background-color: #0d0d0d;
    border-radius: 2px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.1s, transform 0.1s, background-color 0.1s, border-color 0.1s, box-shadow 0.1s, color 0.1s;
    box-sizing: border-box;
}
.fd-checkbox.checked {
    border-color: #ddd;
}
.fd-checkbox.checked::after {
    content: '';
    width: 3.5px;
    height: 7.5px;
    border: solid #ddd;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
    margin-top: -1px;
}
.fd-checkbox-label {
    font-size: 12px;
    color: #b5b5b5;
}
.fd-checkbox-container:hover .fd-checkbox-label {
    color: #fff;
}
.fd-checkbox-container:hover .fd-checkbox {
    border-color: #777;
}

/* Radio */
.fd-radio-container {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin-bottom: 12px;
}
.fd-radio {
    width: 14px;
    height: 14px;
    border: 1px solid #444;
    background-color: #0d0d0d;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}
.fd-radio.checked {
    border-color: #ddd;
}
.fd-radio.checked::after {
    content: '';
    width: 6px;
    height: 6px;
    background-color: #ddd;
    border-radius: 50%;
}
.fd-radio-label {
    font-size: 12px;
    color: #b5b5b5;
}
.fd-radio-container:hover .fd-radio-label {
    color: #fff;
}
.fd-radio-container:hover .fd-radio {
    border-color: #777;
}

/* Target Properties Grid */
.fd-properties-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
}

/* Custom FX Grid */
.fd-fx-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}
.fd-fx-row .fd-checkbox-container {
    margin-bottom: 0;
    width: 100px;
    flex: 0 0 auto;
}
.fd-fx-row .fd-btn:not(.fd-btn-x) {
    flex: 1;
}
.fd-btn-x {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    padding: 0;
}

/* Execution */
.fd-execution-section {
    margin-top: 20px;
    margin-bottom: 18px;
}

/* Footer */
.fd-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #222;
    padding-top: 16px;
}
.fd-footer-text {
    font-size: 11px;
    color: #777;
}
.fd-footer-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}
.fd-footer-buttons .fd-btn {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 5px 10px;
}
.fd-btn-help {
    width: 26px;
    height: 26px;
    padding: 0 !important;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .fd-grid-2 {
        grid-template-columns: 1fr;
    }
    .fd-properties-grid {
        grid-template-columns: 1fr;
    }
    .fd-row {
        flex-direction: column;
    }
    .fd-count-row {
        flex-direction: column;
        align-items: stretch;
    }
    .fd-input-group {
        width: 100%;
        justify-content: space-between;
        margin-bottom: 8px;
    }
    .fd-btn {
        min-height: 44px; /* Better touch target */
        width: 100%;
        justify-content: center;
        margin-bottom: 8px;
    }
    .fd-fx-row {
        flex-wrap: wrap;
    }
    .fd-fx-row .fd-checkbox-container {
        width: 100%;
        margin-bottom: 8px;
    }
    .fd-fx-row .fd-btn:not(.fd-btn-x) {
        flex: 1 1 auto;
    }
    .fd-fx-row .fd-btn-x {
        flex: 0 0 auto;
    }
    .fd-footer {
        flex-direction: column;
        gap: 12px;
    }
    .fd-footer-buttons {
        width: 100%;
    }
}
