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

:root {
    --primary-blue: #4A90E2;
    --light-blue: #E3F2FD;
    --dark-blue: #1976D2;
    --white: #FFFFFF;
    --light-gray: #F5F7FA;
    --text-dark: #2C3E50;
    --text-light: #7F8C8D;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 8px 16px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Noto Sans TC', sans-serif;
    background: linear-gradient(135deg, #ffffff 0%, #E3F2FD 50%, #ffffff 100%);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================== 背景裝飾層 ==================== */
.background-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(74, 144, 226, 0.3) 0%, transparent 70%);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(25, 118, 210, 0.25) 0%, transparent 70%);
    top: 50%;
    right: -100px;
    animation-delay: -7s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(227, 242, 253, 0.5) 0%, transparent 70%);
    bottom: -50px;
    left: 50%;
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.1); }
    66% { transform: translate(-30px, 30px) scale(0.9); }
}

.grid-lines {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(74, 144, 226, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(74, 144, 226, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 30s linear infinite;
}

@keyframes gridMove {
    0% { background-position: 0 0; }
    100% { background-position: 50px 50px; }
}

/* ==================== 導航欄 ==================== */
.navbar {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 2rem;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-main {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
}

.logo-sub {
    font-size: 0.75rem;
    color: var(--text-light);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-blue);
}

.wallet-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(74, 144, 226, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.wallet-summary:hover {
    background: rgba(74, 144, 226, 0.2);
    transform: translateY(-2px);
}

.wallet-icon {
    font-size: 1.2rem;
}

.wallet-amount {
    font-weight: 600;
    color: var(--primary-blue);
}

/* ==================== Hero 區塊 ==================== */
.hero {
    padding: 80px 0;
    position: relative;
    z-index: 1;
}

.hero-content {
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: 900;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto 3rem;
    line-height: 1.8;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 3rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
}

.hero-cta {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* ==================== 按鈕樣式 ==================== */
.btn {
    padding: 12px 32px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

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

.btn-primary:hover {
    background: var(--dark-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background: rgba(74, 144, 226, 0.1);
    color: var(--primary-blue);
}

.btn-secondary:hover {
    background: rgba(74, 144, 226, 0.2);
}

/* ==================== 品牌牆區塊 ==================== */
.brands-section {
    padding: 80px 0;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 3rem;
}

.brands-marquee {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.marquee-row {
    display: flex;
    gap: 2rem;
    animation: marqueeScroll 40s linear infinite;
}

.marquee-row-2 {
    animation-direction: reverse;
    animation-duration: 45s;
}

@keyframes marqueeScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.brand-card {
    flex-shrink: 0;
    width: 200px;
    height: 120px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.brand-card:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: var(--shadow-hover);
    border: 2px solid var(--primary-blue);
}

.brand-card img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(20%);
    transition: filter 0.3s;
}

.brand-card:hover img {
    filter: grayscale(0%);
}

/* ==================== 任務列表區塊 ==================== */
.tasks-section {
    padding: 80px 0;
    position: relative;
    z-index: 1;
}

.task-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.filter-btn {
    padding: 10px 24px;
    border: 2px solid rgba(74, 144, 226, 0.3);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    color: var(--text-dark);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn:hover {
    border-color: var(--primary-blue);
    background: rgba(74, 144, 226, 0.1);
}

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

.tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.task-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    position: relative;
}

.task-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.task-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary-blue);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 10;
}

.task-thumbnail {
    width: 100%;
    height: 160px;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.1), rgba(227, 242, 253, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.play-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-blue);
    transition: all 0.3s;
}

.task-card:hover .play-icon {
    transform: scale(1.1);
    background: white;
}

.task-info {
    padding: 1.5rem;
}

.task-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.task-reward {
    color: var(--primary-blue);
    font-weight: 600;
    margin-bottom: 1rem;
}

.btn-watch {
    width: 100%;
    background: var(--primary-blue);
    color: white;
}

.btn-watch:hover {
    background: var(--dark-blue);
}

/* ==================== 運作方式區塊 ==================== */
.how-section {
    padding: 80px 0;
    position: relative;
    z-index: 1;
}

.how-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.step-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.step-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--primary-blue);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

.step-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.step-desc {
    color: var(--text-light);
}

.pricing-table {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.pricing-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-dark);
}

.pricing-table table {
    width: 100%;
    border-collapse: collapse;
}

.pricing-table th,
.pricing-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(74, 144, 226, 0.1);
}

