/* 基础样式 */
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background: #f5f5f5;
}

.editor-container {
    display: flex;
    height: 100vh;
}

.toolbar {
    background: #2c3e50;
    color: white;
    padding: 20px;
}

.toolbar h2 {
    margin: 0 0 20px 0;
    font-size: 18px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.toolbar-section {
    margin-bottom: 25px;
}

.toolbar-section h3 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #bdc3c7;
}

.toolbar button {
    width: 100%;
    padding: 8px 12px;
    margin: 5px 0;
    border: none;
    border-radius: 4px;
    background: #3498db;
    color: white;
    cursor: pointer;
    transition: background 0.3s;
}

.toolbar button:hover {
    background: #2980b9;
}

.toolbar button.danger {
    background: #e74c3c;
}

.toolbar button.danger:hover {
    background: #c0392b;
}

.toolbar button.success {
    background: #27ae60;
}

.toolbar button.success:hover {
    background: #229954;
}

.canvas-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #ecf0f1;
}

.canvas-header {
    background: #34495e;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.canvas-header h1 {
    margin: 0;
    font-size: 20px;
}

/* 画布区域样式 */
.col-sm-6 {
    min-height: 100vh;
}

.canvas-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    min-height: 600px;
    background: #ecf0f1;
    flex-direction: column;
    overflow: visible;
}

#dazibao-canvas {
    border: 2px solid #bdc3c7;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    background: #FFF3E0;
    max-width: 100%;
    height: auto;
}

/* 输入控件样式 */
.toolbar input, .toolbar select {
    width: 100%;
    padding: 6px 8px;
    margin: 5px 0;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    font-size: 12px;
}

.toolbar label {
    display: block;
    margin: 8px 0 3px 0;
    color: #ecf0f1;
}

/* 浮动属性面板容器样式 */
.floating-panel-container {
    position: relative;
    height: auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 20px;
    overflow: visible;
}

/* 浮动属性面板样式 */
.floating-panel {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    padding: 20px;
    width: 100%;
    z-index: 10000;
    display: none;
    border: 1px solid #e0e0e0;
    position: sticky;
    top: 20px;
    margin-top: 20px;
    overflow-y: visible;
    max-height: none;
}

/* 当没有选中对象时的提示样式 */
.floating-panel-container::before {
    content: "点击画布上的对象查看属性";
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #999;
    text-align: center;
    pointer-events: none;
    opacity: 0.7;
    display: block;
    width: 100%;
    padding: 0 10px;
}

.floating-panel.show ~ .floating-panel-container::before,
.floating-panel.show + .floating-panel-container::before {
    display: none;
}

.floating-panel.show {
    display: block;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 在小屏幕上调整布局 */
@media (max-width: 768px) {
    .floating-panel {
        position: fixed;
        top: 50%;
        right: 10px;
        transform: translateY(-50%);
        width: 280px;
        max-width: calc(100vw - 20px);
        z-index: 10001;
    }
    
    .floating-panel.show {
        animation: slideInRightMobile 0.3s ease-out;
    }
    
    @keyframes slideInRightMobile {
        from {
            transform: translateY(-50%) translateX(100%);
            opacity: 0;
        }
        to {
            transform: translateY(-50%) translateX(0);
            opacity: 1;
        }
    }
}

.floating-panel h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 8px;
}

.floating-panel .form-group {
    margin-bottom: 15px;
}

.floating-panel label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    color: #555;
    font-weight: 600;
}

.floating-panel input, .floating-panel select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    box-sizing: border-box;
}

.floating-panel input[type="color"] {
    height: 40px;
    padding: 2px;
}

.floating-panel input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
}

.floating-panel input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
}

.floating-panel input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
    border: none;
}

.floating-panel input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.floating-panel .checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.floating-panel .checkbox-group label {
    margin-bottom: 0;
    margin-left: 8px;
}

.floating-panel .btn-group {
    display: flex;
    gap: 8px;
    margin-top: 15px;
}

.floating-panel button {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.floating-panel .btn-primary {
    background: #3498db;
    color: white;
}

.floating-panel .btn-primary:hover {
    background: #2980b9;
}

.floating-panel .btn-danger {
    background: #e74c3c;
    color: white;
}

.floating-panel .btn-danger:hover {
    background: #c0392b;
}

.floating-panel .close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-panel .close-btn:hover {
    color: #333;
}

/* 选中对象高亮 */
.canvas-wrapper {
    position: relative;
}

.selection-indicator {
    position: absolute;
    border: 2px solid #3498db;
    border-radius: 4px;
    pointer-events: none;
    z-index: 1000;
    display: none;
}


/* 调试样式 - 临时添加边框来查看布局 */
.col-sm-3 {
    border: 1px solid #ddd;
}

.col-sm-6 {
    border: 1px solid #ddd;
    height: auto;
    overflow: visible;
}

.col-sm-2 {
    border: 1px solid #ddd;
    height: auto;
    overflow: visible;
}

/* 批量生成模态框样式优化 */
#batchGenerateModal .modal-body {
    padding: 15px;
}

