/* css/style.css - Pest Control / Emergency Theme (YSL Red) */

:root {
    --bg-color: #121212;
    /* 碳黑背景 */
    --card-bg: #1e1e1e;
    /* 深灰卡片 */
    --text-main: #f5f5f5;
    /* 亮白文字 */
    --text-muted: #a3a3a3;
    --primary: #D10024;
    /* 圣罗兰红/警示红 */
    --primary-hover: #A7001E;
    --border: #333333;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

*,
*::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: #1a1a1a;
    border-bottom: 1px solid var(--border);
}

.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-weight: 800;
    /* 加粗 */
    font-size: 1.5rem;
    color: white;
    text-decoration: none;
    letter-spacing: 0.5px;
}

.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: white;
}

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

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-sub {
    color: var(--text-muted);
    font-size: 1.125rem;
    max-width: 42rem;
    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: 0.5rem;
    /* 尖锐直角，增加严肃感 */
    padding: 2rem;
}

@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: 600;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 0.75rem;
    letter-spacing: 0.05em;
}

textarea {
    width: 100%;
    height: 12rem;
    padding: 1rem;
    background: #111;
    border: 1px solid var(--border);
    border-radius: 0.25rem;
    font-family: var(--font-sans);
    font-size: 1rem;
    color: #eee;
    outline: none;
    resize: none;
    transition: all 0.2s;
}

textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(209, 0, 36, 0.2);
}

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

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

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

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

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

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

.output-area .affiliate-link {
    display: block;
    background-color: var(--primary);
    color: white !important;
    padding: 1rem;
    text-align: center;
    text-decoration: none;
    border-radius: 0.25rem;
    font-weight: 700;
    margin-top: 2rem;
    animation: pulse 2s infinite;
}

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

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

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

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(209, 0, 36, 0.7);
    }

    70% {
        transform: scale(1.02);
        box-shadow: 0 0 15px 10px rgba(209, 0, 36, 0);
    }
}

/* 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: white;
}