.pricing-table th {
    background: rgba(74, 144, 226, 0.1);
    font-weight: 600;
    color: var(--text-dark);
}

.pricing-table td {
    color: var(--text-dark);
}

/* ==================== 關於我們區塊 ==================== */
.about-section {
    padding: 80px 0;
    position: relative;
    z-index: 1;
}

.about-content {
    max-width: 800px;
    margin: 0 auto 3rem;
    text-align: center;
}

.about-content p {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: rgba(74, 144, 226, 0.1);
    color: var(--primary-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 1rem;
}

.feature-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.feature-desc {
    color: var(--text-light);
}

/* ==================== Footer ==================== */
.footer {
    background: rgba(44, 62, 80, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: white;
    padding: 3rem 0 2rem;
    position: relative;
    z-index: 1;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-brand .logo-main,
.footer-brand .logo-sub {
    color: white;
}

.footer-brand p {
    margin-top: 1rem;
    opacity: 0.8;
}

.footer-links h4,
.footer-contact h4 {
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-links a {
    display: block;
    color: white;
    text-decoration: none;
    margin-bottom: 0.5rem;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    opacity: 1;
}

.footer-contact p {
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

/* ==================== Modal 樣式 ==================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 2rem;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: rotate(90deg);
}

/* ==================== 影片播放器 ==================== */
.video-container {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 12px;
    overflow: visible;
    margin-bottom: 1rem;
}

#youtubePlayerWrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}

#youtubePlayer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#youtubePlayer iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

#taskVideo {
    width: 100%;
    display: block;
}

.video-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.8);
}

.control-btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: var(--primary-blue);
    border-radius: 3px;
    width: 0;
    transition: width 0.1s;
}

.time-display {
    color: white;
    font-size: 0.9rem;
    min-width: 100px;
    text-align: right;
}

.task-complete-section {
    text-align: center;
}

.btn-complete {
    background: var(--primary-blue);
    color: white;
    width: 100%;
    padding: 14px;
    font-size: 1.1rem;
}

.btn-complete:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-complete:not(:disabled):hover {
    background: var(--dark-blue);
}

.watch-progress {
    margin-top: 1rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ==================== 錢包 Modal ==================== */
.wallet-modal {
    max-width: 600px;
}

.wallet-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-dark);
}

.wallet-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid rgba(74, 144, 226, 0.2);
}

.wallet-tab {
    padding: 10px 20px;
    background: none;
    border: none;
    font-weight: 500;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.3s;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.wallet-tab.active {
    color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
}

.wallet-tab-content {
    display: none;
}

.wallet-tab-content.active {
    display: block;
}

.wallet-stats-grid {
    display: grid;
    gap: 1rem;
}

.wallet-stat-card {
    background: rgba(74, 144, 226, 0.1);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-blue);
}

.history-list {
    max-height: 400px;
    overflow-y: auto;
}

.history-item {
    padding: 1rem;
    border-bottom: 1px solid rgba(74, 144, 226, 0.1);
    display: flex;
    justify-content: space-between;
}

.history-date {
    color: var(--text-light);
    font-size: 0.9rem;
}

.history-amount {
    font-weight: 600;
    color: var(--primary-blue);
}

.withdraw-form {
    text-align: center;
}

.withdraw-form p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

.withdraw-input {
    width: 100%;
    padding: 12px;
    border: 2px solid rgba(74, 144, 226, 0.3);
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 1rem;
}

/* ==================== 通知樣式 ==================== */
.notification {
    position: fixed;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 1.5rem 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 3000;
    transition: top 0.5s;
}

.notification.show {
    top: 100px;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.notification-icon {
    font-size: 2rem;
}

.notification-text h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.notification-text p {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue);
}

/* ==================== 響應式設計 ==================== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }

    .hero-cta {
        flex-direction: column;
    }

    .tasks-grid {
        grid-template-columns: 1fr;
    }

    .how-steps {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        padding: 1.5rem;
    }

    .brand-card {
        width: 180px;
        height: 100px;
    }
}
