/* 基础变量 */
:root {
    --primary: #3b82f6;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-500: #6b7280;
    --gray-800: #1f2937;
    
    /* 主题色 */
    --blue-50: #eff6ff;
    --purple-50: #faf5ff;
    --purple-500: #a855f7;
    --green-50: #f0fdf4;
    --green-500: #22c55e;
    --orange-50: #fff7ed;
    --orange-500: #f97316;
    --rose-50: #fff1f2;
    --rose-500: #f43f5e;
    --yellow-50: #fefce8;
    --yellow-500: #eab308;
}

/* 重置默认样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--gray-50);
    color: var(--gray-800);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 布局容器 */
.container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) { .container { max-width: 640px; } }
@media (min-width: 768px) { .container { max-width: 768px; } }
@media (min-width: 1024px) { .container { max-width: 1024px; } }
@media (min-width: 1280px) { .container { max-width: 1280px; } }
@media (min-width: 1536px) { .container { max-width: 1536px; } }

/* 头部样式 */
.site-header {
    background-color: #fff;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-inner {
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.logo-img {
    height: 2rem;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

/* 底部样式 */
.site-footer {
    background-color: #fff;
    border-top: 1px solid var(--gray-200);
    margin-top: auto;
    padding-top: 2rem;
    padding-bottom: 2rem;
}
.footer-info {
    text-align: center;
    color: var(--gray-500);
    font-size: 0.875rem;
}
.footer-info p {
    margin-bottom: 0.5rem;
}
.footer-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
}
.footer-link:hover {
    color: var(--primary);
}

/* 主要内容区 */
.main-content {
    flex-grow: 1;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

/* 工具列表页样式 */
.tool-list-area {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.category-block {
    margin-bottom: 3rem;
}

.category-title {
    font-size: 1.5rem;
    line-height: 2rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.category-icon {
    width: 0.375rem;
    height: 1.5rem;
    background-color: var(--gray-800);
    border-radius: 9999px;
    margin-right: 0.75rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
    .tools-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1280px) {
    .tools-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* 工具卡片 */
.tool-card {
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--gray-100);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    height: 100%;
    text-decoration: none;
}

.tool-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.tool-icon-wrapper {
    width: 3rem;
    height: 3rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    transition: background-color 0.3s, color 0.3s;
}

.tool-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
    transition: color 0.3s;
}

.tool-desc {
    color: var(--gray-500);
    font-size: 0.875rem;
    flex-grow: 1;
}

/* 主题颜色类 */
.theme-blue .tool-icon-wrapper { background-color: var(--blue-50); color: var(--primary); }
.theme-blue:hover { border-color: rgba(59, 130, 246, 0.5); }
.theme-blue:hover .tool-icon-wrapper { background-color: var(--primary); color: #fff; }
.theme-blue:hover .tool-title { color: var(--primary); }

.theme-purple .tool-icon-wrapper { background-color: var(--purple-50); color: var(--purple-500); }
.theme-purple:hover { border-color: rgba(168, 85, 247, 0.5); }
.theme-purple:hover .tool-icon-wrapper { background-color: var(--purple-500); color: #fff; }
.theme-purple:hover .tool-title { color: var(--purple-500); }

.theme-green .tool-icon-wrapper { background-color: var(--green-50); color: var(--green-500); }
.theme-green:hover { border-color: rgba(34, 197, 94, 0.5); }
.theme-green:hover .tool-icon-wrapper { background-color: var(--green-500); color: #fff; }
.theme-green:hover .tool-title { color: var(--green-500); }

.theme-orange .tool-icon-wrapper { background-color: var(--orange-50); color: var(--orange-500); }
.theme-orange:hover { border-color: rgba(249, 115, 22, 0.5); }
.theme-orange:hover .tool-icon-wrapper { background-color: var(--orange-500); color: #fff; }
.theme-orange:hover .tool-title { color: var(--orange-500); }

.theme-rose .tool-icon-wrapper { background-color: var(--rose-50); color: var(--rose-500); }
.theme-rose:hover { border-color: rgba(244, 63, 94, 0.5); }
.theme-rose:hover .tool-icon-wrapper { background-color: var(--rose-500); color: #fff; }
.theme-rose:hover .tool-title { color: var(--rose-500); }

.theme-yellow .tool-icon-wrapper { background-color: var(--yellow-50); color: var(--yellow-500); }
.theme-yellow:hover { border-color: rgba(234, 179, 8, 0.5); }
/* 工具页面公共样式 */
.tool-container {
    max-width: 64rem; /* 1024px */
    margin: 0 auto 2rem auto;
    background-color: #fff;
    padding: 2rem 3rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--gray-100);
    min-height: calc(100vh - 200px);
}
.tool-container-lg {
    max-width: 56rem; /* 896px */
}

.tool-header {
    text-align: center;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid var(--gray-100);
    padding-bottom: 2rem;
}
.tool-header-left {
    text-align: left;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-100);
    padding-bottom: 1rem;
}

.tool-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 0.75rem;
}
.tool-desc {
    color: var(--gray-500);
    font-size: 1rem;
}

/* 栅格布局 */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 2rem;
}
@media (min-width: 768px) {
    .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.grid-12 {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 2rem;
}
@media (min-width: 768px) {
    .grid-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
    .col-5 { grid-column: span 5 / span 5; }
    .col-7 { grid-column: span 7 / span 7; }
}

/* 面板 */
.panel-light {
    background-color: var(--gray-50);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
}
.panel-white {
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
@media (min-width: 768px) {
    .panel-light, .panel-white { padding: 2rem; }
}

.panel-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}
.panel-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    background-color: var(--primary);
    margin-right: 0.5rem;
}
.panel-dot-green { background-color: var(--green-500); }

/* 表单 */
.form-group {
    margin-bottom: 1.5rem;
}
.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}
.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
}
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
}

/* 按钮 */
.btn-primary {
    display: inline-block;
    width: 100%;
    background-color: var(--primary);
    color: #fff;
    font-weight: 700;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
    text-align: center;
    font-size: 1.125rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.btn-primary:hover {
    background-color: #2563eb;
}
.btn-inline {
    width: auto;
    font-size: 0.875rem;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
}
.btn-success {
    background-color: var(--green-500);
}
.btn-success:hover {
    background-color: #16a34a;
}
.btn-default {
    background-color: var(--gray-100);
    color: var(--gray-800);
    box-shadow: none;
}
.btn-default:hover {
    background-color: #e5e7eb;
}

/* 结果区基础 */
.result-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.result-title-abs {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
}
.result-value-wrap {
    margin-top: 2rem;
}
.result-huge {
    font-size: 3.75rem;
    font-weight: 900;
    color: #d1d5db;
    margin-bottom: 1rem;
    transition: color 0.3s;
}
.result-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border-radius: 9999px;
    font-size: 1.125rem;
    font-weight: 700;
    background-color: var(--gray-100);
    color: var(--gray-500);
    margin-bottom: 1.5rem;
    transition: all 0.3s;
}
.result-desc {
    color: var(--gray-500);
    font-size: 0.875rem;
    max-width: 20rem;
    margin: 0 auto;
    line-height: 1.625;
}

/* 隐藏与显示 */
.hidden { display: none !important; }
.text-xl { font-size: 1.25rem; }
.text-green-500 { color: #22c55e; }
.text-orange-500 { color: #f97316; }
.text-blue-500 { color: #3b82f6; }
.bg-blue-500 { background-color: #3b82f6; }
.bg-red-500 { background-color: #ef4444; }
.bg-yellow-500 { background-color: #eab308; }
.bg-purple-500 { background-color: #a855f7; }
.bg-green-500 { background-color: #22c55e; }
.bg-gray-500 { background-color: #6b7280; }
.bg-orange-500 { background-color: #f97316; }
.bg-pink-500 { background-color: #ec4899; }
.bg-indigo-500 { background-color: #6366f1; }
.bg-teal-500 { background-color: #14b8a6; }

@media (min-width: 768px) {
    .md-flex-row {
        flex-direction: row !important;
    }
}

@keyframes ping {
  75%, 100% {
    transform: scale(2);
    opacity: 0;
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-1 { flex: 1 1 0%; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-primary { color: var(--primary); }
.text-gray-500 { color: var(--gray-500); }
.text-gray-700 { color: #374151; }
.font-bold { font-weight: 700; }
.border-b { border-bottom: 1px solid var(--gray-200); }
.pb-4 { padding-bottom: 1rem; }

/* 表格样式 */
.table-responsive {
    overflow-x: auto;
}
.table-base {
    width: 100%;
    text-align: left;
    border-collapse: collapse;
}
.table-base th {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    font-weight: 500;
    color: #374151;
    background-color: var(--gray-50);
}
.table-base td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    color: var(--gray-500);
}
.table-base tr:hover td {
    background-color: var(--blue-50);
}


