/* 我的共餐頁面樣式 */

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

.my-meals-header .nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.my-meals-header .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);
}

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

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

.refresh-btn.loading {
    animation: spin 1s linear infinite;
}

/* 狀態篩選 */
.status-filter {
    background: rgba(255,255,255,0.1);
    padding: 15px 20px;
}

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

.filter-tab {
    background: none;
    border: 2px solid rgba(255,255,255,0.3);
    color: rgba(255,255,255,0.9);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px; /* 增大字型 */
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

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

/* 主要內容 */
.my-meals-main {
    padding: 20px;
    max-width: 480px;
    margin: 0 auto;
    padding-bottom: 100px;
}

/* 統計概覽 */
.overview-section {
    margin-bottom: 25px;
}

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

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

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

.card-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.card-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.card-number {
    font-size: 24px; /* 增大字型 */
    font-weight: bold;
    color: var(--primary-color);
    line-height: 1;
}

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

/* 活動區域 */
.my-events-section {
    background: var(--white);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

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

.sort-options select {
    border: 2px solid var(--light-bg);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px; /* 增大字型 */
    color: var(--text-primary);
    background: var(--white);
    outline: none;
    cursor: pointer;
}

.sort-options select:focus {
    border-color: var(--primary-color);
}

/* 我的活動容器 */
.my-events-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 我的活動卡片 */
.my-event-card {
    border: 2px solid var(--light-bg);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.my-event-card:hover {
    border-color: var(--secondary-color);
    background: rgba(64, 224, 208, 0.05);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.my-event-card.active {
    border-color: var(--primary-color);
    background: rgba(46, 139, 139, 0.1);
}

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

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

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

.my-event-status.completed {
    background: linear-gradient(135deg, #607D8B, #78909C);
}

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

/* 活動卡片內容 */
.my-event-header {
    margin-bottom: 15px;
    padding-right: 80px; /* 為狀態徽章留空間 */
}

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

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

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

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

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

/* 活動進度 */
.my-event-progress {
    background: var(--light-bg);
    border-radius: 8px;
    padding: 12px;
    margin-top: 15px;
}

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

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

.progress-count {
    font-size: 14px; /* 增大字型 */
    font-weight: 600;
    color: var(--primary-color);
}

.progress-bar-container {
    width: 100%;
    height: 6px;
    background: #ddd;
    border-radius: 3px;
    overflow: hidden;
}

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

/* 活動操作 */
.my-event-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.action-btn-small {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.action-btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.action-btn-primary:hover {
    background: var(--secondary-color);
}

.action-btn-outline {
    background: none;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.action-btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* 空狀態 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

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

.empty-state p {
    font-size: 16px; /* 增大字型 */
    margin: 0 0 25px 0;
}

.explore-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;
}

.explore-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);
}

/* 浮動操作按鈕 */
.floating-actions {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 100;
}

.fab-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: var(--white);
    color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    position: relative;
}

.fab-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

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

.fab-btn.primary:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
}

/* 工具提示 */
.fab-btn::after {
    content: attr(title);
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.8);
    color: var(--white);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.fab-btn:hover::after {
    opacity: 1;
}

/* 預覽模態框特殊樣式 */
.modal-content {
    max-width: 500px;
}

.preview-detail {
    margin: 10px 0;
    padding: 10px 0;
    border-bottom: 1px solid var(--light-bg);
}

.preview-detail:last-child {
    border-bottom: none;
}

.preview-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.preview-value {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.4;
}

/* 響應式設計 */
@media (min-width: 481px) and (max-width: 768px) {
    .my-meals-main {
        max-width: 600px;
        padding: 25px;
        padding-bottom: 120px;
    }
    
    .filter-tabs {
        max-width: 600px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .my-event-title {
        font-size: 20px;
    }
    
    .card-number {
        font-size: 28px;
    }
    
    .floating-actions {
        bottom: 40px;
        right: 40px;
    }
    
    .fab-btn {
        width: 64px;
        height: 64px;
    }
}

@media (min-width: 769px) {
    .my-meals-main {
        max-width: 800px;
        padding: 30px;
        padding-bottom: 140px;
    }
    
    .filter-tabs {
        max-width: 800px;
        gap: 15px;
    }
    
    .section-title {
        font-size: 26px;
    }
    
    .my-event-title {
        font-size: 22px;
    }
    
    .card-number {
        font-size: 32px;
    }
    
    .overview-cards {
        gap: 20px;
    }
    
    .floating-actions {
        bottom: 50px;
        right: 50px;
    }
    
    .fab-btn {
        width: 68px;
        height: 68px;
    }
    
    .my-events-container {
        gap: 25px;
    }
}

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

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

/* 動畫 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

.my-event-card {
    animation: fadeInUp 0.4s ease-out;
}

/* 觸控友善 */
@media (hover: none) and (pointer: coarse) {
    .my-event-card:hover {
        transform: none;
        border-color: var(--light-bg);
        background: transparent;
    }
    
    .fab-btn:hover {
        transform: none;
        box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    }
    
    .fab-btn::after {
        display: none;
    }
}

/* 高對比度支援 */
@media (prefers-contrast: high) {
    .my-event-status.upcoming {
        background: #2E7D32;
    }
    
    .my-event-status.voting {
        background: #7B1FA2;
    }
    
    .my-event-status.completed {
        background: #455A64;
    }
    
    .my-event-status.cancelled {
        background: #D32F2F;
    }
    
    .my-event-card {
        border-width: 3px;
    }
}
