/* 详情页编辑器样式 */

/* 详情页编辑器现代化样式 */
.detail-page-mode {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    position: relative;
    overflow-x: hidden;
}

.detail-page-mode::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(120, 219, 226, 0.3) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.detail-page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

#detailPageEditorModal {
    z-index: 10000;
}

.detail-editor-content {
    width: 95vw;
    max-width: 1200px;
    height: 90vh;
    max-height: 800px;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.detail-editor-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(15, 15, 35, 0.95), rgba(26, 26, 46, 0.95));
    display: none;
    z-index: 10000;
    backdrop-filter: blur(20px);
}

.detail-editor-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.detail-editor-header {
    padding: 20px 25px 15px;
    border-bottom: 2px solid rgba(255, 215, 0, 0.3);
    background: linear-gradient(135deg, #1a1a2e, #16213e);
}

.detail-editor-header .modal-title {
    margin: 0 0 15px 0;
    font-size: 1.5rem;
    color: #FFD700;
}

.editor-toolbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.toolbar-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(90deg, #ff006e, #8338ec, #3a86ff, #06ffa5, #ffbe0b, #fb5607, #ff006e);
    background-size: 400% 400%;
    animation: gradientShift 3s ease infinite;
    border: 2px solid #FFD700;
    border-radius: 8px;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toolbar-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.6);
    border-color: #FFD700;
}

.detail-editor-body {
    flex: 1;
    padding: 20px 25px;
    overflow-y: auto;
    background: linear-gradient(135deg, #0f3460, #16213e, #1a1a2e);
}

.editor-content {
    min-height: 100%;
}

.empty-editor-tip {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.1rem;
}

.empty-editor-tip i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: rgba(255, 215, 0, 0.6);
}

.content-block {
    position: relative;
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 215, 0, 0.2);
    border-radius: 15px;
    transition: all 0.3s ease;
}

.content-block:hover {
    border-color: rgba(255, 215, 0, 0.5);
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.2);
}

.block-controls {
    position: absolute;
    top: -15px;
    right: 15px;
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.content-block:hover .block-controls {
    opacity: 1;
}

.control-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(90deg, #ff006e, #8338ec, #3a86ff);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.control-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 10px rgba(255, 0, 110, 0.5);
}

.control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.editable-title, .editable-text {
    outline: none;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 10px;
    transition: all 0.3s ease;
    min-height: 40px;
}

.editable-title:focus, .editable-text:focus {
    border-color: rgba(6, 255, 165, 0.5);
    box-shadow: 0 0 10px rgba(6, 255, 165, 0.3);
}

.editable-title {
    font-weight: 900;
    line-height: 1.2;
}

.editable-text {
    line-height: 1.6;
}

.image-container {
    text-align: center;
    padding: 20px;
}

.block-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    border: 2px dashed rgba(255, 215, 0, 0.5);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s ease;
}

.image-placeholder:hover {
    border-color: rgba(255, 215, 0, 0.8);
    background: rgba(255, 215, 0, 0.1);
}

.image-placeholder i {
    font-size: 2rem;
    margin-bottom: 10px;
}

.block-link {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(90deg, #06ffa5, #3a86ff, #8338ec);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(6, 255, 165, 0.3);
}

.block-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(6, 255, 165, 0.5);
    color: white;
}

.link-inputs {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.link-text-input, .link-url-input {
    padding: 10px 15px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
}

.link-text-input:focus, .link-url-input:focus {
    outline: none;
    border-color: rgba(6, 255, 165, 0.5);
    box-shadow: 0 0 10px rgba(6, 255, 165, 0.3);
}

.detail-editor-footer {
    padding: 20px 25px;
    border-top: 2px solid rgba(255, 215, 0, 0.3);
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* 多图片上传和九宫格样式 */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
    max-width: 100%;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid rgba(255, 215, 0, 0.3);
    transition: all 0.3s ease;
}

.gallery-item:hover {
    border-color: rgba(255, 215, 0, 0.6);
    transform: scale(1.02);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-item .remove-image {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    background: rgba(255, 0, 0, 0.8);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .remove-image {
    opacity: 1;
}

.multi-image-upload {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.upload-area {
    border: 2px dashed rgba(255, 215, 0, 0.5);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
}

.upload-area:hover {
    border-color: rgba(255, 215, 0, 0.8);
    background: rgba(255, 215, 0, 0.1);
}

.upload-area i {
    font-size: 2.5rem;
    color: rgba(255, 215, 0, 0.7);
    margin-bottom: 10px;
}

.upload-area p {
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    font-size: 1rem;
}

/* 文字样式控制面板 */
.text-style-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.style-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.style-control label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    min-width: 60px;
}

.style-input {
    padding: 6px 10px;
    border: 2px solid #FFD700;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.9rem;
}

.style-input:focus {
    outline: none;
    border-color: #FFD700;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.color-input {
    width: 40px;
    height: 30px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.bold-toggle {
    padding: 6px 12px;
    border: 2px solid #FFD700;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bold-toggle.active {
    background: rgba(255, 215, 0, 0.3);
    border-color: #FFD700;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.detail-editor-footer button {
    padding: 12px 24px;
    border: 2px solid #FFD700;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(90deg, #06ffa5, #3a86ff, #8338ec);
    color: white;
    box-shadow: 0 4px 15px rgba(6, 255, 165, 0.3);
}

.detail-editor-footer button:hover {
    transform: translateY(-2px);
    border-color: #FFD700;
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
    box-shadow: 0 6px 25px rgba(6, 255, 165, 0.5);
}

.detail-editor-footer .btn-secondary {
    background: linear-gradient(90deg, #8338ec, #3a86ff);
    box-shadow: 0 4px 15px rgba(131, 56, 236, 0.3);
}

.detail-editor-footer .btn-secondary:hover {
    box-shadow: 0 6px 25px rgba(131, 56, 236, 0.5);
}

.detail-editor-footer .cancel {
    background: linear-gradient(90deg, #ff4757, #ff3742);
    color: white;
}

.detail-editor-footer .save {
    background: linear-gradient(90deg, #06ffa5, #3a86ff);
    color: white;
}

.detail-editor-footer .preview-btn {
    background: linear-gradient(90deg, #ffbe0b, #fb5607);
    color: white;
}

.detail-editor-footer button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .detail-editor-content {
        width: 98vw;
        height: 95vh;
    }
    
    .detail-editor-header,
    .detail-editor-body,
    .detail-editor-footer {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .toolbar-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .detail-editor-footer {
        flex-wrap: wrap;
    }
    
    .detail-editor-footer button {
        flex: 1;
        min-width: 100px;
    }
}

/* 动画效果 */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.fade-in-up {
    animation: fadeInUp 0.4s ease-out;
}

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