* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft JhengHei", Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* ===== */
/* 自訂動畫效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
@keyframes slideInFromBottom {
    from {
        opacity: 0;
        transform: translateY(1rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}
.animate-slide-in {
    animation: slideInFromBottom 0.5s ease-out forwards;
}
.animate-zoom-in {
    animation: zoomIn 0.5s ease-out forwards;
}

/* 隱藏元素用 */
.hidden-view {
    display: none !important;
}

/* ===== */

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}
.animate-slide-in {
    animation: slideInFromBottom 0.5s ease-out forwards;
}
.animate-zoom-in {
    animation: zoomIn 0.5s ease-out forwards;
}

/* 隱藏元素用 */
.hidden-view {
    display: none !important;
}

/* header gemini 改良 */
/* 由於預覽環境沒有 Tailwind 編譯器，我們將原本的 .nav-btn 邏輯寫成標準 CSS */
.nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 9999px;
    transition: all 0.3s ease-in-out;
    white-space: nowrap;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    text-decoration: none;
}

/* 註冊帳號按鈕的橘紅漸層樣式 */
.register-btn {
    background: linear-gradient(135deg, #ff9d6c 0%, #ff5e62 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(255, 94, 98, 0.3);
}

.register-btn:hover {
    background: linear-gradient(135deg, #ffae82 0%, #ff7377 100%);
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 94, 98, 0.4);
}

@media (min-width: 768px) {
    .nav-btn {
        font-size: 1rem;
    }
}

.nav-btn:hover {
    background-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

.nav-btn:active {
    transform: scale(0.95);
}

/* 漸入動畫 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

/* 漸入動畫 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}
/* header gemini 改良 end */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

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

.auth-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}

.auth-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.auth-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.auth-btn.register {
    background: linear-gradient(45deg, #ff6b6b, #ffa726);
    border: none;
}

.main-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    margin-bottom: 30px;
}

.input-section {
    margin-bottom: 30px;
}

.input-section h2 {
    color: #5a67d8;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.text-input {
    width: 100%;
    min-height: 150px;
    padding: 20px;
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s ease;
    background: #fafafa;
}

.text-input:focus {
    outline: none;
    border-color: #5a67d8;
    box-shadow: 0 0 0 3px rgba(90, 103, 216, 0.1);
    background: white;
}

.submit-btn {
    background: linear-gradient(45deg, #5a67d8, #667eea);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 25px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(90, 103, 216, 0.3);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(90, 103, 216, 0.4);
}

.response-section {
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #f8f9ff, #e8f2ff);
    border-radius: 15px;
    border-left: 5px solid #5a67d8;
    display: none;
}

.response-section h3 {
    color: #5a67d8;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.response-text {
    font-size: 16px;
    line-height: 1.6;
    color: #4a5568;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.9);
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

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

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.feature-card h3 {
    color: #5a67d8;
    margin-bottom: 10px;
}

.pricing-note {
    background: rgba(255, 193, 7, 0.1);
    border: 2px solid rgba(255, 193, 7, 0.3);
    border-radius: 10px;
    padding: 15px;
    margin-top: 20px;
    text-align: center;
    color: #856404;
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .header h1 {
        font-size: 2rem;
    }

    .main-card {
        padding: 25px;
    }

    .auth-buttons {
        flex-direction: column;
        align-items: center;
    }
}

.response-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.response-section h3 {
    color: #667eea;
    margin-bottom: 20px;
}

.response-text {
    min-height: 100px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    line-height: 1.8;
}

.response-text:empty::before {
    content: "您的回覆將顯示在這裡...";
    color: #999;
    font-style: italic;
}

.response-text:not(:empty) {
    animation: slideIn 0.5s ease;
}

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

.response-text p {
    margin-bottom: 15px;
}

.response-text strong {
    color: #764ba2;
    font-weight: 600;
}

.alert {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.loading {
    text-align: center;
    color: #667eea;
    font-weight: 500;
}

.loading::after {
    content: "...";
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%,
    20% {
        content: ".";
    }
    40% {
        content: "..";
    }
    60%,
    100% {
        content: "...";
    }
}

:root {
    --brand-blue: #4a90e2;
    --brand-gold: #d4af37;
    --soft-bg: #f8fafc;
}
body {
    background-color: var(--soft-bg);
    font-family: "PingFang TC", "Microsoft JhengHei", sans-serif;
}
.hero-gradient {
    background: linear-gradient(135deg, #e0eafc 0%, #cfdef3 100%);
}
.feature-card {
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
    border-bottom: 4px solid transparent;
}
.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}
.btn-glow:hover {
    box-shadow: 0 0 15px rgba(74, 144, 226, 0.4);
}
