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

body {
    font-family: 'Noto Sans TC', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

.nav-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
}

/* 裝飾元素 */
.decoration-top,
.decoration-bottom {
    position: fixed;
    width: 100%;
    height: 100px;
    pointer-events: none;
    z-index: 1;
}

.decoration-top {
    top: 0;
    left: 0;
}

.decoration-bottom {
    bottom: 0;
    left: 0;
}

.floating-emoji {
    position: absolute;
    font-size: 2rem;
    opacity: 0.7;
    animation: float 4s ease-in-out infinite;
}

.decoration-top .floating-emoji:nth-child(1) { left: 10%; top: 20px; }
.decoration-top .floating-emoji:nth-child(2) { left: 30%; top: 50px; }
.decoration-top .floating-emoji:nth-child(3) { left: 50%; top: 30px; }
.decoration-top .floating-emoji:nth-child(4) { left: 70%; top: 60px; }
.decoration-top .floating-emoji:nth-child(5) { left: 90%; top: 40px; }

.decoration-bottom .floating-emoji:nth-child(1) { left: 15%; bottom: 30px; }
.decoration-bottom .floating-emoji:nth-child(2) { left: 35%; bottom: 60px; }
.decoration-bottom .floating-emoji:nth-child(3) { left: 55%; bottom: 20px; }
.decoration-bottom .floating-emoji:nth-child(4) { left: 75%; bottom: 50px; }
.decoration-bottom .floating-emoji:nth-child(5) { left: 95%; bottom: 35px; }

/* 主要內容 */
.main-content {
    max-width: 1200px;
    width: 100%;
    z-index: 10;
    position: relative;
}

/* 歡迎標題 */
.welcome-header {
    text-align: center;
    margin-bottom: 60px;
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

.welcome-header h1 {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.welcome-header p {
    font-size: 1.4rem;
    color: #555;
    font-weight: 500;
}

/* 學習卡片 */
.learning-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}

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

.card-icon {
    font-size: 4rem;
    text-align: center;
    margin-bottom: 20px;
}

.card-title {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    text-align: center;
    margin-bottom: 15px;
}

.card-description {
    font-size: 1.2rem;
    color: #666;
    text-align: center;
    line-height: 1.6;
    margin-bottom: 25px;
}

.card-features {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
}

.feature {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1976d2;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 2px solid #e3f2fd;
}

/* 按鈕樣式 */
.card-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 18px 35px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
}

.card-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.6);
}

.card-button:active {
    transform: translateY(0);
}

.button-icon {
    font-size: 1.5rem;
    animation: bounce 2s ease-in-out infinite;
}

/* 即將推出的卡片 */
.card.coming-soon {
    opacity: 0.7;
}

.card.coming-soon .card-icon {
    opacity: 0.6;
}

.card-button.disabled {
    background: linear-gradient(135deg, #bbb 0%, #999 100%);
    cursor: not-allowed;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.card-button.disabled:hover {
    transform: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* 底部信息 */
.footer {
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.footer p {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 8px;
    font-weight: 500;
}

.footer p:last-child {
    margin-bottom: 0;
}

/* 點擊特效 */
.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    animation: ripple 0.6s ease-out;
    pointer-events: none;
}

/* 動畫效果 */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    33% {
        transform: translateY(-20px) rotate(5deg);
    }
    66% {
        transform: translateY(-10px) rotate(-3deg);
    }
}

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

@keyframes ripple {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }
    100% {
        width: 300px;
        height: 300px;
        opacity: 0;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeInUp 0.6s ease-out;
}

.card:nth-child(2) {
    animation-delay: 0.2s;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .nav-container {
        padding: 15px;
        min-height: 100vh;
        justify-content: center;
    }

    .welcome-header {
        padding: 25px 20px;
        margin-bottom: 30px;
    }

    .welcome-header h1 {
        font-size: 2.2rem;
    }

    .welcome-header p {
        font-size: 1.2rem;
    }

    .learning-cards {
        grid-template-columns: 1fr;
        gap: 25px;
        margin-bottom: 30px;
    }

    .card {
        padding: 25px 20px;
    }

    .card-title {
        font-size: 1.8rem;
    }

    .card-description {
        font-size: 1.1rem;
        margin-bottom: 20px;
    }

    .card-features {
        margin-bottom: 25px;
        gap: 12px;
    }

    .feature {
        font-size: 0.85rem;
        padding: 6px 12px;
    }

    .card-button {
        padding: 15px 25px;
        font-size: 1.2rem;
    }

    .footer {
        padding: 25px;
    }

    .footer p {
        font-size: 1rem;
    }

    .floating-emoji {
        font-size: 1.5rem;
    }
}

/* iPhone 專用優化 (320px - 414px) */
@media (max-width: 414px) {
    body {
        overflow-y: auto;
    }
    
    .nav-container {
        padding: 10px;
        min-height: 100vh;
        justify-content: flex-start;
        padding-top: 20px;
    }

    .welcome-header {
        padding: 20px 15px;
        margin-bottom: 25px;
    }

    .welcome-header h1 {
        font-size: 1.8rem;
        margin-bottom: 10px;
    }

    .welcome-header p {
        font-size: 1rem;
    }

    .learning-cards {
        gap: 20px;
        margin-bottom: 25px;
    }

    .card {
        padding: 20px 15px;
    }

    .card-icon {
        font-size: 3rem;
        margin-bottom: 15px;
    }

    .card-title {
        font-size: 1.5rem;
        margin-bottom: 12px;
    }

    .card-description {
        font-size: 1rem;
        margin-bottom: 18px;
    }

    .card-features {
        margin-bottom: 20px;
        gap: 8px;
    }

    .feature {
        font-size: 0.8rem;
        padding: 5px 10px;
    }

    .card-button {
        padding: 14px 20px;
        font-size: 1.1rem;
    }

    .footer {
        padding: 20px 15px;
    }

    .footer p {
        font-size: 0.95rem;
        margin-bottom: 6px;
    }

    .floating-emoji {
        font-size: 1.2rem;
    }

    /* 隱藏部分裝飾元素以節省空間 */
    .decoration-top .floating-emoji:nth-child(n+4),
    .decoration-bottom .floating-emoji:nth-child(n+4) {
        display: none;
    }
}

/* iPad 專用優化 (768px - 1024px) */
@media (min-width: 415px) and (max-width: 1024px) {
    .nav-container {
        padding: 20px;
        min-height: 100vh;
        justify-content: center;
    }

    .main-content {
        max-width: 800px;
    }

    .welcome-header {
        padding: 35px 25px;
        margin-bottom: 40px;
    }

    .welcome-header h1 {
        font-size: 2.5rem;
    }

    .welcome-header p {
        font-size: 1.3rem;
    }

    .learning-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
        margin-bottom: 40px;
    }

    .card {
        padding: 30px 25px;
    }

    .card-icon {
        font-size: 3.5rem;
    }

    .card-title {
        font-size: 1.8rem;
    }

    .card-description {
        font-size: 1.1rem;
    }

    .card-button {
        padding: 16px 30px;
        font-size: 1.2rem;
    }

    .footer {
        padding: 30px 25px;
    }

    .floating-emoji {
        font-size: 1.8rem;
    }
}

/* 特殊效果 */
.welcome-header {
    animation: fadeInUp 0.8s ease-out;
}

.footer {
    animation: fadeInUp 1s ease-out;
    animation-delay: 0.4s;
    animation-fill-mode: both;
}

/* 背景動畫 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}
