/* 自定義CSS樣式 */

/* 全域樣式 */
:root {
    --primary-color: #0088cc;
    --secondary-color: #40b3df;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    padding-top: 50px; /* 為固定導航列留空間 */
}

/* 導航列樣式 */
.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
}

.navbar-brand i {
    font-size: 1.8rem;
}

/* Telegram Logo */
.telegram-logo-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.telegram-logo-svg {
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    animation: fadeInUp 1s ease-out;
}

.hero-section .lead {
    font-size: 1.3rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.cta-section {
    animation: fadeInUp 1s ease-out 0.4s both;
}

/* 按鈕樣式 */
#joinBtn {
    border-radius: 50px;
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.3);
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

#joinBtn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(255, 193, 7, 0.4);
}

#joinBtn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    transition: all 0.3s ease;
    transform: translate(-50%, -50%);
}

#joinBtn:hover::before {
    width: 300px;
    height: 300px;
}

/* 應用程式下載區域 */
.app-download-section {
    margin-top: 3rem;
}

.app-download-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.3s ease;
}

.app-download-link:hover {
    text-decoration: none;
    color: inherit;
    transform: translateY(-5px);
}

.app-download-card {
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.app-download-card:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.4);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.app-download-card i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.app-info strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.app-info span {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 最新消息區域 */
.news-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.news-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover {
    transform: translateY(-10px);
}

.news-card .card {
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.news-card:hover .card {
    box-shadow: 0 15px 35px rgba(0,0,0,0.15) !important;
}

.news-card .card-img-top {
    transition: transform 0.3s ease;
}

.news-card:hover .card-img-top {
    transform: scale(1.05);
}

/* Telegram 貼圖樣式 */
.telegram-sticker {
    display: inline-block;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.telegram-sticker img {
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.feature-card:hover .telegram-sticker {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 12px 35px rgba(0,0,0,0.2);
}

.feature-card:hover .telegram-sticker img {
    transform: scale(1.05);
}

/* 功能卡片樣式 */
.features-section {
    background-color: #f8f9fa;
}

.feature-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-card .card {
    border-radius: 15px;
    transition: all 0.3s ease;
}

.feature-card:hover .card {
    box-shadow: 0 15px 35px rgba(0,0,0,0.1) !important;
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon i {
    font-size: 2rem;
    color: white;
}

.card-title {
    color: #333;
    font-size: 1.2rem;
}

.card-text {
    color: #666;
    font-size: 0.95rem;
}

/* 頁腳樣式 */
footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

.visitor-counter {
    font-size: 1.1rem;
    padding: 10px 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 25px;
    display: inline-block;
    margin-top: 10px;
}

#visitCount {
    font-size: 1.3rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

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

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.feature-card:hover .feature-icon {
    animation: pulse 0.6s ease-in-out;
}

/* 種類區域樣式 */
.categories-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.category-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover {
    transform: translateY(-10px);
}

.category-card .card {
    border-radius: 15px;
    transition: all 0.3s ease;
}

.category-card:hover .card {
    box-shadow: 0 15px 35px rgba(0,0,0,0.15) !important;
}

.category-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.category-icon i {
    font-size: 2rem;
    color: white;
}

/* 群組卡片樣式 */
.group-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.group-card:hover {
    transform: translateY(-5px);
}

.group-card .card {
    border-radius: 15px;
    transition: all 0.3s ease;
}

.group-card:hover .card {
    box-shadow: 0 15px 35px rgba(0,0,0,0.15) !important;
}

.group-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

/* 使用教學樣式 */
.tutorial-step {
    position: relative;
    padding: 2rem 1rem;
}

.step-number {
    position: relative;
    z-index: 2;
}

.step-number .badge {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

/* 統計數據樣式 */
.stats-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.1;
}

.stat-item {
    position: relative;
    z-index: 2;
}

.stat-number {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* FAQ 樣式 */
.accordion-button {
    font-weight: 600;
    font-size: 1.1rem;
}

.accordion-button:not(.collapsed) {
    background-color: rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.2);
}

.accordion-item {
    border-radius: 10px !important;
    margin-bottom: 1rem;
    overflow: hidden;
}

/* 評價卡片樣式 */
.testimonial-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
}

.testimonial-card .card {
    border-radius: 15px;
    transition: all 0.3s ease;
}

.testimonial-card:hover .card {
    box-shadow: 0 15px 35px rgba(0,0,0,0.15) !important;
}

.stars i {
    margin-right: 0.2rem;
}

/* 聯絡樣式 */
.contact-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.contact-item {
    padding: 2rem 1rem;
    transition: transform 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-5px);
}

.contact-icon {
    opacity: 0.9;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-section .lead {
        font-size: 1.1rem;
    }
    
    #joinBtn {
        padding: 15px 30px !important;
        font-size: 1rem;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
    }
    
    .feature-icon i {
        font-size: 1.5rem;
    }
    
    .telegram-sticker {
        width: 60px;
        height: 60px;
    }
    
    .telegram-sticker img {
        width: 50px !important;
        height: 50px !important;
    }
    
    .telegram-logo-svg {
        width: 300px;
        height: 75px;
    }
    
    .app-download-card {
        padding: 1rem;
    }
    
    .app-download-card i {
        font-size: 2rem;
    }
    
    .category-icon {
        width: 60px;
        height: 60px;
    }
    
    .category-icon i {
        font-size: 1.5rem;
    }
    
    .group-avatar {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    body {
        padding-top: 50px;
    }
    
    .hero-section {
        padding: 3rem 0 !important;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .feature-card {
        margin-bottom: 1rem;
    }
}

/* 載入動畫 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 脈動動畫 */
.pulse-animation {
    animation: pulseGlow 1s ease-in-out infinite;
}

@keyframes pulseGlow {
    0% { 
        transform: scale(1);
        box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    }
    50% { 
        transform: scale(1.1);
        box-shadow: 0 12px 35px rgba(102, 126, 234, 0.3);
    }
    100% { 
        transform: scale(1);
        box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    }
}

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

.slide-in-up {
    animation: slideInUp 0.6s ease-out;
}

/* 滾動條美化 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}