/**
 * NewMBTI - 可愛風格 MBTI 測驗網站
 * 主樣式表
 */

/* ===== CSS Variables ===== */
:root {
    /* Colors - 柔和漸層色系 */
    --color-primary: #8b5cf6;
    --color-primary-light: #a78bfa;
    --color-primary-dark: #7c3aed;
    --color-secondary: #ec4899;
    --color-secondary-light: #f472b6;
    --color-accent: #06b6d4;

    /* Background Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-hero: linear-gradient(135deg, #faf5ff 0%, #fdf2f8 50%, #eff6ff 100%);
    --gradient-card: linear-gradient(145deg, #ffffff 0%, #faf5ff 100%);

    /* Neutral Colors */
    --color-bg: #faf5ff;
    --color-bg-alt: #ffffff;
    --color-text: #1e1b4b;
    --color-text-light: #6b7280;
    --color-text-muted: #9ca3af;
    --color-border: #e9d5ff;

    /* Semantic Colors */
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-error: #ef4444;
    --color-info: #3b82f6;

    /* Typography */
    --font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 3rem;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-glow: 0 0 20px rgb(139 92 246 / 0.3);
    --shadow-card: 0 4px 20px rgb(139 92 246 / 0.1);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;

    /* Layout */
    --container-max: 1200px;
    --header-height: 70px;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-text);
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }

p {
    margin-bottom: var(--space-4);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary-dark);
}

/* ===== Utility Classes ===== */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-4);
}

.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: var(--color-primary);
    color: white;
    padding: var(--space-2) var(--space-4);
    z-index: 1000;
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: 0;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-family: inherit;
    font-size: var(--font-size-base);
    font-weight: 600;
    line-height: 1;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md), 0 0 0 0 rgb(139 92 246 / 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 20px rgb(139 92 246 / 0.4);
}

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

.btn-secondary {
    background: white;
    color: var(--color-primary);
    border: 2px solid var(--color-border);
}

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

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--font-size-lg);
}

.btn-icon {
    font-size: 1.2em;
}

/* ===== Header ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    z-index: 100;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--font-size-xl);
    font-weight: 800;
    color: var(--color-text);
}

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

.logo-icon {
    font-size: 1.5em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-6);
}

.nav-link {
    font-weight: 600;
    color: var(--color-text-light);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-primary);
    background: rgb(139 92 246 / 0.1);
}

/* Language Switcher */
.lang-switcher {
    position: relative;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-2) var(--space-3);
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: var(--font-size-lg);
    transition: all var(--transition-fast);
}

.lang-btn:hover {
    border-color: var(--color-primary);
    background: rgb(139 92 246 / 0.05);
}

.lang-arrow {
    transition: transform var(--transition-fast);
}

.lang-switcher.open .lang-arrow {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + var(--space-2));
    right: 0;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-base);
    min-width: 160px;
    overflow: hidden;
}

.lang-switcher.open .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    color: var(--color-text);
    transition: background var(--transition-fast);
}

.lang-option:hover {
    background: var(--color-bg);
}

.lang-option.active {
    background: rgb(139 92 246 / 0.1);
    color: var(--color-primary);
}

.lang-flag {
    font-size: var(--font-size-xl);
}

.lang-name {
    font-size: var(--font-size-sm);
    font-weight: 500;
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.hamburger,
.hamburger::before,
.hamburger::after {
    width: 24px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: all var(--transition-base);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
}

.hamburger::before {
    transform: translateY(-8px);
}

.hamburger::after {
    transform: translateY(8px);
}

/* ===== Main Content ===== */
.main {
    padding-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
}

/* ===== Hero Section ===== */
.hero {
    position: relative;
    min-height: calc(100vh - var(--header-height));
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-hero);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.5;
    animation: float 20s infinite ease-in-out;
}

.hero-shape-1 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #c4b5fd 0%, #f0abfc 100%);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.hero-shape-2 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #93c5fd 0%, #c4b5fd 100%);
    bottom: -50px;
    left: -50px;
    animation-delay: -5s;
}

