@font-face {
    font-family: 'WenDaoChaoHei';
    src: url('/fonts/MINGSONG-B.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
}

input, textarea {
    user-select: auto;
    -webkit-user-select: auto;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(to bottom, #141428, #1a2a44, #243448);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: white;
    overflow: hidden;
}

/* 轻微遮罩层 - 仅在边缘稍微压暗，中心完全透明 */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0) 0%, rgba(0,0,0,0) 60%, rgba(0,0,0,0.15) 100%);
    pointer-events: none;
}

#effectCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.config-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    z-index: 2000;
    min-width: 400px;
    display: none;
}

.config-panel.visible {
    display: block;
}

.config-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
}

.config-input-group {
    margin-bottom: 20px;
}

.config-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.config-input {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
}

.config-input:focus {
    outline: none;
    border-color: rgba(102, 126, 234, 1);
    background: rgba(255, 255, 255, 0.15);
}

.config-buttons {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

.config-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.config-btn-primary {
    background: rgba(102, 126, 234, 1);
    color: white;
}

.config-btn-primary:hover {
    background: rgba(102, 126, 234, 0.8);
}

.config-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.config-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.config-hint {
    margin-top: 15px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
}

.config-advanced-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    margin: 15px 0 10px 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    transition: all 0.3s ease;
}

.config-advanced-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.config-advanced-arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.config-advanced-toggle.expanded .config-advanced-arrow {
    transform: rotate(180deg);
}

.config-advanced-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.config-advanced-content.expanded {
    max-height: 200px;
}

.header {
    padding: 20px;
    text-align: center;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
    overflow: hidden;
    display: none;
    position: relative;
    z-index: 10;
}

.song-info {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}

.play-state {
    font-size: 16px;
    opacity: 0.8;
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

.video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.video-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.video-layer.active {
    opacity: 1;
}

.vj-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.vj-video.active {
    opacity: 1;
}

.lyric-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    overflow: hidden;
    position: relative;
    z-index: 10;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.lyric-container.hidden {
    opacity: 0;
    pointer-events: none;
}

.lyric-line {
    text-align: center;
    transition: all 0.3s ease;
    margin: 10px 0;
    line-height: 1.5;
    font-family: 'WenDaoChaoHei', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

.lyric-current {
    font-size: 9vw;
    color: #fff;
    text-shadow:
        0 0 10px rgba(0,0,0,0.9),
        0 0 20px rgba(0,0,0,0.7),
        0 0 40px rgba(0,0,0,0.5),
        0 2px 4px rgba(0,0,0,0.9),
        0 0 80px rgba(255,255,255,0.15);
    animation: fadeIn 0.5s ease;
    white-space: normal;
    max-width: 90%;
    /* 文字描边增强可读性 */
    -webkit-text-stroke: 0.5px rgba(0,0,0,0.3);
    paint-order: stroke fill;
}

.lyric-current.single-mode {
    animation: fadeInGather 0.8s ease;
    transform-origin: center center;
}

.lyric-next {
    font-size: 5vw;
    opacity: 0.7;
    text-shadow:
        0 0 8px rgba(0,0,0,0.8),
        0 0 20px rgba(0,0,0,0.5),
        0 2px 4px rgba(0,0,0,0.8);
}

.lyric-future {
    font-size: 3vw;
    opacity: 0.5;
    text-shadow:
        0 0 6px rgba(0,0,0,0.7),
        0 0 15px rgba(0,0,0,0.4);
}

.status {
    position: fixed;
    top: 10px;
    right: 10px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1000;
}

.status.visible {
    opacity: 1;
    pointer-events: auto;
}

.status.connected {
    background: rgba(76, 175, 80, 0.8);
}

.status.disconnected {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    opacity: 1;
    pointer-events: auto;
}

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

@keyframes fadeInGather {
    from {
        opacity: 0;
        transform: scaleX(1.1);
    }
    to {
        opacity: 1;
        transform: scaleX(1);
    }
}

.controls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1000;
}

.controls.visible {
    opacity: 1;
    pointer-events: auto;
}

.control-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}

.control-btn.active {
    background: rgba(102, 126, 234, 0.8);
    border-color: rgba(102, 126, 234, 1);
}

