/* style.css */
:root {
    --primary: #2196F3;
    --error: #f44336;
}

body {
    font-family: "PingFang SC", system-ui;
    background: #f5f5f5;
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}

#messageForm input, 
#messageForm textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 16px;
    border: 2px solid #eee;
    border-radius: 8px;
    transition: border-color 0.3s;
}

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

.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

button {
    background: var(--primary);
    color: white;
    padding: 12px 32px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: opacity 0.3s;
}

#charCount {
    color: #666;
    font-size: 14px;
}

/* 留言卡片样式 */
.message-item {
    padding: 16px;
    margin: 12px 0;
    border-left: 4px solid var(--primary);
    background: #f8f9fa;
    position: relative;
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.nickname {
    color: var(--primary);
    font-weight: 600;
}

.timestamp {
    color: #666;
    font-size: 0.9em;
}

.delete-btn {
    position: absolute;
    right: 16px;
    bottom: 16px;
    color: var(--error);
    cursor: pointer;
}

/* 移动端适配 */
@media (max-width: 480px) {
  .message-container {
    width: 95%;
    padding: 10px;
  }
  .submit-btn {
    width: 100%;
  }
}

.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    opacity: 0;
    transition: opacity 0.3s;
}