/* 全局樣式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* 頂部導航欄 */
.navbar {
    background-color: #ffffff;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: bold;
    color: #2c3e50;
}

.nav-brand i {
    color: #3498db;
}

.nav-items {
    display: flex;
    gap: 1.5rem;
}

.nav-items a {
    text-decoration: none;
    color: #666;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s;
}

.nav-items a:hover,
.nav-items a.active {
    color: #3498db;
}

/* 主要內容區 */
.main-content {
    margin-top: 4rem;
    padding: 1rem;
    margin-bottom: 4rem;
}

/* 地區卡片樣式 */
.area-cards {
    margin-bottom: 2rem;
}

.area-cards h2 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.area-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.card-header h3 {
    color: #2c3e50;
    margin: 0;
}

.level {
    background: #3498db;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
}

.progress-bar {
    background: #eee;
    height: 8px;
    border-radius: 4px;
    margin: 1rem 0;
    overflow: hidden;
}

.progress {
    background: #3498db;
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* 貼文列表樣式 */
.posts {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.post-filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.filter-btn {
    background: #f5f5f5;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s;
}

.filter-btn.active {
    background: #3498db;
    color: white;
}

.post-item {
    border-bottom: 1px solid #eee;
    padding: 1rem 0;
}

.post-item:last-child {
    border-bottom: none;
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: #f5f5f5;
}

.avatar.anonymous {
    background: none;
}

.avatar.anonymous svg {
    width: 100%;
    height: 100%;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 500;
}

.post-time {
    font-size: 0.875rem;
    color: #666;
}

.post-category {
    background: #e1f0fa;
    color: #3498db;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
}

.post-content {
    margin-bottom: 1rem;
}

.post-tags {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.tag {
    color: #3498db;
    font-size: 0.875rem;
}

.post-footer {
    display: flex;
    gap: 1rem;
}

.action-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s;
}

.action-btn:hover {
    color: #3498db;
}

/* 底部導航欄 */
.bottom-nav {
    background: white;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    padding: 0.75rem;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
}

.bottom-nav a {
    text-decoration: none;
    color: #666;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    transition: color 0.3s;
}

.bottom-nav a:hover,
.bottom-nav a.active {
    color: #3498db;
}

.post-btn {
    background: #3498db;
    color: white !important;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.post-btn i {
    font-size: 1.5rem;
}

/* 按讚計數樣式 */
.like-count {
    margin-left: 0.25rem;
    font-size: 0.875rem;
    color: #666;
}

/* Toast 通知樣式 */
.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-size: 0.875rem;
    z-index: 1000;
    animation: fadeInOut 3s ease-in-out;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translate(-50%, 20px); }
    15% { opacity: 1; transform: translate(-50%, 0); }
    85% { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; transform: translate(-50%, -20px); }
}

/* 文章詳情頁面樣式 */
.post-detail {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.post-detail h1 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

/* 留言區樣式 */
.comments-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.comments-section h2 {
    color: #2c3e50;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.comment-form {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.comment-input {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.comment-input textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    resize: none;
    font-size: 1rem;
    transition: all 0.3s;
}

.comment-input textarea:focus {
    border-color: #3498db;
    outline: none;
}

.submit-btn {
    align-self: flex-end;
    background: #3498db;
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.submit-btn:hover {
    background: #2980b9;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.comment-item {
    border-bottom: 1px solid #eee;
    padding-bottom: 1.5rem;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.comment-content {
    color: #2c3e50;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.comment-actions {
    display: flex;
    gap: 1rem;
}

.comment-time {
    font-size: 0.875rem;
    color: #666;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .nav-items {
        display: none;
    }
    
    .main-content {
        margin-top: 3rem;
    }
    
    .card-container {
        grid-template-columns: 1fr;
    }

    .post-detail {
        padding: 1rem;
    }

    .comment-form {
        flex-direction: column;
    }

    .comment-input textarea {
        min-height: 100px;
    }
} 