/* 基础样式重置和全局设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(to bottom right, #eff6ff, #e0e7ff);
    min-height: 100vh;
    color: #1e293b;
}

/* 容器样式 */
.container {
    max-width: 5xl;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* 标题样式 */
h1, h2, h3, h4 {
    color: #1e293b;
    font-weight: 700;
}

h1 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 0.75rem;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

/* 段落样式 */
p {
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 1rem;
}

/* 按钮样式 */
button {
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

button:hover {
    transform: scale(1.05);
}

.btn-primary {
    background-color: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background-color: #2563eb;
}

.btn-neutral {
    background-color: #64748b;
    color: white;
}

.btn-neutral:hover {
    background-color: #475569;
}

/* 卡片样式 */
.card {
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* 表单样式 */
input[type="text"],
input[type="number"] {
    width: 100%;
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="number"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

input[type="radio"] {
    width: 1rem;
    height: 1rem;
    accent-color: #3b82f6;
}

label {
    cursor: pointer;
    font-weight: 500;
    color: #1e293b;
}

/* 进度条样式 */
.progress-container {
    margin-bottom: 2rem;
    position: relative;
}

.progress-bar-bg {
    height: 0.5rem;
    background-color: #e2e8f0;
    border-radius: 9999px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: #3b82f6;
    border-radius: 9999px;
    transition: all 0.5s ease;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #64748b;
}

/* 网格布局 */
.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

/* 弹性布局 */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-end {
    justify-content: flex-end;
}

/* 间距 */
.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mt-3 {
    margin-top: 0.75rem;
}

.ml-2 {
    margin-left: 0.5rem;
}

.mr-2 {
    margin-right: 0.5rem;
}

.p-4 {
    padding: 1rem;
}

.p-5 {
    padding: 1.25rem;
}

.p-6 {
    padding: 1.5rem;
}

/* 文本样式 */
.text-center {
    text-align: center;
}

.text-neutral-dark {
    color: #1e293b;
}

.text-neutral {
    color: #64748b;
}

.text-primary {
    color: #3b82f6;
}

.text-accent {
    color: #f59e0b;
}

.text-secondary {
    color: #10b981;
}

.text-sm {
    font-size: 0.875rem;
}

.text-xl {
    font-size: 1.25rem;
}

.font-bold {
    font-weight: 700;
}

.font-medium {
    font-weight: 500;
}

/* 边框样式 */
.border {
    border: 1px solid #e2e8f0;
}

.border-primary {
    border-color: #3b82f6;
}

.border-accent {
    border-color: #f59e0b;
}

.border-secondary {
    border-color: #10b981;
}

.border-l-4 {
    border-left: 4px solid;
}

.border-b {
    border-bottom: 1px solid #e2e8f0;
}

/* 背景色 */
.bg-white {
    background-color: white;
}

.bg-neutral-light {
    background-color: #f1f5f9;
}

.bg-primary/10 {
    background-color: rgba(59, 130, 246, 0.1);
}

/* 阴影 */
.shadow-sm {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* 圆角 */
.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-xl {
    border-radius: 0.75rem;
}

.rounded-full {
    border-radius: 9999px;
}

/* 显示/隐藏 */
.hidden {
    display: none;
}

/* 加载覆盖层 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

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

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

/* 过渡 */
.transition-all {
    transition: all 0.3s ease;
}

/* 选项样式 */
.option-item label {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option-item label:hover {
    background-color: #f9fafb;
}

.option-item input[type="radio"] {
    margin-right: 0.5rem;
}

/* 响应式调整 */
@media (min-width: 768px) {
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    
    .md\:flex-row {
        flex-direction: row;
    }
    
    .md\:items-center {
        align-items: center;
    }
    
    .md\:mt-0 {
        margin-top: 0;
    }
}

/* 自定义工具类 */
.content-auto {
    content-visibility: auto;
}

.text-shadow {
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.scale-hover:hover {
    transform: scale(1.05);
}

.card-transition {
    transition: all 0.3s ease;
}

.card-transition:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}