/* 載入動畫 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 215, 0, 0.3);
    border-radius: 50%;
    border-top-color: var(--accent);
    animation: spin 1s linear infinite;
}

.content {
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* 自定義動畫 */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes shine {
    0% { background-position: 200% center; }
    100% { background-position: -200% center; }
}

/* 全局樣式 */
:root {
    --primary: #1a1a1a;
    --accent: #FFD700;
    --purple: #800080;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: var(--primary);
    color: white;
}

/* 導航欄動畫 */
.nav-scroll {
    background: transparent;
    backdrop-filter: blur(0);
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.nav-scroll.scrolled {
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 215, 0, 0.1);
}

/* 按鈕動畫 */
.btn-primary,
.btn-secondary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-primary:hover,
.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.btn-primary::after,
.btn-secondary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-primary:active::after,
.btn-secondary:active::after {
    width: 200px;
    height: 200px;
    opacity: 0;
}

/* 遊戲卡片動畫 */
.game-card {
    transition: all 0.3s ease;
}

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

/* 響應式設計 */
@media (max-width: 768px) {
    .mobile-menu {
        display: block;
    }

    .desktop-menu {
        display: none;
    }
}

/* 漸變文字效果 */
.gradient-text {
    background: linear-gradient(90deg, var(--accent), var(--purple));
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 3s linear infinite;
}

/* 浮動動畫 */
.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* 滾動顯示動畫 */
.scroll-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 加載動畫 */
.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 215, 0, 0.3);
    border-radius: 50%;
    border-top-color: var(--accent);
    animation: spin 1s linear infinite;
}

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

.content {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.content.loaded {
    opacity: 1;
}

/* 手機選單圖標動畫 */
.menu-icon span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: white;
    margin: 4px 0;
    transition: all 0.3s ease;
}

.menu-open .menu-icon span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-open .menu-icon span:nth-child(2) {
    opacity: 0;
}

.menu-open .menu-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* 龍元素動畫 */
.dragon-animation {
    animation: float 6s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.3));
}