/* AST工具包主样式文件 */

/* Tailwind CSS 工具类扩展 */
@layer utilities {
    .tool-card {
        @apply bg-white rounded-lg shadow-md p-6 mb-6 transition-all duration-300 hover:shadow-lg border border-gray-100;
    }
    
    .tool-card:hover {
        @apply transform hover:-translate-y-1;
    }
    
    .tool-card h3 {
        @apply text-xl font-semibold mb-2;
    }
    
    .tool-card p {
        @apply text-gray-600 mb-4;
    }
    
    .tool-card select {
        @apply mb-4;
    }
}

/* 移动端响应式优化 */
@media (max-width: 768px) {
    /* 工具卡片移动端适配 */
    .tool-card {
        @apply p-4 mb-4;
    }
    
    .tool-card h3 {
        @apply text-lg font-semibold mb-2;
    }
    
    .tool-card p {
        @apply text-sm mb-3;
    }
    
    .tool-card button {
        @apply px-3 py-2 text-sm;
    }
    
    /* 标题和文本移动端适配 */
    h1 {
        @apply text-2xl font-bold mb-4;
    }
    
    h2 {
        @apply text-lg font-semibold mb-3;
    }
    
    /* 文件上传区域移动端适配 */
    .border-2.border-dashed {
        @apply p-6;
    }
    
    .border-2.border-dashed i {
        @apply text-3xl;
    }
    
    .border-2.border-dashed p {
        @apply text-sm;
    }
    
    /* 按钮移动端适配 */
    button {
        @apply px-4 py-2 text-sm;
    }
    
    /* 选择框移动端适配 */
    select, input {
        @apply p-2 text-sm;
    }
    
    /* 网格布局移动端适配 */
    .grid {
        @apply gap-4;
    }
}

/* 超小屏幕适配 */
@media (max-width: 480px) {
    .tool-card {
        @apply p-3 mb-3;
    }
    
    .tool-card h3 {
        @apply text-base font-semibold mb-1;
    }
    
    .tool-card p {
        @apply text-xs mb-2;
    }
    
    h1 {
        @apply text-xl font-bold mb-3;
    }
    
    h2 {
        @apply text-base font-semibold mb-2;
    }
    
    .border-2.border-dashed {
        @apply p-4;
    }
    
    .border-2.border-dashed i {
        @apply text-2xl;
    }
    
    button {
        @apply px-3 py-1 text-xs;
    }
}

/* 通用样式重置 */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    margin: 0;
    padding: 0;
}

/* 滚动条样式优化 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 页面信息样式 */
.page-info {
    margin-top: 3rem;
    padding: 1.5rem;
    text-align: center;
    color: #6b7280;
    font-size: 0.875rem;
    border-top: 1px solid #e5e7eb;
}

.page-info p {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* 工具卡片样式增强 */
.tool-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    overflow: hidden;
}

.tool-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.tool-card .h-12.w-12 {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    transition: all 0.3s ease;
}

.tool-card:hover .h-12.w-12 {
    transform: scale(1.1);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
}

/* 工具网格布局 - 固定为每行3个工具时的大小 */
.tools-grid {
    display: grid;
    gap: 1.5rem;
    /* 动态调整每行工具数量，最大6个，固定单个工具尺寸 */
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    max-width: 2100px; /* 6个工具时的最大宽度 */
    margin: 0 auto;
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .tools-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
}

@media (max-width: 900px) {
    .tools-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
}

@media (max-width: 600px) {
    .tools-grid {
        grid-template-columns: 1fr;
    }
}