* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f7fa;
    overflow: hidden;
}

.editor-135-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100%;
}

.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.left-sidebar {
    width: 180px;
    height: 100%;
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 20px 0;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    overflow-y: auto;
}

.center-area {
    flex: 1;
    display: flex;
    overflow: hidden;
    background: #f5f7fa;
}

.left-column {
    width: 35%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-right: 1px solid #e8e8e8;
}

.right-column {
    width: 65%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.top-nav-bar {
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    padding: 0 20px;
}

.nav-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
}

.nav-row:first-child {
    border-bottom: 1px solid #f0f0f0;
}

.nav-tag {
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    color: #666;
    background: #f5f7fa;
    border: none;
}

.nav-tag:hover {
    background: #fff0eb;
    color: #ff6b35;
}

.nav-tag.active {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
}

.filter-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-box {
    display: flex;
    align-items: center;
    background: #f5f7fa;
    border-radius: 20px;
    padding: 6px 12px;
    width: 200px;
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    flex: 1;
    font-size: 13px;
    color: #333;
}

.search-box i {
    color: #999;
    font-size: 14px;
}

.filter-btn {
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    border: 1px solid #e8e8e8;
    background: #fff;
    color: #666;
    transition: all 0.3s;
}

.filter-btn:hover {
    border-color: #ff6b35;
    color: #ff6b35;
}

.filter-btn.active {
    background: #ff6b35;
    border-color: #ff6b35;
    color: #fff;
}

.refresh-btn {
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    border: 1px solid #e8e8e8;
    background: #fff;
    color: #666;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.refresh-btn:hover {
    border-color: #ff6b35;
    color: #ff6b35;
}

.template-area {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f5f7fa;
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)); /* 防止列宽被内容撑开 */
    gap: 16px;
}

.template-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    position: relative; /* 关键：为绝对定位标识提供定位父元素 */
    min-width: 0; /* 防止grid列被内容撑开 */
}

/* 遮罩层容器 */
.template-card-wrapper {
    position: relative;
    overflow: visible;
}

/* VIP遮罩层 - 灰色半透明背景 */
.vip-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.6) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    z-index: 9999 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.3s ease !important;
    pointer-events: auto !important;
    border-radius: 12px !important;
}

/* hover时显示遮罩层 */
.template-card-wrapper:hover .vip-overlay {
    opacity: 1 !important;
    visibility: visible !important;
}

/* 点击遮罩层空白区域时阻止事件冒泡 */
.vip-overlay:hover {
    pointer-events: auto !important;
}

/* 遮罩层按钮样式 */
.vip-overlay-btn {
    display: block !important;
    width: 140px !important;
    padding: 8px 16px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    color: #333 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-align: center !important;
    border: 2px solid white !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    text-decoration: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

.vip-overlay-btn:hover {
    background: white !important;
    transform: scale(1.05) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

.vip-overlay-btn.buy {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%) !important;
    color: white !important;
    border-color: transparent !important;
}

.vip-overlay-btn.buy:hover {
    background: linear-gradient(135deg, #ee5a6f 0%, #ff6b6b 100%) !important;
}

.vip-overlay-btn.preview {
    background: rgba(255, 255, 255, 0.9) !important;
    color: #667eea !important;
    border: 2px solid #667eea !important;
}

.vip-overlay-btn.preview:hover {
    background: #667eea !important;
    color: white !important;
}

.template-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border-color: #ff6b35;
}

.template-preview {
    padding: 16px;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.template-preview img {
    max-width: 100%;
    height: auto;
}

.editor-area {
    flex: 1;
    background: #fff;
    display: flex;
    flex-direction: column;
}

.editor-header {
    padding: 10px 20px;
    background: #fafafa;
    border-bottom: 1px solid #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.editor-title {
    font-size: 14px;
    color: #333;
    font-weight: 600;
}

.editor-status {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 12px;
    color: #999;
}

.editor-wrapper {
    flex: 1;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #e0e0e0 !important;
}

#editor {
    width: 100% !important;
    flex: 1;
}

#editor .edui-editor {
    border: none !important;
    background: #e0e0e0 !important;
}

#editor .edui-editor-iframeholder {
    width: 520px !important;
    margin: 0 auto !important;
    background: #fff !important;
}

#editor .edui-editor-body {
    height: 100% !important;
}

