/* css/style.css - Pet Wellness Theme (Morandi Green) */

:root {
    --bg-color: #f5f5f0;
    /* 米白/亚麻色背景 */
    --card-bg: #ffffff;
    --text-main: #3d403a;
    /* 深苔藓绿 */
    --text-muted: #70706a;
    --primary: #8a9a5b;
    /* 鼠尾草绿/橄榄绿 */
    --primary-hover: #73863d;
    --border: #e5e5d1;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-serif: 'Playfair Display', serif;
    /* 仅用于Logo */
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 头部 */
header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.max-w-5xl {
    max-width: 64rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.py-6 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
}

.brand-accent {
    color: var(--primary);
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    margin-left: 2rem;
    transition: color 0.2s;
}

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

/* 主区域 */
.hero-section {
    text-align: center;
    padding: 4rem 1.5rem;
}

.hero-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-sub {
    color: var(--text-muted);
    font-size: 1.125rem;
    max-width: 40rem;
    margin: 0 auto;
}

/* 核心功能区 */
.grid-cols-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
    margin-bottom: 4rem;
}

.tool-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 1rem;
    /* 更大的圆角 */
    padding: 2rem;
    box-shadow: 0 4px 10px -2px rgba(0, 0, 0, 0.05);
}

@media (min-width: 768px) {
    .sticky-card {
        position: sticky;
        top: 2rem;
    }
}

@media (max-width: 768px) {
    .grid-cols-2 {
        grid-template-columns: 1fr;
    }
}

/* 表单 */
label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

textarea {
    width: 100%;
    height: 12rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    font-family: var(--font-sans);
    font-size: 1rem;
    color: #334155;
    outline: none;
    resize: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(138, 154, 91, 0.1);
}

/* 按钮 */
.btn-primary {
    width: 100%;
    background-color: var(--primary);
    color: white;
    font-weight: 600;
    padding: 0.875rem;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1rem;
    margin-top: 1rem;
}

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

.btn-primary:disabled {
    background-color: #b0b89b;
    cursor: not-allowed;
}

/* 结果区 */
.output-area {
    white-space: pre-wrap;
    color: var(--text-main);
    font-size: 1rem;
    line-height: 1.7;
    min-height: 300px;
}

.output-placeholder {
    color: #ccc;
    font-style: italic;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.output-area strong {
    color: var(--primary);
}

/* 加载动画 */
.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Footer */
footer {
    margin-top: auto;
    border-top: 1px solid var(--border);
    padding: 2rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin: 0 0.5rem;
}

.footer-links a:hover {
    color: var(--primary);
}