:root {
    --bg-dark: #121212;
    --bg-darker: #0a0a0a;
    --bg-card: #1e1e1e;
    --bg-card-hover: #2a2a2a;
    --primary: #01adaa;
    --primary-dark: #01615f;
    --text: #e0e0e0;
    --text-secondary: #a0a0a0;
    --border: #333;
    --success: #4CAF50;
    --warning: #FFC107;
    --danger: #F44336;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body {
    background-color: var(--bg-dark);
    color: var(--text);
    min-height: 100vh;
    padding: 20px;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
}
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}
h1 {
    color: var(--primary);
    font-size: 28px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo-icon {
    color: var(--primary);
    font-size: 24px;
}
.btn {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.btn:hover {
    background-color: var(--primary-dark);
}
.btn-secondary {
    background-color: var(--bg-card);
}
.btn-secondary:hover {
    background-color: var(--bg-card-hover);
}
.btn-danger {
    background-color: var(--danger);
}
.btn-danger:hover {
    background-color: #d32f2f;
}
.btn-warning {
    background-color: var(--warning);
    color: #000;
}
.btn-warning:hover {
    background-color: #ffb300;
}
.btn-sm {
    padding: 5px 10px;
    font-size: 13px;
}
.btn-icon {
    font-size: 16px;
}
.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.config-card {
    background-color: var(--bg-card);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.2s;
    border: 1px solid var(--border);
    position: relative;
}
.config-card:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}
.config-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}
.config-card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary);
}
.config-card-actions {
    display: flex;
    gap: 5px;
}
.section {
    margin-bottom: 25px;
}
.section-title {
    font-size: 16px;
    margin-bottom: 10px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-title .icon {
    font-size: 18px;
}
.form-group {
    margin-bottom: 15px;
}
.form-label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: var(--text-secondary);
}
.form-control {
    width: 100%;
    padding: 8px 12px;
    background-color: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    font-size: 14px;
}
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(1, 156, 154, 0.2);
}
.params-item {
    background-color: var(--bg-dark);
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 10px;
    border: 1px solid var(--border);
}
.params-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.params-name {
    font-weight: 600;
    color: var(--primary);
}
.params-params {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 5px;
}
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
}
.checkbox-label {
    font-size: 14px;
}
.action-list {
    list-style: none;
}
.action-item {
    background-color: var(--bg-dark);
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 10px;
    border: 1px solid var(--border);
}
.action-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.action-name {
    font-weight: 600;
    color: var(--primary);
}
.action-params {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 5px;
}
.tab-container {
    margin-top: 20px;
    overflow: hidden;
}
.tab-scroller {
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.tab-scroller::-webkit-scrollbar {
    display: none;
}
.tab-buttons {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
    width: max-content;
    min-width: 100%;
}
.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-weight: 500;
    position: relative;
    white-space: nowrap;
}
.tab-btn.active {
    color: var(--primary);
}
.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--primary);
}
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
}
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}
.empty-state-icon {
    font-size: 40px;
    margin-bottom: 15px;
    color: var(--primary);
}
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.modal.active {
    opacity: 1;
    pointer-events: all;
}
.modal-content {
    background-color: var(--bg-card);
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 20px;
    transform: translateY(-20px);
    transition: transform 0.3s;
}
.modal.active .modal-content {
    transform: translateY(0);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}