.menu-dropdown {
    position: absolute;
    bottom: 60px;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 8px 0;
    min-width: 160px;
    display: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.menu-dropdown.visible {
    display: block;
    animation: menuFadeIn 0.2s ease;
}

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

.menu-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.menu-item.active {
    background: rgba(102, 126, 234, 0.3);
}

.menu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 4px 0;
}

.menu-item.has-submenu {
    position: relative;
}

.submenu-arrow {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
    margin-left: 8px;
}

.submenu {
    position: absolute;
    left: -100%;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 8px 0;
    min-width: 120px;
    display: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: -8px;
}

.submenu.visible {
    display: block;
    animation: submenuFadeIn 0.2s ease;
}

.menu-item.has-submenu:hover .submenu,
.menu-item.has-submenu .submenu:hover {
    display: block;
    animation: submenuFadeIn 0.2s ease;
}

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

.submenu-item {
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
    font-size: 13px;
}

.submenu-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.submenu-item.selected {
    background: rgba(102, 126, 234, 0.5);
}

.header.visible {
    display: block;
}

@media (max-width: 768px) {
    .lyric-current { font-size: 10vw; }
    .lyric-next { font-size: 4vw; }
    .lyric-future { font-size: 3vw; }
    
    .control-btn {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .config-panel {
        min-width: 90%;
        padding: 30px 20px;
    }
}

.custom-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20;
    pointer-events: none;
    display: none;
}

.custom-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.custom-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 30;
}

.custom-image-element,
.custom-text-element {
    position: absolute;
}

.logo-config-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(20, 20, 40, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.6);
    z-index: 3000;
    width: 480px;
    max-height: 85vh;
    display: none;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-config-panel.visible {
    display: flex;
}

.logo-config-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.panel-title {
    font-size: 18px;
    font-weight: 600;
}

.header-actions {
    display: flex;
    gap: 8px;
}

.text-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    background: rgba(102, 126, 234, 0.3);
    color: white;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.text-btn:hover {
    background: rgba(102, 126, 234, 0.5);
}

.text-btn.close-btn {
    background: rgba(255, 255, 255, 0.1);
    font-size: 18px;
    padding: 4px 12px;
}

.text-btn.close-btn:hover {
    background: rgba(239, 68, 68, 0.5);
}

.text-btn-outline {
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.text-btn-outline:hover {
    border-color: rgba(102, 126, 234, 0.8);
    color: white;
    background: rgba(102, 126, 234, 0.1);
}

.logo-config-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-config-tabs .tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.2s ease;
    font-size: 14px;
}

.logo-config-tabs .tab:hover {
    color: rgba(255, 255, 255, 0.9);
}

.logo-config-tabs .tab.active {
    color: white;
    background: rgba(102, 126, 234, 0.3);
}

.logo-config-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}

.config-section {
    margin-bottom: 16px;
}

.config-section.collapsible .section-header {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: background 0.2s ease;
}

.config-section.collapsible .section-header:hover {
    background: rgba(255, 255, 255, 0.08);
}

.config-section.collapsible .section-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.config-section.collapsible.expanded .section-content {
    max-height: 500px;
}

.config-section.collapsible.expanded .section-toggle {
    transform: rotate(180deg);
}

.section-toggle {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.section-title {
    font-size: 14px;
    font-weight: 500;
}

.section-header:not([data-toggle]) {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.section-actions {
    display: flex;
    gap: 8px;
}

.btn-add {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: rgba(102, 126, 234, 0.3);
    color: white;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-add:hover {
    background: rgba(102, 126, 234, 0.5);
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
}

.toggle-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.config-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding: 0 4px;
}

.config-row label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    min-width: 50px;
}

.config-row input[type="range"] {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    cursor: pointer;
}

.config-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: #667eea;
    border-radius: 50%;
    cursor: pointer;
}

.range-value {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    min-width: 40px;
    text-align: right;
}