.hero-shape-3 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, #fde68a 0%, #fca5a5 100%);
    top: 50%;
    left: 10%;
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(20px, -20px) scale(1.05);
    }
    50% {
        transform: translate(-10px, 10px) scale(0.95);
    }
    75% {
        transform: translate(-20px, -10px) scale(1.02);
    }
}

.hero-content {
    text-align: center;
    z-index: 1;
    padding: var(--space-8);
}

.hero-mascot {
    margin-bottom: var(--space-6);
}

.mascot-container {
    position: relative;
    display: inline-block;
}

.mascot-glow {
    position: absolute;
    inset: -20px;
    background: radial-gradient(circle, rgb(139 92 246 / 0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 3s infinite ease-in-out;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* 可愛吉祥物 - 水晶球占卜師 */
.cute-mascot {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: floatBounce 3s infinite ease-in-out;
}

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

.mascot-body {
    position: relative;
    width: 100px;
    height: 90px;
    background: linear-gradient(180deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 50px 50px 45px 45px;
    box-shadow:
        inset -5px -5px 15px rgba(0,0,0,0.05),
        0 8px 20px rgba(251, 191, 36, 0.3);
    z-index: 2;
}

.mascot-face {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 50px;
}

.mascot-eyes {
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
}

.eye {
    width: 12px;
    height: 14px;
    background: #1e1b4b;
    border-radius: 50%;
    position: relative;
    animation: blink 4s infinite;
}

.eye::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 3px;
    width: 5px;
    height: 5px;
    background: white;
    border-radius: 50%;
}

@keyframes blink {
    0%, 90%, 100% {
        transform: scaleY(1);
    }
    95% {
        transform: scaleY(0.1);
    }
}

.mascot-blush {
    position: absolute;
    top: 22px;
    width: 14px;
    height: 8px;
    background: #fca5a5;
    border-radius: 50%;
    opacity: 0.7;
}

.mascot-blush.left {
    left: 8px;
}

.mascot-blush.right {
    right: 8px;
}

.mascot-mouth {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 6px;
    border: 3px solid #1e1b4b;
    border-top: none;
    border-radius: 0 0 12px 12px;
}

.mascot-hat {
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 35px solid transparent;
    border-right: 35px solid transparent;
    border-bottom: 50px solid #8b5cf6;
    filter: drop-shadow(0 4px 8px rgba(139, 92, 246, 0.3));
}

.mascot-hat::before {
    content: '';
    position: absolute;
    bottom: -55px;
    left: -45px;
    width: 90px;
    height: 12px;
    background: #7c3aed;
    border-radius: 6px;
}

.mascot-hat::after {
    content: '';
    position: absolute;
    top: 15px;
    left: -15px;
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #c4b5fd 0%, #a78bfa 100%);
    border-radius: 50%;
    opacity: 0.5;
}

.hat-star {
    position: absolute;
    top: 5px;
    left: -8px;
    font-size: 20px;
    color: #fde68a;
    text-shadow: 0 0 10px rgba(253, 230, 138, 0.8);
    animation: twinkle 2s infinite;
}

@keyframes twinkle {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}

.crystal-ball {
    position: relative;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 50%, #a5b4fc 100%);
    border-radius: 50%;
    margin-top: -10px;
    box-shadow:
        inset -8px -8px 20px rgba(99, 102, 241, 0.3),
        inset 5px 5px 15px rgba(255, 255, 255, 0.8),
        0 10px 30px rgba(99, 102, 241, 0.4);
    z-index: 1;
    overflow: hidden;
}

.crystal-shine {
    position: absolute;
    top: 8px;
    left: 12px;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    filter: blur(2px);
}

.crystal-shine::after {
    content: '';
    position: absolute;
    top: 25px;
    left: 8px;
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
}

.crystal-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 28px;
    font-weight: 800;
    color: #6366f1;
    text-shadow: 0 0 20px rgba(99, 102, 241, 0.8);
    animation: mysteryGlow 2s infinite alternate;
}

@keyframes mysteryGlow {
    0% {
        opacity: 0.6;
        text-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
    }
    100% {
        opacity: 1;
        text-shadow: 0 0 25px rgba(99, 102, 241, 1);
    }
}

/* 舊的 mascot-character 保留給其他頁面使用 */
.mascot-character {
    font-size: 5rem;
    animation: bounce 2s infinite ease-in-out;
}

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

.mascot-sparkles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.sparkle {
    position: absolute;
    animation: sparkle 2s infinite ease-in-out;
}

.sparkle:nth-child(1) {
    top: 0;
    left: 20%;
    animation-delay: 0s;
}

.sparkle:nth-child(2) {
    top: 30%;
    right: 0;
    animation-delay: 0.5s;
}

.sparkle:nth-child(3) {
    bottom: 10%;
    left: 10%;
    animation-delay: 1s;
}

.sparkle:nth-child(4) {
    bottom: 30%;
    right: 5%;
    animation-delay: 1.5s;
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0;
        transform: scale(0.5) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1) rotate(180deg);
    }
}

