* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-attachment: fixed;
    height: 100vh;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

.container {
    width: 100%;
    height: 100vh;
    margin: 0;
    padding: 0;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

/* 预览面板样式 */
.preview-panel {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 0;
    padding: 15px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.1);
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 3px solid rgba(102, 126, 234, 0.3);
    flex-shrink: 0;
}

.preview-panel h2 {
    color: #2d3748;
    font-size: 1.6em;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn-fullscreen {
    padding: 10px 20px;
    border: 2px solid #667eea;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-fullscreen:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-fullscreen:active {
    transform: translateY(0);
}

.preview-container {
    background: #ffffff;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    min-height: 0;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.preview-area {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    background: #4a90e2;
    transition: all 0.3s ease;
}

.text-container {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    z-index: 1;
}

.main-title {
    color: white;
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 20px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.4);
    transition: color 0.3s ease, font-size 0.3s ease, font-family 0.3s ease, font-weight 0.3s ease;
    word-wrap: break-word;
    text-align: center;
    line-height: 1.2;
}

.sub-title {
    color: white;
    font-size: 24px;
    font-weight: 500;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.4);
    transition: color 0.3s ease, font-size 0.3s ease, font-family 0.3s ease, font-weight 0.3s ease;
    word-wrap: break-word;
    text-align: center;
    line-height: 1.3;
}

/* 编辑面板样式 */
.editor-panel {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 0;
    padding: 15px;
    height: 100vh;
    overflow-y: auto;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(0, 0, 0, 0.1);
}

.editor-panel h2 {
    color: #2d3748;
    margin-bottom: 15px;
    font-size: 1.5em;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding-bottom: 10px;
    border-bottom: 3px solid rgba(102, 126, 234, 0.2);
    flex-shrink: 0;
}

.section-divider {
    margin: 15px 0 12px 0;
    position: relative;
    text-align: center;
    flex-shrink: 0;
}

.section-divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #667eea, transparent);
}

.section-divider span {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 0 15px;
    color: #667eea;
    font-weight: 600;
    font-size: 0.9em;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.control-group {
    margin-bottom: 15px;
    flex-shrink: 0;
}

.control-group label {
    display: block;
    margin-bottom: 10px;
    color: #4a5568;
    font-weight: 600;
    font-size: 0.95em;
    letter-spacing: 0.3px;
}

.control-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
    color: #2d3748;
}

.control-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.control-input[type="color"] {
    height: 50px;
    cursor: pointer;
    padding: 5px;
    border-radius: 10px;
}

.control-input[type="range"] {
    height: 8px;
    background: linear-gradient(90deg, #e2e8f0, #cbd5e0);
    border-radius: 5px;
    outline: none;
    border: none;
    padding: 0;
}

.control-input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
    transition: all 0.2s ease;
}

.control-input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.6);
}

.control-input[type="range"]::-moz-range-thumb {
    width: 22px;
    height: 22px;
    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.4);
}

.control-group span {
    display: inline-block;
    margin-left: 12px;
    color: #667eea;
    font-weight: 700;
    min-width: 55px;
    font-size: 0.95em;
}

.button-group {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
}

.btn-primary, .btn-secondary {
    padding: 14px 24px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

.btn-secondary:active {
    transform: translateY(0);
}

/* 全屏预览样式 */
.fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.98);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
}


.fullscreen-preview {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    position: relative;
    overflow: hidden;
    background: #4a90e2;
    transition: all 0.3s ease;
}

.fullscreen-preview .text-container {
    width: 100%;
    height: 100%;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .editor-panel {
        position: relative;
        top: 0;
        max-height: none;
    }
    
    .preview-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }
    
    .main-content {
        padding: 20px;
        border-radius: 15px;
    }
    
    .preview-area {
        aspect-ratio: 4 / 3;
    }
    
    .main-title {
        font-size: 36px;
    }
    
    .sub-title {
        font-size: 20px;
    }
}

/* 滚动条样式 */
.editor-panel::-webkit-scrollbar {
    width: 10px;
}

.editor-panel::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.editor-panel::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

.editor-panel::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3d8f 100%);
}
