:root {
    --bg-color: #d49b30c2;
    --card-bg: rgba(255, 255, 255, 0.05); /* 半透明背景 */
    --card-border: rgba(255, 255, 255, 0.1);
    --accent-color: #4ecfe0;
    --text-primary: #ffffff;
    --text-secondary: #272727;
    --font-rounded: 'M PLUS Rounded 1c', sans-serif;
    --font-serif: 'Noto Serif TC', serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-serif);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
}

/* 讓內容浮在 Canvas 上 */
.main-wrapper {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 20px;
}

#starCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* 標題樣式 (繼承你喜歡的圓體風格) */
.pop-title {
    font-family: 'Inter', sans-serif; /* var(--font-rounded); */
    font-style: italic;
    font-weight: 580;
    font-size: 5rem;
    color: #000000;
    -webkit-text-stroke: 100px #ffffff;
    paint-order: stroke fill;
    text-align: center;
    margin-bottom: 10px;
}

.subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 50px;
    font-style: italic;
}

/* 輸入區塊樣式 */
.input-section {
    background: rgba(22, 33, 62, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 60px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

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

label {
    display: block;
    margin-bottom: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: var(--accent-color);
    font-weight: 700;
}

input, textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    color: #fff;
    font-family: var(--font-serif);
    font-size: 1rem;
    transition: all 0.3s;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(0, 0, 0, 0.5);
}

textarea {
    height: 120px;
    resize: vertical;
}

.submit-btn {
    background-color: var(--accent-color);
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: block;
    width: 100%;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(233, 69, 96, 0.4);
}

/* 留言列表樣式 (Grid 佈局) */
.messages-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* 單張留言卡片 */
.message-card {
    background: var(--card-bg);
    backdrop-filter: blur(5px);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 20px;
    transition: transform 0.3s, background 0.3s;
    animation: fadeIn 0.5s ease-out forwards;
}

.message-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.card-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.author {
    color: #2010b1ec;
    font-weight: bold;
}

.content {
    font-size: 1rem;
    color: #191cee;
    white-space: pre-wrap; /* 保留換行 */
    word-break: break-all;
}

.back-link {
    display: block;
    text-align: center;
    margin-top: 50px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
}

.back-link:hover { color: #fff; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 手機版適配 */
@media (max-width: 600px) {
    .pop-title { font-size: 2.2rem; -webkit-text-stroke: 4px #000; }
    .messages-container { grid-template-columns: 1fr; }
}