/**
 * 前台明亮淡色系樣式 - "Soft Pastel Booking"
 * Frontend Pastel Style - Light, Bright, Gentle
 *
 * 設計理念: 明亮、柔和、舒適
 * 配色: 粉彩馬卡龍色系
 * 字體: Outfit (標題) + Manrope (內文)
 */



/* ============================================================================
   全域樣式 - 明亮背景
   ============================================================================ */
body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--neutral-700);
    background: var(--gradient-bg);
    background-size: 400% 400%;
    animation: gradient-shift 25s ease infinite;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}



h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--neutral-800);
}

/* ============================================================================
   按鈕系統 - 柔和色彩
   ============================================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-lg);
    border: none;
    border-radius: var(--radius-lg);
    font-family: var(--font-heading);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-base);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

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

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn:active {
    transform: translateY(0);
}

/* 主按鈕 - 粉紫漸變 */
.btn-primary {
    background: linear-gradient(135deg, #e9d5ff, #d8b4fe);
    color: #581c87;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #d8b4fe, #c084fc);
    color: #4c1d95;
}

/* 輔助按鈕 - 粉紅漸變 */
.btn-accent {
    background: linear-gradient(135deg, #fbcfe8, #f9a8d4);
    color: #831843;
}

.btn-accent:hover {
    background: linear-gradient(135deg, #f9a8d4, #f472b6);
    color: #701a39;
}

/* 次要按鈕 - 淡灰 */
.btn-secondary {
    background: #fafafa;
    color: #616161;
    border: 2px solid #eeeeee;
}

.btn-secondary:hover {
    background: #f5f5f5;
    color: #424242;
    border-color: #e0e0e0;
}

/* 成功按鈕 - 薄荷綠 */
.btn-success {
    background: linear-gradient(135deg, #bbf7d0, #86efac);
    color: #166534;
}

.btn-success:hover {
    background: linear-gradient(135deg, #86efac, #4ade80);
    color: #14532d;
}

/* 危險按鈕 - 柔和粉紅紅 */
.btn-danger {
    background: linear-gradient(135deg, #fecdd3, #fda4af);
    color: #881337;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #fda4af, #fb7185);
    color: #71172a;
}

/* 幽靈按鈕 */
.btn-ghost {
    background: transparent;
    color: #a855f7;
    box-shadow: none;
}

.btn-ghost:hover {
    background: #faf5ff;
}

/* 按鈕尺寸 */
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* ============================================================================
   卡片系統 - 柔和玻璃效果
   ============================================================================ */
.card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition-base);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(233, 213, 255, 0.6);
}

.card-header {
    padding: var(--spacing-lg);
    border-bottom: 2px solid #faf5ff;
    background: linear-gradient(to bottom, rgba(250, 245, 255, 0.5), transparent);
}

.card-body {
    padding: var(--spacing-lg);
}

.card-footer {
    padding: var(--spacing-md) var(--spacing-lg);
    border-top: 2px solid #faf5ff;
    background: rgba(250, 245, 255, 0.3);
}

/* ============================================================================
   導航系統 - 明亮乾淨
   ============================================================================ */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 2px solid rgba(233, 213, 255, 0.3);
    box-shadow: var(--shadow-sm);
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    font-weight: 500;
    color: var(--neutral-600);
    text-decoration: none;
    transition: var(--transition-fast);
}

.nav-link:hover {
    background: #faf5ff;
    color: #7e22ce;
}

.nav-link.active {
    background: linear-gradient(135deg, rgba(233, 213, 255, 0.3), rgba(252, 231, 243, 0.2));
    color: #7e22ce;
    font-weight: 600;
}

/* ============================================================================
   表單系統 - 柔和輸入框
   ============================================================================ */
.form-input {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 2px solid #f3e8ff;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.875rem;
    background: rgba(255, 255, 255, 0.9);
    color: var(--neutral-700);
    transition: var(--transition-fast);
}

.form-input:hover {
    border-color: #e9d5ff;
    background: rgba(255, 255, 255, 1);
}

.form-input:focus {
    outline: none;
    border-color: #c084fc;
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 0 0 4px rgba(192, 132, 252, 0.1);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--neutral-700);
}

/* ============================================================================
   徽章系統 - 柔和標籤
   ============================================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
    border: 2px solid #bbf7d0;
}

.badge-danger {
    background: #fecdd3;
    color: #881337;
    border: 2px solid #fda4af;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
    border: 2px solid #fde68a;
}

.badge-info {
    background: #e0f2fe;
    color: #075985;
    border: 2px solid #bae6fd;
}



/* ============================================================================
   載入狀態 - 柔和載入器
   ============================================================================ */
.spinner {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    border: 3px solid #f3e8ff;
    border-top-color: #a855f7;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.skeleton {
    background: linear-gradient(90deg, #fafafa 25%, #f5f5f5 50%, #fafafa 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

/* ============================================================================
   響應式設計
   ============================================================================ */
@media (max-width: 768px) {
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.8rem;
    }

    .card {
        border-radius: var(--radius-md);
    }

    .card-header,
    .card-body {
        padding: var(--spacing-md);
    }
}

/* ============================================================================
   工具類別
   ============================================================================ */
.text-gradient {
    background: linear-gradient(135deg, #a855f7, #ec4899);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.hover-lift {
    transition: var(--transition-base);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}



/* ============================================================================
   認證頁面專用樣式 (Auth Pages)
   ============================================================================ */

/* 認證頁面容器 */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
    overflow: hidden;
    background: var(--gradient-bg);
    background-size: 400% 400%;
    animation: gradient-shift 25s ease infinite;
}

/* 認證卡片 */
.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2rem;
    width: 100%;
    position: relative;
}

.auth-card-sm {
    max-width: 420px;
}

/* 登入用 */
.auth-card-md {
    max-width: 480px;
}

/* 註冊用 */

/* ============================================================================
   增強型表單元件 (Enhanced Form Components)
   ============================================================================ */

/* 增強型表單輸入框 */
.form-input-enhanced,
.form-input.enhanced {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-lg);
    background-color: #ffffff;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
    font-family: var(--font-body);
    font-size: 0.875rem;
}

.form-input-enhanced:hover,
.form-input.enhanced:hover {
    border-color: #d1d5db;
}

.form-input-enhanced:focus,
.form-input.enhanced:focus {
    outline: none;
    border-color: var(--primary-400);
    box-shadow: 0 0 0 3px rgba(192, 132, 252, 0.1), var(--shadow-sm);
}

.form-input-error,
.form-input.border-red-500 {
    border-color: var(--danger-500) !important;
}

/* ============================================================================
   提交按鈕 (Submit Button)
   ============================================================================ */

/* 提交按鈕 - 漸變樣式 */
.btn-submit-gradient {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.75rem 1.5rem;
    min-height: 46px;
    /* 防止 Alpine.js 初始化前高度塌陷 */
    background: linear-gradient(to right, var(--primary-500), var(--accent-500));
    color: white;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.875rem;
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    /* overflow: hidden; Removed to prevent height clipping issues */
}

.btn-submit-gradient:hover:not(:disabled) {
    background: linear-gradient(to right, var(--primary-600), var(--accent-600));
    transform: scale(1.02);
    box-shadow: var(--shadow-xl);
}

.btn-submit-gradient:focus {
    outline: none;
    box-shadow: 0 0 0 2px white, 0 0 0 4px var(--primary-500), var(--shadow-lg);
}

.btn-submit-gradient:active:not(:disabled) {
    transform: scale(0.98);
}

.btn-submit-gradient:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ============================================================================
   連結樣式 (Link Styles)
   ============================================================================ */

.link {
    color: var(--primary-500);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.link:hover {
    color: var(--primary-600);
    text-decoration: underline;
}

/* ============================================================================
   認證按鈕 (Auth Buttons) - 用於導航列
   ============================================================================ */

.auth-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 1rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: none;
    cursor: pointer;
}

.auth-btn-login {
    background: linear-gradient(135deg, var(--primary-200), var(--primary-300));
    color: var(--primary-900);
    border: 2px solid var(--primary-200);
}

.auth-btn-login:hover {
    background: linear-gradient(135deg, var(--primary-300), var(--primary-400));
    color: #4c1d95;
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(168, 85, 247, 0.2);
}

.auth-btn-register {
    background: linear-gradient(135deg, var(--accent-200), var(--accent-300));
    color: var(--accent-900);
    border: 2px solid var(--accent-200);
}

.auth-btn-register:hover {
    background: linear-gradient(135deg, var(--accent-300), var(--accent-400));
    color: #701a39;
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(236, 72, 153, 0.2);
}

/* ============================================================================
   OAuth 第三方登入按鈕 (OAuth Buttons) - 符合品牌規範
   Google: https://developers.google.com/identity/branding-guidelines
   LINE: https://developers.line.biz/en/docs/line-login/login-button/
   ============================================================================ */

/* OAuth 按鈕基底樣式 */
.oauth-btn {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.75rem 1.25rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    min-height: 44px;
}

/* 確保 SVG 圖標不會被壓縮 */
.oauth-btn svg {
    flex-shrink: 0;
}

.oauth-btn:hover {
    transform: translateY(-1px);
}

/* Google Sign-In Button - 白底彩色 Logo 版 (推薦) */
.oauth-btn-google {
    background: #FFFFFF;
    color: #1F1F1F;
    border: 1px solid #747775;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 500;
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.30), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
}