.hero-title {
    font-size: clamp(2rem, 5vw, var(--font-size-5xl));
    font-weight: 800;
    margin-bottom: var(--space-4);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: var(--font-size-xl);
    color: var(--color-text-light);
    margin-bottom: var(--space-8);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    animation: glow 2s infinite alternate;
}

@keyframes glow {
    from {
        box-shadow: var(--shadow-md), 0 0 10px rgb(139 92 246 / 0.3);
    }
    to {
        box-shadow: var(--shadow-lg), 0 0 25px rgb(139 92 246 / 0.5);
    }
}

.hero-scroll-hint {
    position: absolute;
    bottom: var(--space-8);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    animation: fadeInUp 1s ease-out 0.5s both;
}

.scroll-arrow {
    animation: scrollBounce 1.5s infinite ease-in-out;
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ===== Features Section ===== */
.features {
    padding: var(--space-20) 0;
    background: white;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-8);
}

.feature-card {
    text-align: center;
    padding: var(--space-8);
    background: var(--gradient-card);
    border-radius: var(--radius-2xl);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-card);
    transition: all var(--transition-base);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: var(--space-4);
    display: block;
}

.feature-title {
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-3);
    color: var(--color-text);
}

.feature-desc {
    color: var(--color-text-light);
    margin-bottom: 0;
}

/* ===== Intro Section ===== */
.intro-section {
    padding: var(--space-20) 0;
    background: var(--color-bg);
}

.intro-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
    align-items: center;
}

.section-title {
    font-size: var(--font-size-3xl);
    margin-bottom: var(--space-6);
    color: var(--color-text);
}

.intro-desc {
    font-size: var(--font-size-lg);
    color: var(--color-text-light);
    line-height: 1.8;
}

.dimension-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
}

.dimension-card {
    background: white;
    padding: var(--space-6);
    border-radius: var(--radius-xl);
    text-align: center;
    border: 2px solid var(--card-color, var(--color-border));
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.dimension-card:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.dimension-pair {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    margin-bottom: var(--space-2);
}

.dimension-letter {
    font-size: var(--font-size-2xl);
    font-weight: 800;
    color: var(--card-color);
}

.dimension-vs {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

.dimension-name {
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
    font-weight: 500;
}

/* ===== Types Preview ===== */
.types-preview {
    padding: var(--space-20) 0;
    background: white;
}

.types-preview .section-title {
    text-align: center;
    margin-bottom: var(--space-12);
}

.types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--space-4);
}

.type-card-mini {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-4);
    background: white;
    border-radius: var(--radius-xl);
    border: 2px solid var(--color-border);
    text-decoration: none;
    transition: all var(--transition-base);
}