.modal-title {
    font-size: 20px;
    color: var(--primary);
}
.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
}
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
}
.modal-content-large {
    width: 90%;
    max-width: 2500px;
}
.code-block {
    background-color: var(--bg-dark);
    border-radius: 4px;
    padding: 15px;
    font-family: 'Consolas', monospace;
    font-size: 13px;
    overflow-x: auto;
    height: 400px;
    margin-bottom: 15px;
    border: 1px solid var(--border);
}
.drag-handle {
    cursor: move;
    color: var(--text-secondary);
    margin-right: 8px;
}
.sortable-ghost {
    opacity: 0.5;
    background-color: var(--primary-dark);
}
.tooltip {
    position: relative;
    display: inline-block;
}
.tooltip .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: var(--bg-darker);
    color: var(--text);
    text-align: center;
    border-radius: 4px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
    border: 1px solid var(--border);
}
.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}
.autocomplete {
    position: relative;
    display: inline-block;
    width: 100%;
}
.autocomplete-items {
    position: absolute;
    border: 1px solid var(--border);
    border-bottom: none;
    border-top: none;
    z-index: 99;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 200px;
    overflow-y: auto;
    background-color: var(--bg-card);
}
.autocomplete-items div {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
}
.autocomplete-items div:hover {
    background-color: var(--bg-dark);
}
.autocomplete-active {
    background-color: var(--primary) !important;
    color: white;
}
.rp-action-editor {
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
}
.rp-action-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 4px;
  border-radius: 5px;
  background-color: rgba(0, 0, 0, 0.1);
}
.rp-action-row:hover {
  background-color: rgba(0, 0, 0, 0.2);
}
.rp-action-row:last-child {
    margin-bottom: 0;
}
.rp-action-drag-handle {
  cursor: grab;
  color: #888;
  padding: 5px;
}
.rp-action-drag-handle:hover {
  color: #555;
}
.rp-action-type {
  width: 75px;
  flex-shrink: 0;
}
.rp-action-content {
  flex-grow: 1;
  min-width: 200px;
}
.sleep-controls {
  display: flex;
  gap: 5px;
  width: auto;
  flex-shrink: 0;
}
.sleep-controls.hidden {
  display: none;
}
.rp-action-sleep, .rp-action-sleep-after {
  width: 80px;
  flex-shrink: 0;
}
.rp-action-buttons {
  display: flex;
  gap: 5px;
}
#addRpActionRow {
  margin-top: 10px;
}
.rp-action-sleep {
    flex: 0 0 80px;
}
.rp-action-sleep-after {
    flex: 0 0 80px;
}
.rp-action-remove {
  cursor: pointer;
  color: #dc3545;
  padding: 5px;
}
.rp-action-add {
    margin-top: 10px;
}
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--primary);
    color: white;
    padding: 15px 20px;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1001;
}
.notification.show {
    transform: translateY(0);
    opacity: 1;
}
.notification.success {
    background-color: var(--success);
}
.notification.error {
    background-color: var(--danger);
}
.notification.warning {
    background-color: var(--warning);
    color: #000;
}
.export-animation {
    display: inline-block;
    animation: pulse 1.5s infinite;
}
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}
@media (max-width: 768px) {
    .config-grid {
        grid-template-columns: 1fr;
    }
    
    .rp-action-row {
        flex-wrap: wrap;
    }
    
    .rp-action-type,
    .rp-action-content,
    .rp-action-sleep,
    .rp-action-sleep-after {
        flex: 1 1 100%;
    }
}
.format-selector {
    margin-bottom: 15px;
}

.format-selector .form-label {
    margin-bottom: 5px;
}

.format-selector .form-control {
    width: 100%;
}


#importConfirmModal .modal-body {
  text-align: center;
  padding: 20px;
}

#importConfirmModal .modal-footer {
  display: flex;
  justify-content: center;
  gap: 10px;
}
@media (max-width: 992px) {
  .rp-action-row {
    flex-wrap: wrap;
  }
  
  .rp-action-content {
    width: 100%;
    order: 3;
    margin-top: 8px;
  }
  
  .sleep-controls {
    order: 2;
    margin-left: auto;
  }
}
::-webkit-scrollbar {
    width: 8px;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}
::-webkit-scrollbar-track {
    background: #1e1e1e;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}
::-webkit-scrollbar-thumb {
    background: #191919;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    
}
::-webkit-scrollbar-thumb:hover {
    background: #292929;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}