.oauth-btn-google:hover {
    background: #F2F2F2;
    border-color: #747775;
    box-shadow: 0 1px 3px 0 rgba(60, 64, 67, 0.30), 0 4px 8px 3px rgba(60, 64, 67, 0.15);
}

.oauth-btn-google:active {
    background: #E8E8E8;
}

.oauth-btn-google:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.3), 0 1px 2px 0 rgba(60, 64, 67, 0.30);
}

/* LINE Login Button - #06C755 品牌色 */
.oauth-btn-line {
    background: #06C755;
    color: #FFFFFF;
    border: none;
    font-weight: 600;
    position: relative;
    box-shadow: 0 2px 4px rgba(6, 199, 85, 0.2);
}

.oauth-btn-line:hover {
    background: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1)), #06C755;
    box-shadow: 0 4px 8px rgba(6, 199, 85, 0.3);
}

.oauth-btn-line:active {
    background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), #06C755;
}

.oauth-btn-line:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(6, 199, 85, 0.3), 0 2px 4px rgba(6, 199, 85, 0.2);
}

/* LINE 按鈕分隔線 */
.oauth-btn-line-divider {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.3);
    margin: 0 0.25rem;
}

/* OAuth 按鈕 Disabled 狀態 */
.oauth-btn:disabled,
.oauth-btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.oauth-btn-google:disabled {
    background: #F8F8F8;
    color: rgba(31, 31, 31, 0.38);
    border-color: #E0E0E0;
    box-shadow: none;
}