.type-card-mini:hover {
    border-color: var(--type-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgb(0 0 0 / 0.1);
}

.type-emoji {
    font-size: 2rem;
    margin-bottom: var(--space-2);
}

.type-code {
    font-size: var(--font-size-lg);
    font-weight: 800;
    color: var(--type-color);
}

.type-name {
    font-size: var(--font-size-xs);
    color: var(--color-text-light);
    text-align: center;
}

/* ===== CTA Section ===== */
.cta-section {
    padding: var(--space-20) 0;
    background: var(--gradient-hero);
}

.cta-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    padding: var(--space-12);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
}

.cta-title {
    font-size: var(--font-size-3xl);
    margin-bottom: var(--space-3);
}

.cta-subtitle {
    color: var(--color-text-light);
    margin-bottom: var(--space-6);
}

.cta-decoration {
    font-size: 6rem;
    opacity: 0.8;
}

/* ===== Ad Section ===== */
.ad-section {
    padding: var(--space-8) 0;
}

.ad-placeholder {
    min-height: 90px;
    background: var(--color-bg-alt);
    border: 1px dashed var(--color-border);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
}

/* ===== Footer ===== */
.footer {
    background: var(--color-text);
    color: white;
    padding: var(--space-12) 0 var(--space-6);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-8);
    padding-bottom: var(--space-8);
    border-bottom: 1px solid rgb(255 255 255 / 0.1);
}

.footer-logo {
    font-size: var(--font-size-xl);
    font-weight: 700;
}

.footer-disclaimer {
    font-size: var(--font-size-sm);
    color: rgb(255 255 255 / 0.6);
    max-width: 400px;
    margin-top: var(--space-3);
    margin-bottom: 0;
}

.footer-links {
    display: flex;
    gap: var(--space-6);
}

.footer-links a {
    color: rgb(255 255 255 / 0.8);
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    font-size: var(--font-size-sm);
    color: rgb(255 255 255 / 0.5);
}

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

/* ===== Test Page Styles ===== */
.test-page {
    min-height: calc(100vh - var(--header-height));
    padding: var(--space-8) 0;
    background: var(--gradient-hero);
}

.test-container {
    max-width: 700px;
    margin: 0 auto;
}

.test-progress {
    margin-bottom: var(--space-8);
}

.progress-text {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--space-3);
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
}

.progress-bar {
    height: 8px;
    background: var(--color-border);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
}

.test-guide {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    background: white;
    padding: var(--space-4) var(--space-6);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-6);
    box-shadow: var(--shadow-md);
}

.guide-mascot {
    font-size: 2.5rem;
    animation: bounce 2s infinite ease-in-out;
}

.guide-message {
    font-size: var(--font-size-base);
    color: var(--color-text-light);
}

.guide-title {
    font-weight: 700;
    color: var(--color-primary);
}

.question-card {
    background: white;
    padding: var(--space-8);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    animation: fadeIn 0.3s ease-out;
}

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

.question-text {
    font-size: var(--font-size-xl);
    font-weight: 600;
    text-align: center;
    margin-bottom: var(--space-8);
    color: var(--color-text);
}

.options {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.option-btn {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    width: 100%;
    padding: var(--space-5) var(--space-6);
    background: var(--color-bg);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-xl);
    cursor: pointer;
    text-align: left;
    font-size: var(--font-size-base);
    font-family: inherit;
    transition: all var(--transition-base);
}

.option-btn:hover {
    border-color: var(--color-primary);
    background: rgb(139 92 246 / 0.05);
    transform: translateX(5px);
}

.option-btn.selected {
    border-color: var(--color-primary);
    background: rgb(139 92 246 / 0.1);
}

.option-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: var(--radius-lg);
    font-size: var(--font-size-xl);
    box-shadow: var(--shadow-sm);
}

.option-text {
    flex: 1;
    font-weight: 500;
    color: var(--color-text);
}

/* ===== Result Page Styles ===== */
.result-page {
    padding: var(--space-8) 0 var(--space-16);
    background: var(--gradient-hero);
}

.result-hero {
    text-align: center;
    padding: var(--space-12) 0;
}

.result-reveal {
    animation: revealScale 0.6s ease-out;
}

@keyframes revealScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.result-emoji {
    font-size: 6rem;
    display: block;
    margin-bottom: var(--space-4);
    animation: bounce 2s infinite ease-in-out;
}