#batchGenerateModal .form-label {
    font-weight: 600;
    margin-bottom: 3px;
    color: #2c3e50;
}

#batchGenerateModal .form-control {
    margin-bottom: 2px;
    padding: 6px 10px;
}

#batchGenerateModal .form-text {
    font-size: 10px;
    margin-top: 0;
}

#batchGenerateModal .form-check {
    margin-bottom: 5px;
    padding-left: 0;
}

#batchGenerateModal .form-check-input {
    margin-right: 6px;
    margin-top: 1px;
}

#batchGenerateModal .form-check-label {
    cursor: pointer;
    display: flex;
    align-items: center;
    margin: 0;
}

#batchGenerateModal .alert {
    padding: 8px 12px;
    margin-bottom: 0;
    border-radius: 4px;
}

#batchGenerateModal .alert h6 {
    margin-bottom: 5px;
    font-weight: 600;
    color: #2c3e50;
}

#batchGenerateModal .badge {
    padding: 2px 5px;
    margin: 0 2px;
}

#batchGenerateModal .row {
    margin-bottom: 10px;
}

#batchGenerateModal .col-md-6 {
    padding: 0 8px;
}

#batchGenerateModal .modal-footer {
    padding: 8px 15px;
    border-top: 1px solid #e9ecef;
}

#batchGenerateModal .btn {
    padding: 5px 10px;
}
/* 修复下拉菜单显示问题 */
.dropdown-menu {
    z-index: 99999 !important;
    position: absolute !important;
}

.user-dropdown {
    z-index: 99998 !important;
    position: relative !important;
}

/* 确保下拉菜单不被其他元素遮挡 */
.navbar .dropdown {
    position: relative !important;
    z-index: 99999 !important;
}

/* 覆盖浮动面板样式 - 改为正常显示，移除阴影和动画 */
.floating-panel {
    background: white !important;
    border-radius: 8px !important;
    padding: 20px !important;
    width: 100% !important;
    z-index: 10000 !important;
    display: none !important;
    border: 1px solid #e0e0e0 !important;
    position: static !important;
    margin-top: 20px !important;
    box-shadow: none !important;
    overflow-y: visible !important;
    max-height: none !important;
}

.floating-panel.show {
    display: block !important;
    animation: none !important;
    transform: none !important;
}

/* 小屏幕也使用正常显示 */
@media (max-width: 768px) {
    .floating-panel {
        position: static !important;
        width: 100% !important;
        max-width: 100% !important;
        transform: none !important;
        overflow-y: visible !important;
        max-height: none !important;
    }
    
    .floating-panel.show {
        display: block !important;
        animation: none !important;
        transform: none !important;
    }
}

/* Canvas区域焦点样式 */
.canvas-wrapper:focus {
    box-shadow: 0 0 0 2px #007bff;
    border-radius: 8px;
}

.canvas-wrapper {
    border: 2px solid transparent;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: crosshair;
    position: relative;
}

.canvas-wrapper:hover {
    border-color: #e0e0e0;
}

/* Canvas区域提示 */
.canvas-wrapper::before {
    content: "点击Canvas区域激活快捷键 (F2编辑, Ctrl+C复制, Ctrl+V粘贴)";
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 123, 255, 0.9);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1000;
}

.canvas-wrapper:hover::before {
    opacity: 1;
}

/* 文字阴影区域样式 */
.text-shadow-section {
    border: 1px solid #e0e0e0;
    padding: 16px;
    border-radius: 8px;
    background: #fafafa;
    margin-bottom: 20px;
}

.section-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    display: block;
    font-size: 14px;
}

.shadow-control {
    margin-bottom: 12px;
}

.shadow-control:last-child {
    margin-bottom: 0;
}

.control-label {
    font-size: 13px;
    color: #666;
    display: block;
    margin-bottom: 6px;
}

.color-input {
    width: 40px;
    height: 30px;
    border: 1px solid #ccc;
    border-radius: 6px;
    cursor: pointer;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.range-slider {
    flex: 1;
    min-width: 0;
    height: 6px;
}

.slider-value {
    font-size: 13px;
    color: #666;
    min-width: 25px;
    text-align: center;
    font-weight: 500;
    flex-shrink: 0;
}