/* 科技感灰色主題 */
:root {
    --primary-bg: #0f0f0f;
    --secondary-bg: #1a1a1a;
    --card-bg: #2a2a2a;
    --border-color: #3a3a3a;
    --primary-text: #ffffff;
    --secondary-text: #a0a0a0;
    --accent-color: #808080;
    --accent-hover: #999999;
    --gradient-primary: linear-gradient(135deg, #404040, #606060);
    --gradient-card: linear-gradient(145deg, #2a2a2a, #1f1f1f);
    --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.5);
    --shadow-hover: 0 8px 32px rgba(128, 128, 128, 0.2);
    --border-radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--primary-bg);
    color: var(--primary-text);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* 背景動畫 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(128, 128, 128, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(96, 96, 96, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(128, 128, 128, 0.05) 0%, transparent 50%);
    animation: backgroundMove 20s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes backgroundMove {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.1) rotate(5deg);
        opacity: 0.5;
    }
}

/* 浮動粒子背景 */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(128, 128, 128, 0.3), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(128, 128, 128, 0.2), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(128, 128, 128, 0.4), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(128, 128, 128, 0.2), transparent),
        radial-gradient(2px 2px at 160px 30px, rgba(128, 128, 128, 0.3), transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: particlesFloat 25s linear infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes particlesFloat {
    0% {
        transform: translateY(0px);
    }
    100% {
        transform: translateY(-100px);
    }
}

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

@keyframes typewriter {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink {
    0%, 50% {
        border-color: transparent;
    }
    51%, 100% {
        border-color: var(--accent-color);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px var(--accent-color);
    }
    50% {
        box-shadow: 0 0 20px var(--accent-color), 0 0 30px var(--accent-color);
    }
}

/* 頭部區域 */
header {
    background: var(--gradient-primary);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
    position: relative;
    z-index: 2;
}

header h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #ffffff, #e2e8f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.typewriter-text {
    font-size: 1.4rem;
    margin-bottom: 3rem;
    opacity: 0.9;
    font-weight: 400;
    position: relative;
    display: inline-block;
    overflow: hidden;
    border-right: 2px solid var(--accent-color);
    white-space: nowrap;
    animation: typewriter 3s steps(30) 1s forwards, blink 1s infinite 4s;
}

header nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 2rem;
}

header nav a {
    color: white;
    text-decoration: none;
    padding: 12px 32px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 1rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 4s forwards;
}

header nav a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* 右上角登入註冊按鈕 */
.header-auth {
    position: absolute;
    top: 30px;
    right: 30px;
    display: flex;
    gap: 15px;
    z-index: 10;
}

.header-auth-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 10px 24px;
    text-decoration: none;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.header-auth-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* 主要內容區域 */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px;
    position: relative;
    z-index: 1;
}

.section {
    margin: 80px 0;
    animation: fadeInUp 0.6s ease-out;
}

.section h2 {
    color: var(--primary-text);
    font-size: 2.5rem;
    margin-bottom: 3rem;
    font-weight: 700;
    text-align: center;
    letter-spacing: -0.02em;
    position: relative;
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

/* 特色卡片網格 */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.feature-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 32px 24px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease-out forwards;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }
.feature-card:nth-child(4) { animation-delay: 0.4s; }
.feature-card:nth-child(5) { animation-delay: 0.5s; }
.feature-card:nth-child(6) { animation-delay: 0.6s; }
.feature-card:nth-child(7) { animation-delay: 0.7s; }
.feature-card:nth-child(8) { animation-delay: 0.8s; }
.feature-card:nth-child(9) { animation-delay: 0.9s; }

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent-color);
}

.feature-card:hover::before {
    opacity: 1;
}

.card-icon {
    display: none;
}

.feature-card h3 {
    color: var(--primary-text);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--secondary-text);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* 下載區域 */
.download-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 48px;
    margin-top: 40px;
}

.download-category {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 40px 32px;
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease-out 0.5s forwards;
}

.download-category:nth-child(2) {
    animation-delay: 0.7s;
}

.download-category h3 {
    color: var(--accent-color);
    font-size: 1.75rem;
    margin-bottom: 12px;
    font-weight: 600;
}

.category-description {
    color: var(--secondary-text);
    font-size: 1rem;
    margin-bottom: 32px;
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.download-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px 16px;
    text-decoration: none;
    color: var(--primary-text);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.download-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(128, 128, 128, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.5s ease;
    opacity: 0;
}

.download-card:hover::before {
    animation: shine 0.8s ease-in-out;
}

@keyframes shine {
    0% {
        opacity: 0;
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.download-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent-color);
}

.platform-icon {
    display: none;
}

.platform-name {
    font-size: 1.2rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
    color: var(--primary-text);
}

/* 頁尾 */
footer {
    background: var(--secondary-bg);
    border-top: 1px solid var(--border-color);
    margin-top: 80px;
    position: relative;
    z-index: 1;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 20px;
    text-align: center;
}

footer p {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--primary-text);
}

.footer-note {
    font-size: 0.9rem !important;
    color: var(--secondary-text);
    opacity: 0.8;
}

/* 響應式設計 */
@media (max-width: 768px) {
    header {
        padding: 60px 0;
    }
    
    header h1 {
        font-size: 2.5rem;
    }
    
    .typewriter-text {
        font-size: 1.1rem;
    }
    
    header nav {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    
    .header-auth {
        position: static;
        justify-content: center;
        margin-top: 30px;
        gap: 12px;
    }
    
    main {
        padding: 60px 16px;
    }
    
    .section {
        margin: 60px 0;
    }
    
    .section h2 {
        font-size: 2rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .download-section {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .download-category {
        padding: 32px 24px;
    }
    
    .download-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

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

::-webkit-scrollbar-track {
    background: var(--primary-bg);
}

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

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover);
}

/* 選取文字效果 */
::selection {
    background: var(--accent-color);
    color: white;
}