﻿/* 免费在线工具箱 - 全局样式 */

:root {
    --primary: #4f46e5;
    --primary-light: #6366f1;
    --primary-dark: #3730a3;
    --bg: #ffffff;
    --bg-secondary: #f8fafc;
    --text: #1e293b;
    --text-secondary: #64748b;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.08);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: 0.2s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.logo {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.logo svg { width: 28px; height: 28px; }
.header-nav { display: flex; gap: 24px; }
.header-nav a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color var(--transition);
}
.header-nav a:hover { color: var(--primary); text-decoration: none; }

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Hero */
.hero {
    text-align: center;
    padding: 80px 24px 60px;
}
.hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}
.hero p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto;
}

/* Tool Grid */
.tools-section { padding: 0 24px 80px; }
.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text);
}
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}
.tool-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: all var(--transition);
    text-decoration: none;
    color: var(--text);
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
.tool-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    text-decoration: none;
}
.tool-card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}
.tool-card-text h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}
.tool-card-text p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Ad Slot */
.ad-slot {
    background: var(--bg-secondary);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin: 24px 0;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Footer */
footer {
    border-top: 1px solid var(--border);
    padding: 32px 24px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
}
footer a { color: var(--text-secondary); }

/* Responsive */
@media (max-width: 768px) {
    .hero { padding: 48px 16px 40px; }
    .hero h1 { font-size: 1.8rem; }
    .tools-section { padding: 0 16px 60px; }
    .tool-grid { grid-template-columns: 1fr; }
}

/* Tool page layout */
.tool-page {
    padding: 32px 24px 60px;
}
.tool-page-header {
    text-align: center;
    margin-bottom: 32px;
}
.tool-page-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.tool-page-header p {
    color: var(--text-secondary);
    max-width: 520px;
    margin: 0 auto;
}
.tool-workspace {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    max-width: 900px;
    margin: 0 auto;
}

/* Form elements */
textarea, input[type="text"], input[type="url"], input[type="file"], select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color var(--transition);
    background: var(--bg);
    color: var(--text);
}
textarea:focus, input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}
textarea { min-height: 200px; resize: vertical; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
}
.btn-primary {
    background: var(--primary);
    color: #fff;
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--border); }

.result-area {
    margin-top: 16px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    font-family: "SF Mono", "Fira Code", monospace;
    font-size: 0.9rem;
    word-break: break-all;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
}

.controls-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin: 16px 0;
}
