:root {
    --primary: #4a6bff;
    --primary-hover: #3a56d4;
    --secondary: #6a5acd;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 12px;
    --radius-sm: 8px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-light);
    min-height: 100vh;
    margin: 0;
    padding: 2rem;
    color: var(--text-primary);
    line-height: 1.6;
}

.glass-container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 2.5rem;
    border: 1px solid var(--border-color);
}

h1 {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 2rem 0;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

h1 i {
    color: var(--primary);
}

h2 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
}

h3 {
    margin: 0 0 0.75rem 0;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.tool-card {
    display: block;
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 1.75rem;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.tool-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
    text-decoration: none;
    color: inherit;
}

.icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.tool-card h2 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.tool-card p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* 返回按钮 */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: var(--bg-white);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    font-size: 0.9rem;
    transition: all 0.2s ease;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.back-button:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    text-decoration: none;
}

.back-button i {
    font-size: 0.875rem;
}

/* 通用按钮样式 */
button,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
    font-family: inherit;
}

button:hover,
.btn:hover {
    background: var(--primary-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

button:active,
.btn:active {
    transform: translateY(0);
}

button:disabled,
.btn:disabled {
    background: var(--text-secondary);
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
}

button.secondary {
    background: var(--bg-white);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

button.secondary:hover {
    background: var(--bg-light);
    border-color: var(--primary);
}

/* 通用输入框样式 */
input[type="text"],
input[type="number"],
input[type="datetime-local"],
textarea,
select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-family: inherit;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(74, 107, 255, 0.1);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

textarea {
    resize: vertical;
    min-height: 120px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    line-height: 1.6;
}

/* 标签样式 */
label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9375rem;
}

/* 卡片容器 */
.card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

/* 工具内容容器 */
.tool-content {
    max-width: 900px;
    margin: 0 auto;
}

/* 输入组 */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.input-label,
.output-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
}

.input-label i,
.output-label i {
    color: var(--primary);
    font-size: 1rem;
}

/* 输出框 */
.output-box,
.output-container {
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    padding: 1rem;
    border: 1px solid var(--border-color);
    min-height: 100px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    word-break: break-all;
    line-height: 1.6;
    font-size: 0.9375rem;
    box-shadow: var(--shadow-sm);
}

.output-box.success {
    border-left: 4px solid var(--success);
}

.output-box.error {
    border-left: 4px solid var(--error);
}

/* 按钮组 */
.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
    justify-content: center;
}

/* 说明区域 */
.instructions {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.instructions h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0;
    color: var(--text-primary);
}

.instructions h3 i {
    color: var(--primary);
}

.instruction-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0 0;
}

.instruction-list li {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.instruction-list li i {
    color: var(--primary);
    margin-top: 0.25rem;
    flex-shrink: 0;
}

/* 状态消息 */
.status-message {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

.status-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.status-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.status-message.warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
}

/* 复制提示 */
.copy-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

.copy-toast.show {
    opacity: 1;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 1rem;
    }

    .glass-container {
        padding: 1.5rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    .tool-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .button-group {
        flex-direction: column;
    }

    button,
    .btn {
        width: 100%;
    }
}

/* 页脚 */
footer {
    text-align: center;
    margin-top: 3rem;
    padding: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    background: var(--bg-white);
    border-radius: var(--radius);
    backdrop-filter: none;
    border: 1px solid var(--border-color);
}

footer a {
    color: var(--text-secondary);
    text-decoration: none;
    margin-left: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    transition: color 0.2s ease;
}

footer a:hover {
    color: var(--primary);
}