.oauth-btn-line:disabled {
    background: #E5E5E5;
    color: rgba(30, 30, 30, 0.38);
}

/* ============================================================================
   手機選單 (Mobile Menu)
   ============================================================================ */

.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    max-width: 90vw;
    height: auto;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    box-shadow: -4px 0 20px rgba(168, 85, 247, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 100000;
    border-bottom-left-radius: 1rem;
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(168, 85, 247, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 99999;
    backdrop-filter: blur(4px);
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ============================================================================
   漢堡按鈕 (Hamburger Button)
   ============================================================================ */

.hamburger {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.375rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
    border: 2px solid var(--primary-100);
    background: transparent;
}

.hamburger:hover {
    background: var(--primary-50);
    border-color: var(--primary-200);
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--primary-500);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ============================================================================
   Hero 區塊 (Hero Section)
   ============================================================================ */

.hero-bg {
    background: var(--gradient-hero);
    position: relative;
    overflow: hidden;
}

/* ============================================================================
   統計動畫 (Statistics Animation)
   NOTE: @keyframes count-up 和 .stat-number 已移至 animations.css 統一管理
   ============================================================================ */

/* ============================================================================
   分隔線 (Divider)
   ============================================================================ */

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--neutral-500);
    font-size: 0.875rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--neutral-200);
}

.divider span {
    padding: 0 1rem;
}

/* ============================================================================
   淡入動畫 (Fade In Animation)
   NOTE: @keyframes fadeIn 和 .animate-fadeIn 已移至 animations.css 統一管理
   ============================================================================ */

/* ============================================================================
   語言切換器覆蓋樣式 (Language Switcher Override)
   ============================================================================ */

#unified-language-dropdown {
    z-index: 99999 !important;
    min-width: 240px !important;
    background-color: white !important;
}

#unified-language-dropdown a {
    display: flex !important;
    white-space: nowrap !important;
    color: #000000 !important;
    background-color: #ffffff !important;
    text-decoration: none !important;
}

#unified-language-dropdown a *:not(.text-white) {
    color: #000000 !important;
}

#unified-language-dropdown a.bg-blue-50,
#unified-language-dropdown a:hover {
    color: #000080 !important;
    background-color: #f0f8ff !important;
}

#unified-language-dropdown a:hover *:not(.text-white) {
    color: #000080 !important;
}

/* 德語漸變特殊處理 */
#unified-language-dropdown a[onclick*="'de'"] span {
    background: linear-gradient(to right, #dc2626, #facc15) !important;
    color: black !important;
}