/* 
 * Travel Sense AI - 旅聲 AI / Voice Tour
 * 共用樣式文件 / Common Styles
 * 適用於所有頁面的基礎樣式和動畫效果
 */

/* 基礎樣式重置 / Basic Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', 'PingFang TC', 'Microsoft YaHei', sans-serif;
    overflow-x: hidden;
}

/* 背景圖片輪播效果 / Background Image Carousel Effect */
.bg-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
}

.bg-image.active {
    opacity: 1;
}

/* 動畫效果 / Animations */
@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0); }
    50% { transform: translateY(-10px) translateX(5px); }
}

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

@keyframes bounce-gentle {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(-5deg); }
}

@keyframes slide-in-bottom {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes letter-bounce {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-5px) rotate(5deg); }
}

@keyframes dot-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(40);
        opacity: 0;
    }
}

@keyframes pulse-ring {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* 圖標動畫 / Icon Animations */
.plane-icon {
    animation: float 3s ease-in-out infinite;
}

.sun-icon {
    animation: rotate 15s linear infinite;
}

.camera-icon {
    animation: bounce-gentle 2.5s ease-in-out infinite;
}

.logo-dot {
    animation: dot-pulse 2s ease-in-out infinite;
}

/* 點擊波紋效果 / Click Ripple Effect */
.ripple {
    position: fixed;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.4) 0%, transparent 70%);
    pointer-events: none;
    animation: ripple 0.6s ease-out;
    z-index: 9999;
}

/* 按鈕效果 / Button Effects */
.btn {
    transition: all 0.15s ease;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: scale(0.98);
}

/* AI 對話框和淡入效果 / AI Dialogue and Fade-in Effects */
.ai-dialogue,
.fade-in {
    animation: fade-in-up 0.5s ease-out;
}

/* 星級評分 / Star Rating */
.star {
    color: #fbbf24;
}

/* 滑桿樣式 / Range Slider Styles */
input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: linear-gradient(to right, #3b82f6 0%, #3b82f6 40%, #d1d5db 40%, #d1d5db 100%);
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 旅行卡片效果 / Travel Card Effects */
.travel-card {
    perspective: 1000px;
    transition: transform 0.3s ease;
}

.travel-card:hover {
    transform: translateY(-8px);
}

/* 類別卡片效果 / Category Card Effects */
.category-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-card:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.category-card.selected {
    transform: scale(1.05);
    box-shadow: 0 0 0 3px #3b82f6;
}

/* 聆聽脈衝效果 / Listening Pulse Effect */
.listening-pulse {
    position: relative;
}

.listening-pulse::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.4);
    transform: translate(-50%, -50%);
    animation: pulse-ring 1.5s ease-out infinite;
}

/* 響應式設計 / Responsive Design */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
}

/* 可點選項目 / Clickable Items */
.clickable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.clickable:hover {
    opacity: 0.8;
}

/* 載入動畫 / Loading Animation */
.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: rotate 1s linear infinite;
}

/* 隱藏元素 / Hidden Elements */
.hidden {
    display: none !important;
}

/* 漸變背景 / Gradient Backgrounds */
.gradient-purple {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-blue {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.gradient-orange {
    background: linear-gradient(to bottom right, #f97316, #dc2626);
}

.gradient-yellow {
    background: linear-gradient(to bottom right, #fbbf24, #f59e0b);
}

.gradient-indigo {
    background: linear-gradient(to bottom right, #6366f1, #4f46e5);
}

.gradient-green {
    background: linear-gradient(to bottom right, #10b981, #059669);
}