.result-label {
    font-size: var(--font-size-lg);
    color: var(--color-text-light);
    margin-bottom: var(--space-2);
}

.result-type {
    font-size: clamp(3rem, 10vw, 5rem);
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-2);
}

.result-name {
    font-size: var(--font-size-2xl);
    color: var(--color-text);
    margin-bottom: var(--space-6);
}

.result-description {
    max-width: 600px;
    margin: 0 auto var(--space-8);
    font-size: var(--font-size-lg);
    color: var(--color-text-light);
    line-height: 1.8;
}

.result-dimensions {
    display: flex;
    justify-content: center;
    gap: var(--space-6);
    flex-wrap: wrap;
    margin-bottom: var(--space-8);
}

.dimension-bar {
    width: 200px;
    text-align: center;
}

.dimension-label {
    display: flex;
    justify-content: space-between;
    font-size: var(--font-size-sm);
    font-weight: 600;
    margin-bottom: var(--space-2);
}

.dimension-track {
    height: 8px;
    background: var(--color-border);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.dimension-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    transition: width 1s ease-out;
}

.result-actions {
    display: flex;
    justify-content: center;
    gap: var(--space-4);
    flex-wrap: wrap;
}

/* Result Cards */
.result-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-6);
    margin-top: var(--space-12);
}

.result-card {
    background: white;
    padding: var(--space-8);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-card);
}

.result-card-title {
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.result-card-icon {
    font-size: 1.5em;
}

.result-list {
    list-style: none;
}

.result-list li {
    padding: var(--space-2) 0;
    padding-left: var(--space-6);
    position: relative;
    color: var(--color-text-light);
}

.result-list li::before {
    content: '✦';
    position: absolute;
    left: 0;
    color: var(--color-primary);
}

/* ===== Type Page Styles ===== */
.type-page {
    padding: var(--space-8) 0 var(--space-16);
}

.type-hero {
    text-align: center;
    padding: var(--space-12) 0;
    background: var(--gradient-hero);
    border-radius: var(--radius-2xl);
    margin-bottom: var(--space-12);
}

.type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-6);
}

.type-detail-card {
    background: white;
    padding: var(--space-8);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-card);
    text-align: center;
    transition: all var(--transition-base);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.type-detail-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.type-detail-emoji {
    font-size: 4rem;
    margin-bottom: var(--space-4);
}

.type-detail-code {
    font-size: var(--font-size-2xl);
    font-weight: 800;
    color: var(--type-color, var(--color-primary));
    margin-bottom: var(--space-2);
}

.type-detail-name {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: var(--space-2);
}

.type-detail-nickname {
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
    .intro-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .cta-card {
        flex-direction: column;
        text-align: center;
    }

    .cta-decoration {
        display: none;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }

    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero-title {
        font-size: var(--font-size-3xl);
    }

    .dimension-cards {
        grid-template-columns: 1fr 1fr;
    }

    .footer-content {
        flex-direction: column;
        gap: var(--space-6);
    }

    .result-dimensions {
        flex-direction: column;
        align-items: center;
    }

    .dimension-bar {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-3);
    }

    .hero-content {
        padding: var(--space-4);
    }

    .mascot-character {
        font-size: 4rem;
    }

    .btn-lg {
        padding: var(--space-3) var(--space-6);
        font-size: var(--font-size-base);
    }

    .feature-card {
        padding: var(--space-6);
    }

    .question-card {
        padding: var(--space-6);
    }

    .question-text {
        font-size: var(--font-size-lg);
    }
}

/* ===== Animations ===== */
.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

.animate-slide-up {
    animation: slideUp 0.5s ease-out;
}

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

.animate-scale-in {
    animation: scaleIn 0.3s ease-out;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===== Print Styles ===== */
@media print {
    .header,
    .footer,
    .ad-section,
    .hero-scroll-hint {
        display: none;
    }

    .main {
        padding-top: 0;
    }

    body {
        background: white;
    }
}
