﻿/* ========================================
   114年高教深耕計畫 - AI創新風格CSS
   ======================================== */

:root {
    /* 主色調 - 現代科技感 */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --success-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --warning-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    /* 基礎色彩 */
    --primary-color: #667eea;
    --secondary-color: #f093fb;
    --accent-color: #4facfe;
    --success-color: #43e97b;
    --warning-color: #fa709a;
    /* 文字色彩 */
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --text-light: #718096;
    --text-white: #ffffff;
    /* 背景色 */
    --bg-primary: #ffffff;
    --bg-secondary: #f7fafc;
    --bg-dark: #1a202c;
    --bg-glass: rgba(255, 255, 255, 0.8);
    /* 陰影效果 */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.15), 0 3px 6px rgba(0, 0, 0, 0.10);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);
    /* 動畫時間 */
    --transition-fast: 0.2s;
    --transition-base: 0.3s;
    --transition-slow: 0.5s;
}

/* ========================================
   全域樣式
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft JhengHei', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ========================================
   動畫效果
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* ========================================
   導航列樣式
   ======================================== */
.navbar-custom {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

    .navbar-custom.scrolled {
        background: rgba(255, 255, 255, 0.95);
        box-shadow: var(--shadow-md);
    }

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: transform var(--transition-base);
}

    .navbar-brand:hover {
        transform: scale(1.05);
    }

.nav-link {
    color: var(--text-primary) !important;
    font-weight: 500;
    margin: 0 0.5rem;
    position: relative;
    transition: all var(--transition-base);
}

    .nav-link::after {
        content: '';
        position: absolute;
        bottom: -5px;
        left: 50%;
        width: 0;
        height: 3px;
        background: var(--primary-gradient);
        transform: translateX(-50%);
        transition: width var(--transition-base);
    }

    .nav-link:hover::after,
    .nav-link.active::after {
        width: 100%;
    }

/* ========================================
   主軸卡片樣式
   ======================================== */
.spindle-card {
    background: var(--bg-primary);
    border-radius: 20px;
    padding: 2rem;
    margin: 1rem;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: block;
}

    .spindle-card::before {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: var(--primary-gradient);
        opacity: 0;
        transform: rotate(45deg);
        transition: opacity var(--transition-slow);
    }

    .spindle-card:hover {
        transform: translateY(-10px);
        box-shadow: var(--shadow-xl);
    }

        .spindle-card:hover::before {
            opacity: 0.1;
        }

.spindle-number {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: var(--text-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    animation: pulse 2s infinite;
}

.spindle-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.spindle-description {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ========================================
   英雄區域樣式
   ======================================== */
.hero-section {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(102, 126, 234, 0.1) 100%);
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

    .hero-section::before {
        content: '';
        position: absolute;
        top: -50%;
        right: -50%;
        width: 100%;
        height: 100%;
        background: radial-gradient(circle, rgba(102, 126, 234, 0.3) 0%, transparent 70%);
        animation: float 6s ease-in-out infinite;
    }

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease-out;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease-out;
}

/* ========================================
   按鈕樣式
   ======================================== */
.btn-gradient {
    background: var(--primary-gradient);
    color: var(--text-white);
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: inline-block;
}

    .btn-gradient::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
        transition: left var(--transition-slow);
    }

    .btn-gradient:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
    }

        .btn-gradient:hover::before {
            left: 100%;
        }

/* ========================================
   玻璃態樣式
   ======================================== */
.glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
}

    .glass-card:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow-xl);
    }

/* ========================================
   統計數據樣式
   ======================================== */
.stat-card {
    background: var(--bg-primary);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

    .stat-card::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 4px;
        background: var(--primary-gradient);
        transform: scaleX(0);
        transform-origin: left;
        transition: transform var(--transition-base);
    }

    .stat-card:hover {
        transform: translateY(-10px);
    }

        .stat-card:hover::after {
            transform: scaleX(1);
        }

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
}

/* ========================================
   節標題樣式
   ======================================== */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    position: relative;
    color: var(--text-primary);
}

    .section-title::after {
        content: '';
        position: absolute;
        bottom: -10px;
        left: 50%;
        transform: translateX(-50%);
        width: 80px;
        height: 4px;
        background: var(--primary-gradient);
        border-radius: 2px;
    }

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto 3rem;
}

/* ========================================
   特色圖標樣式
   ======================================== */
.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-gradient);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--text-white);
    margin: 0 auto 1.5rem;
    transition: all var(--transition-base);
}

.feature-card:hover .feature-icon {
    transform: rotate(360deg) scale(1.1);
}

/* ========================================
   響應式設計
   ======================================== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .spindle-card {
        margin: 0.5rem;
        padding: 1.5rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.75rem;
    }
}

/* ========================================
   載入動畫
   ======================================== */
.fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.fade-in-scale {
    opacity: 0;
    animation: fadeInScale 0.8s ease-out forwards;
}

.stagger-animation > * {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

    .stagger-animation > *:nth-child(1) {
        animation-delay: 0.1s;
    }

    .stagger-animation > *:nth-child(2) {
        animation-delay: 0.2s;
    }

    .stagger-animation > *:nth-child(3) {
        animation-delay: 0.3s;
    }

    .stagger-animation > *:nth-child(4) {
        animation-delay: 0.4s;
    }

    .stagger-animation > *:nth-child(5) {
        animation-delay: 0.5s;
    }

    .stagger-animation > *:nth-child(6) {
        animation-delay: 0.6s;
    }

/* ========================================
   專章特殊樣式
   ======================================== */
.chapter-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 200% 200%;
    animation: gradient-shift 8s ease infinite;
    color: var(--text-white);
    padding: 4rem 0;
    border-radius: 20px;
    margin: 2rem 0;
}

/* ========================================
   頁尾樣式
   ======================================== */
.footer-custom {
    background: var(--bg-dark);
    color: var(--text-white);
    padding: 3rem 0 2rem;
    margin-top: 5rem;
    position: relative;
}

    .footer-custom::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 4px;
        background: var(--primary-gradient);
    }

.footer-links {
    list-style: none;
    padding: 0;
}

    .footer-links li {
        margin-bottom: 0.5rem;
    }

    .footer-links a {
        color: rgba(255, 255, 255, 0.8);
        text-decoration: none;
        transition: all var(--transition-base);
    }

        .footer-links a:hover {
            color: var(--text-white);
            padding-left: 10px;
        }
