/* 全局样式 */
:root {
    --primary-color: #ff4d4f;
    --secondary-color: #1f1f1f;
    --accent-color: #ffcb2b;
    --text-color: #333;
    --light-color: #f8f8f8;
    --border-color: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --gradient-start: #ff4d4f;
    --gradient-end: #ff7875;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f5f5f5;
}

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

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 0;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px var(--shadow-color);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* 主要内容区域 */
main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    main {
        grid-template-columns: 1fr;
    }
}

/* 输入区域样式 */
.input-section, .output-section {
    background-color: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 12px var(--shadow-color);
}

.input-section h2, .output-section h2 {
    color: var(--secondary-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--secondary-color);
}

input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

input[type="text"]:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 77, 79, 0.2);
}

.generate-btn {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    width: 100%;
    margin-top: 10px;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(255, 77, 79, 0.3);
}

.generate-btn:active {
    transform: translateY(0);
    box-shadow: 0 3px 6px rgba(255, 77, 79, 0.3);
}

/* 输出区域样式 */
.copywriting-result {
    background-color: var(--light-color);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    margin-bottom: 20px;
    min-height: 200px;
    white-space: pre-line;
    font-size: 1.1rem;
    line-height: 1.8;
}

.placeholder {
    color: #999;
    font-style: italic;
}

.actions {
    display: flex;
    gap: 15px;
}

.action-btn {
    flex: 1;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s;
}

.action-btn:hover {
    background-color: #333;
}

#copyBtn {
    background-color: var(--accent-color);
    color: var(--secondary-color);
}

#copyBtn:hover {
    background-color: #ffd54f;
}

/* 风格说明区域 */
.style-explanation {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 12px var(--shadow-color);
    margin-bottom: 40px;
}

.style-explanation h2 {
    text-align: center;
    margin-bottom: 25px;
    color: var(--secondary-color);
}

.style-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.style-card {
    background-color: var(--light-color);
    padding: 20px;
    border-radius: 8px;
    border-top: 3px solid var(--primary-color);
}

.style-card h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

/* 页脚样式 */
footer {
    text-align: center;
    padding: 20px 0;
    color: #777;
    font-size: 0.9rem;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.copywriting-result:not(.placeholder) {
    animation: fadeIn 0.5s ease-out;
}