/* 页面英雄区域 */
.page-hero {
    position: relative;
    overflow: hidden;
    padding: 60px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.page-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.page-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.page-title {
    font-size: 36px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-desc {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

/* 主内容区域 */
.main-content {
    padding: 40px 0;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    min-height: calc(100vh - 200px);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.zhishikapian-container {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.zhishikapian-designer {
    display: flex;
    height: 1170px;
}

/* 左侧控制面板 */
.control-panel {
    width: 750px;
    height: 100%;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    padding: 30px;
    color: #fff;
    overflow: hidden;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

/* 选项卡 */
.tabs-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn svg {
    width: 18px;
    height: 18px;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* 选项卡内容 */
.tab-content {
    display: none;
    flex: 1;
    overflow: hidden;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
}

/* 控制组 */
.control-group {
    margin-bottom: 22px;
}

.control-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 10px;
}

.control-input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    transition: all 0.3s ease;
}

.control-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

.control-textarea {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    resize: none;
    font-family: inherit;
    transition: all 0.3s ease;
    overflow: hidden;
    box-sizing: border-box;
    height: 400px;
}

.control-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

.char-count {
    text-align: right;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 6px;
}

.control-select {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.control-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

.control-select option {
    background: #1e293b;
    color: #fff;
}

/* 主题网格 */
.theme-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.theme-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.theme-btn.active {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.2);
}

.theme-preview {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.theme-name {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
}

/* 颜色选择器包装 */
.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.color-picker {
    width: 50px;
    height: 42px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    background: transparent;
}

.color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker::-webkit-color-swatch {
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.color-value {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Courier New', monospace;
}

/* 滑块包装 */
.slider-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

.control-slider {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
}

.control-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.5);
}

.control-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.5);
}

.slider-value {
    width: 60px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    text-align: right;
}

/* 操作按钮 */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn svg {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

/* 登录提示 */
.login-prompt {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px dashed rgba(239, 68, 68, 0.4);
    border-radius: 12px;
    color: #fca5a5;
    font-size: 14px;
}

.login-prompt svg {
    width: 18px;
    height: 18px;
}

/* 右侧预览区域 */
.preview-panel {
    flex: 1;
    height: 100%;
    padding: 30px;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    box-sizing: border-box;
}

.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
}

.preview-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.preview-tip {
    font-size: 13px;
    color: #94a3b8;
}

.preview-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100% - 60px);
    padding: 30px;
}

/* 卡片预览 */
.card-preview {
    position: relative;
    width: 480px;
    min-height: 680px;
    padding: 45px;
    background: linear-gradient(135deg, #1a237e 0%, #283593 100%);
    border-radius: 24px;
    color: #fff;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
}

.card-glow {
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.3) 0%, transparent 70%);
    border-radius: 50%;
}

.card-header {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 20px;
    padding-bottom: 0;
    border-bottom: none;
}

.card-logo {
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.card-logo svg {
    width: 24px;
    height: 24px;
}

.card-title-area {
    flex: 1;
}

.card-title {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
}

.card-subtitle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.card-date {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Courier New', monospace;
}

.card-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.2) 50%, transparent 100%);
    margin: 20px 0;
}

.card-content {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 15px 0;
}

.special-text {
    font-size: 30px;
    font-weight: 700;
    color: #ffd700;
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 0 2px 20px rgba(255, 215, 0, 0.3);
    letter-spacing: 2px;
}

.content-divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.6), transparent);
    margin: 15px auto;
    border-radius: 2px;
}

.normal-text {
    font-size: 19px;
    color: rgba(255, 255, 255, 0.92);
    line-height: 2;
    text-align: center;
    margin: 6px 0;
    font-weight: 400;
}

.normal-text.highlight {
    color: #ffd700;
    font-weight: 600;
    font-style: italic;
    letter-spacing: 1px;
}

.card-footer {
    position: relative;
    z-index: 1;
    padding-top: 15px;
    border-top: none;
}

.appreciation-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.appreciation-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.8);
    flex-shrink: 0;
}

.appreciation-icon svg {
    width: 18px;
    height: 18px;
}

.appreciation-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.appreciation-label {
    font-size: 12px;
    color: rgba(102, 126, 234, 0.8);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.appreciation-content {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
}

.card-watermark {
    text-align: center;
    margin-top: 15px;
    opacity: 0.3;
}

.card-watermark span {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Courier New', monospace;
    letter-spacing: 3px;
}

/* 消息提示 */
.message-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 1000;
}

.message-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: #1e293b;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.toast-icon {
    width: 24px;
    height: 24px;
}

.toast-icon.success {
    color: #10b981;
}

.toast-icon.error {
    color: #ef4444;
}

.toast-message {
    font-size: 15px;
    color: #fff;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .zhishikapian-designer {
        flex-direction: column;
        height: auto;
    }

    .control-panel {
        width: 100%;
        height: auto;
        border-radius: 0;
        overflow-y: auto;
    }

    .tab-content {
        flex: none;
        max-height: none;
    }

    .theme-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .preview-panel {
        height: auto;
        padding: 20px;
    }

    .preview-container {
        padding: 20px;
    }
}

@media (max-width: 600px) {
    .page-title {
        font-size: 28px;
    }
    
    .page-hero {
        padding: 40px 0;
    }
    
    .control-panel {
        padding: 20px;
    }
    
    .tabs-wrapper {
        gap: 6px;
    }
    
    .tab-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .theme-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .theme-name {
        font-size: 10px;
    }
    
    .card-preview {
        width: 100%;
        max-width: 350px;
        height: auto;
        min-height: 450px;
        padding: 25px;
    }
}