/* 共餐活動專用樣式 */

/* 頂部導航 */
.meal-events-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2E9A9A 100%);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.page-title {
    color: var(--white);
    font-size: 22px; /* 增大字型 */
    font-weight: 600;
    margin: 0;
    flex: 1;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.filter-btn {
    background: none;
    border: none;
    color: var(--white);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.3s;
    position: relative;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.filter-btn:hover {
    background-color: rgba(255,255,255,0.2);
}

.filter-btn svg {
    width: 24px;
    height: 24px;
}

/* 篩選選單 */
.filter-menu {
    background: var(--white);
    border-top: 1px solid rgba(255,255,255,0.2);
    padding: 15px 20px;
}

.filter-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 480px;
    margin: 0 auto;
}

.filter-option {
    background: var(--light-bg);
    border: 2px solid transparent;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px; /* 增大字型 */
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.filter-option:hover {
    background: var(--secondary-color);
    color: var(--white);
}

.filter-option.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* 主要內容 */
.meal-events-main {
    padding: 20px;
    max-width: 480px;
    margin: 0 auto;
    padding-bottom: 100px; /* 為底部按鈕留空間 */
}

/* 統計卡片 */
.stats-section {
    margin-bottom: 25px;
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.stats-card {
    background: var(--white);
    border-radius: 12px;
    padding: 20px 15px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.stats-card:hover {
    transform: translateY(-3px);
}

.stats-number {
    font-size: 28px; /* 增大字型 */
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 8px;
    line-height: 1;
}

.stats-label {
    font-size: 14px; /* 增大字型 */
    color: var(--text-secondary);
    font-weight: 500;
}

/* 活動列表 */
.events-section {
    margin-bottom: 20px;
}

.events-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 活動卡片 */
.event-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    position: relative;
}

.event-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.event-card:active {
    transform: translateY(-1px);
}

/* 活動卡片頭部 */
.event-header {
    padding: 20px;
    position: relative;
}

.event-title {
    font-size: 20px; /* 增大字型 */
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.event-restaurant {
    color: var(--primary-color);
    font-size: 16px; /* 增大字型 */
    font-weight: 500;
    margin-bottom: 15px;
}

/* 活動狀態徽章 */
.event-status {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px; /* 增大字型 */
    font-weight: 600;
    color: var(--white);
}

.event-status.public {
    background: linear-gradient(135deg, #4CAF50, #66BB6A);
}

.event-status.private {
    background: linear-gradient(135deg, #FF9800, #FFB74D);
}

.event-status.ended {
    background: linear-gradient(135deg, #F44336, #EF5350);
}

.event-status.voting {
    background: linear-gradient(135deg, #9C27B0, #BA68C8);
}

/* 活動詳情 */
.event-details {
    padding: 0 20px 20px 20px;
}

.event-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.event-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px; /* 增大字型 */
    color: var(--text-primary);
}

.event-info-icon {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.event-participants {
    background: var(--light-bg);
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

.participants-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.participants-title {
    font-size: 16px; /* 增大字型 */
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.participants-count {
    font-size: 18px; /* 增大字型 */
    font-weight: bold;
    color: var(--primary-color);
}

.participants-progress {
    width: 100%;
    height: 6px;
    background: #ddd;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 8px;
}

.participants-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s;
}

/* 活動類型指示器 */
.event-type-indicator {
    display: inline-block;
    background: var(--light-bg);
    color: var(--primary-color);
    font-size: 13px; /* 調整字型大小 */
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 12px;
    margin: 8px 0;
    border: 1px solid rgba(46, 139, 139, 0.2);
}

/* 多店投票樣式略有不同 */
.event-type-indicator.multi {
    background: rgba(156, 39, 176, 0.1);
    color: #9C27B0;
    border-color: rgba(156, 39, 176, 0.2);
}

/* 底部固定按鈕 */
.meal-events-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: var(--white);
    border-top: 1px solid rgba(46, 139, 139, 0.2);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.bottom-actions {
    display: flex;
    justify-content: center;
    max-width: 480px;
    margin: 0 auto;
    padding: 15px 20px;
    gap: 15px;
}

.action-btn {
    flex: 1;
    border: none;
    border-radius: 12px;
    padding: 15px 10px;
    font-size: 16px; /* 增大字型 */
    font-weight: 600;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    min-height: 70px;
    text-decoration: none;
}

.action-btn.primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
}

.action-btn.primary:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(46, 139, 139, 0.3);
}

.action-btn.secondary {
    background: var(--light-bg);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.action-btn.secondary:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(46, 139, 139, 0.3);
}

.action-btn:active {
    transform: translateY(0);
}

.action-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn span {
    font-size: 14px; /* 增大字型 */
    text-align: center;
    line-height: 1.2;
}

/* 開始活動按鈕 */
.start-meal-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border: none;
    border-radius: 25px;
    padding: 12px 24px;
    font-size: 16px; /* 增大字型 */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 15px;
}

.start-meal-btn:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(46, 139, 139, 0.3);
}

/* 響應式設計 */
@media (min-width: 481px) and (max-width: 768px) {
    .meal-events-main {
        max-width: 600px;
        padding: 25px;
        padding-bottom: 120px;
    }
    
    .nav-container {
        max-width: 600px;
        padding: 0 25px;
    }
    
    .page-title {
        font-size: 24px;
    }
    
    .event-title {
        font-size: 22px;
    }
    
    .event-restaurant {
        font-size: 17px;
    }
    
    .event-info-item {
        font-size: 17px;
    }
    
    .action-btn {
        padding: 18px 12px;
        font-size: 17px;
        min-height: 80px;
    }
    
    .bottom-actions {
        padding: 20px 25px;
    }
    
    .stats-number {
        font-size: 32px;
    }
}

@media (min-width: 769px) {
    .meal-events-main {
        max-width: 800px;
        padding: 30px;
        padding-bottom: 140px;
    }
    
    .nav-container {
        max-width: 800px;
        padding: 0 30px;
    }
    
    .page-title {
        font-size: 26px;
    }
    
    .event-title {
        font-size: 24px;
    }
    
    .event-restaurant {
        font-size: 18px;
    }
    
    .event-info-item {
        font-size: 18px;
    }
    
    .action-btn {
        padding: 20px 15px;
        font-size: 18px;
        min-height: 90px;
    }
    
    .bottom-actions {
        padding: 25px 30px;
        gap: 20px;
    }
    
    .stats-number {
        font-size: 36px;
    }
    
    .stats-cards {
        gap: 20px;
    }
}

/* 動畫效果 */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.event-card {
    animation: slideInUp 0.5s ease-out;
}

/* 載入狀態 */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 30px;
    color: var(--text-secondary);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--light-bg);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-indicator span {
    font-size: 16px; /* 增大字型 */
    font-weight: 500;
}

/* 無結果提示 */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.no-results-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.no-results h3 {
    font-size: 20px; /* 增大字型 */
    margin-bottom: 10px;
    color: var(--text-primary);
}

.no-results p {
    font-size: 16px; /* 增大字型 */
    margin-bottom: 20px;
}

/* 觸控友善 */
@media (hover: none) and (pointer: coarse) {
    .event-card:hover {
        transform: none;
        box-shadow: var(--shadow);
    }
    
    .action-btn:hover {
        transform: none;
        box-shadow: none;
    }
}

/* 高對比度支援 */
@media (prefers-contrast: high) {
    .event-status.public {
        background: #2E7D32;
    }
    
    .event-status.private {
        background: #F57C00;
    }
    
    .event-status.ended {
        background: #D32F2F;
    }
    
    .event-status.voting {
        background: #7B1FA2;
    }
    
    .event-card {
        border: 2px solid var(--primary-color);
    }
}
