/* Import Google Font */
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@300;400;500;700;900&display=swap");

/* Import component styles */
@import "global/variables.css";
@import "global/base.css";
@import "global/animations.css";

:root {
    --primary: #ff7eb6;
    --primary-dark: #ff5c9e;
    --secondary: #ffe6f2;
    --accent: #ffc0d9;
    --text-dark: #4a4a4a;
    --text-light: #ffffff;
    --bg-light: #fff9fb;
}

body {
    font-family: 'Noto Sans TC', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
}

.navbar {
    background-color: white;
    box-shadow: 0 2px 10px rgba(255, 126, 182, 0.15);
}

.navbar-brand {
    font-weight: 700;
    color: var(--primary-dark);
}

.nav-link {
    color: var(--text-dark);
    font-weight: 500;
}

.nav-link:hover {
    color: var(--primary);
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    color: white;
}

.hero {
    background: linear-gradient(135deg, var(--secondary), white);
    padding: 80px 0;
    border-radius: 0 0 50px 50px;
    margin-bottom: 50px;
}

.hero h1 {
    font-weight: 800;
    color: var(--primary-dark);
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
}

.feature-card {
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(255, 126, 182, 0.1);
    transition: all 0.3s ease;
    background-color: white;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(255, 126, 182, 0.2);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.themes-section {
    background-color: var(--secondary);
    padding: 70px 0;
    border-radius: 50px;
    margin: 50px 0;
}

.theme-card {
    background-color: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

.theme-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(255, 126, 182, 0.15);
}

.theme-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.theme-body {
    padding: 20px;
}

.theme-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-dark);
}

.badge-theme {
    background-color: var(--accent);
    color: var(--primary-dark);
}

footer {
    background-color: white;
    padding: 50px 0 20px;
    margin-top: 80px;
}

.floating-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    height: 60px;
    width: 60px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 126, 182, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    z-index: 1000;
    transition: all 0.3s ease;
}

.floating-btn:hover {
    transform: scale(1.1);
    background-color: var(--primary-dark);
}

.arrow-down {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-15px);
    }
    60% {
        transform: translateY(-7px);
    }
}

/* 計劃步驟進度條 */
.plan-progress {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 60px;
}

.plan-progress::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 4px;
    background-color: var(--secondary);
    top: 15px;
    left: 0;
    z-index: 1;
}

.plan-step {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100px;
}

.step-number {
    display: inline-block;
    width: 35px;
    height: 35px;
    line-height: 35px;
    border-radius: 50%;
    background-color: var(--secondary);
    color: var(--primary-dark);
    font-weight: bold;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.step-active .step-number {
    background-color: var(--primary);
    color: white;
    transform: scale(1.2);
}

.step-title {
    font-size: 0.9rem;
    color: var(--text-dark);
    font-weight: 500;
}

.step-active .step-title {
    color: var(--primary-dark);
    font-weight: 700;
}

/* 主題卡片 */
.theme-selection-card {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    height: 100%;
}

.theme-selection-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(255, 126, 182, 0.15);
}

.theme-selection-card.selected {
    border: 3px solid var(--primary);
    transform: scale(1.03);
}

/* 行程結果頁面 */
.plan-result-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 40px 0;
    border-radius: 0 0 30px 30px;
}

.timeline {
    position: relative;
    margin: 40px 0;
}

.timeline-item {
    position: relative;
    padding-left: 40px;
    margin-bottom: 30px;
}

.timeline-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: var(--primary);
    border-radius: 50%;
    left: 0;
    top: 5px;
}

.timeline-item:not(:last-child):before {
    content: '';
    position: absolute;
    left: 10px;
    top: 25px;
    height: calc(100% + 5px);
    width: 2px;
    background-color: var(--secondary);
}

.timeline-time {
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 10px;
}

.timeline-content {
    padding: 15px;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

/* Loading Overlay */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--secondary);
    border-top: 5px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* AI Script Styles */
.ai-script-output {
    border-left: 4px solid var(--primary);
    background-color: var(--bg-light);
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    position: relative;
}

.script-style-badge {
    position: absolute;
    top: 15px;
    right: 15px;
}

.script-content {
    line-height: 1.8;
    white-space: pre-line;
}

/* Responsiveness */
@media (max-width: 768px) {
    .hero {
        padding: 40px 0;
        border-radius: 0 0 25px 25px;
    }

    .themes-section {
        padding: 40px 0;
        border-radius: 25px;
    }

    .plan-progress {
        flex-wrap: wrap;
    }

    .plan-step {
        width: 33%;
        margin-bottom: 20px;
    }
}
