/* 全域設定：確保邊距計算包含 padding 與 border */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* 頂部橫幅設計 */
.hero {
    background: linear-gradient(135deg, #a1c4fd, #c2e9fb);
    padding: 60px 20px;
    text-align: center;
}

.hero h1 {
    margin: 0;
    font-size: 2.8em;
    color: #2c3e50;
}

.hero h2 {
    font-size: 1.4em;
    margin-top: 15px;
    color: #34495e;
    font-weight: normal;
}

.hero p {
    max-width: 600px;
    margin: 20px auto;
    color: #555;
}

/* 全域按鈕樣式 */
button {
    padding: 12px 24px;
    color: white;
    background-color: #6c63ff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: background 0.3s, transform 0.1s;
    margin-top: 10px;
}

button:hover {
    background-color: #5a53e0;
}

button:active {
    transform: scale(0.98);
}

/* 內容區塊共用設定 */
section {
    max-width: 1000px;
    margin: 50px auto;
    padding: 0 20px;
}

section h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 2em;
}

/* 彈性佈局容器 (用於卡片與步驟並排) */
.section-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* 空間不夠時自動換行 */
    gap: 25px;
}

/* 痛點卡片設計 */
.card {
    background-color: #fff;
    border: 1px solid #eaeaea;
    border-radius: 10px;
    padding: 25px;
    flex: 1;
    min-width: 250px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
}

.card h3 {
    color: #e74c3c;
    margin-top: 0;
}

/* 工作流步驟設計 */
.workflow-step {
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    flex: 1;
    min-width: 280px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.workflow-step h3 {
    color: #2980b9;
    margin-top: 0;
}

.workflow-step .highlight-text {
    background-color: #f1f8ff;
    padding: 10px;
    border-radius: 5px;
    font-size: 0.9em;
    color: #0366d6;
    margin-top: auto; /* 讓按鈕與提示文字自動推到底部 */
    margin-bottom: 15px;
}

/* 表單產生器設計 */
.prompt-generator {
    background-color: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.05);
}

#promptForm input, 
#promptForm select, 
#promptForm textarea {
    width: 100%;
    margin: 10px 0 20px 0;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-size: 1em;
    font-family: inherit;
}

#promptForm input:focus, 
#promptForm select:focus, 
#promptForm textarea:focus {
    outline: none;
    border-color: #6c63ff;
    box-shadow: 0 0 5px rgba(108, 99, 255, 0.3);
}

textarea {
    height: 120px;
    resize: vertical;
}

/* 生成結果區塊 (初始隱藏，由 JS 控制顯示) */
#generatedPrompt {
    margin-top: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-left: 5px solid #6c63ff;
    border-radius: 5px;
    white-space: pre-wrap; /* 讓 Prompt 內的換行符號 \n 正常顯示 */
    line-height: 1.6;
    font-size: 1.1em;
    color: #333;
    display: none; 
}

#copyPromptButton {
    margin-top: 15px;
    display: none;
}

/* Demo 範例與限制區塊 */
.demo-content, .limitations ul {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.limitations ul {
    padding-left: 40px;
}

.limitations li {
    margin-bottom: 10px;
}

/* 頁尾 */
footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 40px 20px;
    margin-top: 50px;
}

footer h2 {
    color: #ecf0f1;
    font-size: 1.5em;
    margin-top: 0;
}

footer p {
    color: #bdc3c7;
    max-width: 600px;
    margin: 0 auto;
}