.upload-area {
    flex: 1;
    padding: 20px;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.upload-area:hover {
    border-color: rgba(102, 126, 234, 0.5);
    background: rgba(102, 126, 234, 0.1);
}

.upload-icon {
    font-size: 24px;
}

.preview-area {
    width: 80px;
    height: 60px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.preview-area img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.elements-list {
    max-height: 200px;
    overflow-y: auto;
}

.element-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: grab;
    transition: background 0.2s ease;
}

.element-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.element-item.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.element-drag-handle {
    color: rgba(255, 255, 255, 0.3);
    cursor: grab;
    font-size: 14px;
    letter-spacing: -2px;
}

.element-preview {
    width: 48px;
    height: 36px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
}

.element-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.element-info {
    flex: 1;
    min-width: 0;
}

.element-name {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.element-type {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 2px;
}

.element-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.toggle-mini {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
}

.toggle-mini input {
    width: 36px;
    height: 20px;
    opacity: 0;
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    margin: 0;
}

.toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    transition: 0.2s;
    pointer-events: none;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background: white;
    border-radius: 50%;
    transition: 0.2s;
}

.toggle-mini input:checked + .toggle-slider {
    background: #667eea;
}

.toggle-mini input:checked + .toggle-slider:before {
    transform: translateX(16px);
}

.btn-icon {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-icon:hover {
    background: rgba(102, 126, 234, 0.3);
    color: white;
}

.btn-icon.delete-btn:hover {
    background: rgba(239, 68, 68, 0.3);
}

.empty-hint {
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
}

.fonts-list {
    margin-bottom: 12px;
}

.font-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    margin-bottom: 6px;
}

.font-name {
    font-size: 13px;
}

.font-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.font-type {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.btn-add-font {
    width: 100%;
    padding: 10px;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-add-font:hover {
    border-color: rgba(102, 126, 234, 0.5);
    color: white;
}

.logo-config-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.storage-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.storage-bar {
    width: 80px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.storage-used {
    height: 100%;
    background: #667eea;
    transition: width 0.3s ease;
}

.footer-actions {
    display: flex;
    gap: 10px;
}

.btn-primary {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background: #667eea;
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: #5a6fd6;
}

.btn-secondary {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-danger {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.8);
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 1);
}

.element-edit-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(20, 20, 40, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.6);
    z-index: 3100;
    width: 420px;
    display: none;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.element-edit-panel.visible {
    display: flex;
}

.edit-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.edit-panel-title {
    font-size: 16px;
    font-weight: 600;
}

.edit-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    max-height: 400px;
}

.edit-panel-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
}

.edit-form-group {
    margin-bottom: 16px;
}

.edit-form-group label {
    display: block;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 6px;
}

.edit-form-group input[type="text"],
.edit-form-group input[type="number"],
.edit-form-group select,
.edit-form-group textarea {
    width: 100%;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-size: 14px;
}

.edit-form-group input:focus,
.edit-form-group select:focus,
.edit-form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.edit-form-group textarea {
    min-height: 60px;
    resize: vertical;
}

.edit-form-group input[type="color"] {
    width: 50px;
    height: 36px;
    padding: 2px;
    border-radius: 6px;
    cursor: pointer;
}

.edit-form-row {
    display: flex;
    gap: 12px;
}

.edit-form-row .edit-form-group {
    flex: 1;
}

.confirm-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 4000;
    display: none;
    align-items: center;
    justify-content: center;
}

.confirm-dialog.visible {
    display: flex;
}

.confirm-content {
    background: rgba(30, 30, 50, 0.98);
    padding: 24px;
    border-radius: 12px;
    max-width: 360px;
    text-align: center;
}

.confirm-message {
    margin-bottom: 20px;
    font-size: 15px;
    line-height: 1.5;
}

.confirm-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 12px 24px;
    background: rgba(30, 30, 50, 0.95);
    border-radius: 8px;
    font-size: 14px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-success {
    background: rgba(34, 197, 94, 0.9);
}

.toast-error {
    background: rgba(239, 68, 68, 0.9);
}

.toast-warning {
    background: rgba(234, 179, 8, 0.9);
    color: #333;
}

@media (max-width: 768px) {
    .logo-config-panel {
        width: 95%;
        max-height: 90vh;
    }
    
    .element-edit-panel {
        width: 95%;
    }
    
    .config-row {
        flex-wrap: wrap;
    }
}
