/* 全域樣式 */
:root {
    --primary-color: #6f42c1;
    --secondary-color: #20c997;
    --accent-color: #fd7e14;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
}

body {
    font-family: 'Microsoft JhengHei', 'PingFang TC', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
}

/* Hero 區塊樣式 */
.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.3;
}

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

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

/* 影片容器樣式 */
.hero-video {
    position: relative;
    z-index: 2;
}

.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 比例 */
    overflow: hidden;
    border-radius: 15px;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 15px;
}

/* 影片懸停效果 */
.video-container:hover {
    transform: scale(1.02);
    transition: transform 0.3s ease;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

/* 導航欄樣式 */
.navbar {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95) !important;
}

.navbar-brand {
    font-size: 1.5rem;
}

/* 卡片樣式 */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 15px;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

/* 痛點圖示樣式 */
.pain-icon {
    transition: transform 0.3s ease;
}

.card:hover .pain-icon {
    transform: scale(1.1);
}

/* 表格樣式 */
.table {
    border-radius: 10px;
    overflow: hidden;
}

.table thead th {
    border: none;
    padding: 1rem;
}

.table tbody td {
    padding: 1rem;
    border: none;
    vertical-align: middle;
}

/* 按鈕樣式 */
.btn {
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: none;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), #8e44ad);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(45deg, #5a2d91, var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(111, 66, 193, 0.4);
}

.btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* 結果項目樣式 */
.result-item {
    padding: 1rem;
    transition: transform 0.3s ease;
}

.result-item:hover {
    transform: scale(1.05);
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .hero-section {
        padding-top: 100px;
        padding-bottom: 50px;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 1.75rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .hero-section {
        text-align: center;
    }
    
    .hero-image,
    .hero-video {
        margin-top: 2rem;
    }
    
    /* 修正 iPhone 影片置中問題 */
    .hero-video {
        margin-top: 3rem !important;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
    }
    
    .video-container {
        margin: 0 auto;
        width: 90%;
        max-width: 400px;
    }
    
    /* 確保按鈕組與影片有足夠間距 */
    .hero-content .d-flex {
        margin-bottom: 2rem;
    }
    
    .d-flex.flex-column.flex-sm-row {
        flex-direction: column !important;
    }
    
    .gap-3 {
        gap: 1rem !important;
    }
}

/* 針對更小的手機螢幕（如 iPhone SE）進行特別調整 */
@media (max-width: 375px) {
    .hero-video {
        margin-top: 2rem !important;
    }
    
    .video-container {
        width: 95%;
        margin: 0 auto;
    }
    
    .hero-content .d-flex {
        margin-bottom: 1.5rem;
    }
}

/* 短片截圖卡片樣式 */
.thumbnail-card {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.thumbnail-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.thumbnail-card img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

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

.thumbnail-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.thumbnail-card:hover .thumbnail-overlay {
    opacity: 1;
}

.thumbnail-overlay i {
    font-size: 1.5rem;
}

/* 長片容器樣式 */
.long-video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 比例 */
    overflow: hidden;
    border-radius: 15px;
}

.long-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 15px;
}

/* 長片懸停效果 */
.long-video-container:hover {
    transform: scale(1.01);
    transition: transform 0.3s ease;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

/* 滾動平滑效果 */
html {
    scroll-behavior: smooth;
}

/* 載入動畫 */
.loading {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.loading.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* 自訂捲軸 */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5a2d91;
}

/* 工具提示樣式 */
.tooltip {
    font-size: 0.875rem;
}

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

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

/* 通知樣式 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #dc3545;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1050;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: #28a745;
}

.notification.warning {
    background: #ffc107;
    color: #212529;
}

/* 按鈕載入狀態 */
.btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn.loading .btn-text {
    display: none;
}

.btn.loading .loading-spinner {
    display: inline-block;
} 