.iphone-frame {
    width: 414px;
    height: 896px;
    margin: 0 auto;
    background: linear-gradient(135deg, #f8f8f8 0%, #e8e8e8 100%);
    border-radius: 48px;
    padding: 16px;
    box-shadow:
        0 20px 50px rgba(0,0,0,0.2),
        inset 0 0 0 2px rgba(0,0,0,0.1),
        inset 0 0 0 8px #fff;
    position: relative;
}

.iphone-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
    height: 34px;
    background: #000;
    border-radius: 0 0 24px 24px;
    z-index: 1;
}

.iphone-frame::after {
    content: '';
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 160px;
    height: 6px;
    background: rgba(0,0,0,0.3);
    border-radius: 3px;
    z-index: 1;
}

.iphone-content {
    width: 100%;
    height: 800px;
    background: #fff;
    overflow-y: auto;
    border-radius: 36px;
    padding: 20px;
    box-sizing: border-box;
    position: relative;
    z-index: 0;
}

.iphone-content::-webkit-scrollbar {
    width: 6px;
}

.iphone-content::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

/* 预览模态框 - iPhone 手机模型 */
#myModalsee .modal-dialog {
    width: 480px !important;
    margin: 20px auto;
    max-height: calc(100vh - 40px);
    overflow: hidden;
}

#myModalsee .modal-content {
    max-height: calc(100vh - 40px);
    overflow: hidden;
    border: none;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    background: transparent;
}

#myModalsee .modal-body {
    padding: 40px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    max-height: calc(100vh - 100px);
}

.pb-iphone-frame {
    width: 375px;
    height: 812px;
    background: linear-gradient(135deg, #f8f8f8 0%, #e8e8e8 100%);
    border-radius: 48px;
    padding: 16px;
    box-shadow:
        0 20px 50px rgba(0,0,0,0.2),
        inset 0 0 0 2px rgba(255,255,255,0.1),
        inset 0 0 0 8px #fff;
    position: relative;
    flex-shrink: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pb-iphone-frame:hover {
    transform: translateY(-5px);
    box-shadow:
        0 25px 60px rgba(0,0,0,0.25),
        inset 0 0 0 2px rgba(255,255,255,0.1),
        inset 0 0 0 8px #fff;
}

/* iPhone 刘海 */
.pb-iphone-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
    height: 34px;
    background: #000;
    border-radius: 0 0 24px 24px;
    z-index: 10;
}

/* iPhone Home Indicator */
.pb-iphone-home-indicator {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 160px;
    height: 6px;
    background: rgba(0,0,0,0.3);
    border-radius: 3px;
    z-index: 10;
}

.pb-iphone-content {
    width: 100%;
    height: 730px;
    background: #fff;
    overflow-y: auto;
    border-radius: 36px;
    padding: 20px;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

.pb-iphone-content::-webkit-scrollbar {
    width: 6px;
}

.pb-iphone-content::-webkit-scrollbar-track {
    background: transparent;
}

.pb-iphone-content::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.pb-iphone-content::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* 确保预览内容不会被压缩 */
.pb-iphone-content * {
    max-width: 100%;
    box-sizing: border-box;
}

.loading-text {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 14px;
}

/* 快捷面板样式 */
#right-fix-tab{
    width:32px;position:absolute;right:0px;
}
#right-fix-tab li{width:30px;background:rgba(58,51,50,0.5);border:0 none;color:#FFF;width:30px;font-size:14px;}

#color-plan .nav-tabs > li > a{padding:5px;color: #efefef;border: 0 none;}
#color-plan .nav-tabs > li > a:hover{background:transparent;color:#FFF;}
#color-plan .nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, .nav-tabs > li.active > a:focus {background-color: #000;color: #FFF;border: 0 none;}
#more-popover-content .btn-xs{font-size:12px;padding:2px 2px;width:64px;margin:2px;height:20px;margin:1px auto;border: 0 none;background: transparent;color: #FFF;border: 1px solid #FFF;}
#more-popover-content .btn-xs:hover{ background-color:rgb(213,149,69);color:#FFF;}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* 引导界面样式 */
.empty-guide-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    min-height: 400px;
}

.empty-guide-icon {
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.empty-guide-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 12px;
}

.empty-guide-text {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
}

.empty-guide-tips {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px 30px;
    text-align: left;
}

.tip-item {
    font-size: 14px;
    color: #555;
    margin: 10px 0;
    display: flex;
    align-items: center;
}

.tip-item i {
    color: #18bc9c;
    margin-right: 8px;
    font-size: 16px;
}