/* Sonar 主題風格的現代化 CSS */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

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

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
    background-color: #f8f9fa;
}

/* Hero 區塊 - 主要視覺區 */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color, var(--primary-color, #667eea)) 0%, var(--accent-color, var(--accent-color, #764ba2)) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px; /* 為固定導航欄留空間 */
}

/* 添加紋理效果 */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

/* 浮動裝飾元素 */
.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.floating-elements i {
    position: absolute;
    color: rgba(255, 255, 255, 0.1);
    font-size: 3rem;
    animation: float 6s ease-in-out infinite;
}

.floating-elements i:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-elements i:nth-child(2) {
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.floating-elements i:nth-child(3) {
    bottom: 30%;
    left: 20%;
    animation-delay: 4s;
}

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

/* 現代化導航欄 */
.navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: fixed !important;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 700 !important;
    font-size: 1.8rem !important;
    background: linear-gradient(135deg, var(--primary-color, #667eea), var(--accent-color, #764ba2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none !important;
}

.navbar-brand:hover {
    text-decoration: none !important;
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: #333 !important;
    padding: 0.75rem 1rem !important;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    color: var(--primary-color, #667eea) !important;
    transform: translateY(-2px);
}

/* Hero 內容 */
.hero-content {
    text-align: center;
    color: white;
    z-index: 2;
    position: relative;
    max-width: 900px;
    padding: 2rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    font-weight: 300;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

/* 打字機效果容器 */
.typewriter-container {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 2.5rem;
    margin: 2rem 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.typewriter-text {
    font-size: 1.5rem;
    font-weight: 500;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.cursor {
    animation: blink 1s infinite;
    font-weight: bold;
    color: var(--primary-color, #ff6b6b);
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* 現代化按鈕 */
.btn-modern {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary-color, #ff6b6b), var(--accent-color, #ee5a24));
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    margin: 0.5rem;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    min-width: 160px;
}

.btn-modern:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    color: white;
    text-decoration: none;
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary-color, #ff6b6b) 85%, black), color-mix(in srgb, var(--accent-color, #ee5a24) 85%, black));
}

.btn-modern:focus {
    color: white;
    text-decoration: none;
    outline: none;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.btn-modern.btn-outline {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    color: white;
    font-weight: 600;
}

.btn-modern.btn-outline:hover {
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-color, #667eea);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 1);
    transform: translateY(-3px);
}

/* 用戶選單現代化 */
.user-dropdown .dropdown-menu {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    padding: 1rem 0;
    margin-top: 0.5rem;
}

.user-dropdown .dropdown-item {
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 0 0.5rem;
    color: #333;
    font-weight: 500;
}

.user-dropdown .dropdown-item:hover {
    background: linear-gradient(135deg, var(--primary-color, #667eea), var(--accent-color, #764ba2));
    color: white;
    transform: translateX(5px);
}

.user-dropdown .dropdown-item i {
    margin-right: 8px;
    width: 16px;
}

/* Hero 行動按鈕區 */
.hero-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

/* 特色功能區塊 */
.features-section {
    padding: 5rem 0;
    background: linear-gradient(to bottom, rgba(102, 126, 234, 0.05), rgba(248, 249, 250, 1));
}

.feature-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: none;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    margin-bottom: 1.5rem;
}

.feature-icon i {
    background: linear-gradient(135deg, var(--primary-color, #667eea), var(--accent-color, #764ba2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .typewriter-text {
        font-size: 1.2rem;
    }
    
    .hero-content {
        padding: 1rem;
    }
    
    .btn-modern {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
        min-width: 140px;
    }
    
    .typewriter-container {
        padding: 1.5rem;
        margin: 1.5rem 0;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .floating-elements {
        display: none; /* 在手機上隱藏裝飾元素 */
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .typewriter-text {
        font-size: 1.1rem;
    }
    
    .navbar-brand {
        font-size: 1.5rem !important;
    }
}

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

.hero-content > * {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
}

.hero-content > *:nth-child(1) { animation-delay: 0.2s; }
.hero-content > *:nth-child(2) { animation-delay: 0.4s; }
.hero-content > *:nth-child(3) { animation-delay: 0.6s; }
.hero-content > *:nth-child(4) { animation-delay: 0.8s; }

/* 卡片懸停效果 */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

/* 自定義滾動條 */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color, #667eea), var(--accent-color, #764ba2));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary-color, #667eea) 85%, black), color-mix(in srgb, var(--accent-color, #764ba2) 85%, black));
}
