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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #2d2a24 0%, #3d3830 50%, #4a4538 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: #333;
}

/* 头部样式 */
header {
    background: linear-gradient(135deg, #e07b39, #d4a03c);
    padding: 25px 40px;
    box-shadow: 0 4px 20px rgba(224, 123, 57, 0.3);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
}

.logo { display: flex; align-items: center; gap: 15px; }

.logo-icon {
    width: 55px; height: 55px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; font-weight: bold; color: #e07b39;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.company-name { 
    font-size: 26px; 
    font-weight: 700; 
    color: white; 
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); 
}

/* 主内容区 */
main { 
    flex: 1; 
    padding: 40px 20px; 
    max-width: 1400px; 
    margin: 0 auto; 
    width: 100%; 
}

.section-title { 
    text-align: center; 
    color: #f5f0e6; 
    font-size: 32px; 
    margin-bottom: 15px; 
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); 
}

.section-subtitle { 
    text-align: center; 
    color: rgba(245, 240, 230, 0.7); 
    font-size: 16px; 
    margin-bottom: 40px; 
}

/* 工具卡片网格 */
.tools-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); 
    gap: 20px; 
    width: 100%;
}

.tool-card {
    background: rgba(255, 252, 247, 0.98);
    border-radius: 16px; 
    padding: 24px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(224, 123, 57, 0.1);
}

.tool-card:hover { 
    transform: translateY(-4px); 
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2); 
}

.tool-header { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    margin-bottom: 18px; 
}

.tool-icon {
    width: 45px; height: 45px; 
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; color: white;
    flex-shrink: 0;
}

.tool-title { font-size: 17px; font-weight: 600; color: #3d3830; }
.tool-desc { font-size: 12px; color: #7a7265; margin-top: 2px; }
.tool-content { margin-bottom: 16px; }

/* 表单元素样式 */
textarea, input[type="text"], input[type="number"], input[type="date"], input[type="time"], select {
    width: 100%; padding: 12px;
    border: 2px solid #e8e2d9; border-radius: 8px;
    font-size: 14px; transition: all 0.3s;
    resize: vertical; background: #faf8f5;
}

textarea:focus, input:focus, select:focus {
    outline: none; border-color: #e07b39;
    background: white; box-shadow: 0 0 0 3px rgba(224, 123, 57, 0.1);
}

/* 按钮样式 */
.btn {
    padding: 10px 18px; border: none; border-radius: 8px;
    font-size: 13px; font-weight: 600; cursor: pointer;
    transition: all 0.3s; margin: 4px 4px 4px 0;
    white-space: nowrap;
}

.btn-primary { background: linear-gradient(135deg, #e07b39, #d4a03c); color: white; }
.btn-primary:hover { transform: scale(1.02); box-shadow: 0 4px 20px rgba(224, 123, 57, 0.4); }

.btn-secondary { background: #ebe6dd; color: #5a5347; }
.btn-secondary:hover { background: #ddd7cc; }

.btn-success { background: linear-gradient(135deg, #6b9b37, #8ab542); color: white; }
.btn-success:hover { box-shadow: 0 4px 20px rgba(107, 155, 55, 0.4); }

/* 结果显示区 */
.result {
    margin-top: 16px; padding: 12px; background: #f8f6f2;
    border-radius: 8px; font-size: 13px; color: #3d3830;
    min-height: 40px; word-break: break-word; border-left: 3px solid #d4cfc4;
    line-height: 1.6;
}

.result.success { 
    background: linear-gradient(135deg, #e8f0d8, #dce8c8); 
    border-left-color: #6b9b37; 
    color: #3d5a1e; 
}

.result.error { 
    background: linear-gradient(135deg, #f5e0d8, #f0d4c8); 
    border-left-color: #c45a3b; 
    color: #8b3a25; 
}

/* 工具图标颜色 */
.icon-text { background: linear-gradient(135deg, #6b9b37, #8ab542); }
.icon-case { background: linear-gradient(135deg, #c97b5d, #d4956e); }
.icon-time { background: linear-gradient(135deg, #d4a03c, #e8b84a); }
.icon-age { background: linear-gradient(135deg, #9b7b5a, #b8956e); }
.icon-date { background: linear-gradient(135deg, #7a8b5a, #96a86e); }
.icon-color { background: linear-gradient(135deg, #e07b39, #d4a03c); }
.icon-pwd { background: linear-gradient(135deg, #8b7355, #6b9b37); }
.icon-bmi { background: linear-gradient(135deg, #6b9b37, #8ab542); }
.icon-unit { background: linear-gradient(135deg, #d4a03c, #e8b84a); }
.icon-temp { background: linear-gradient(135deg, #5a8b6b, #6ea87a); }
.icon-lottery { background: linear-gradient(135deg, #c45a3b, #d4724e); }
.icon-countdown { background: linear-gradient(135deg, #b85a42, #c97058); }
.icon-palette { background: linear-gradient(135deg, #c97b5d, #e8a87c); }
.icon-length { background: linear-gradient(135deg, #7a8b5a, #96a86e); }
.icon-tip { background: linear-gradient(135deg, #d4a03c, #e8b84a); }

/* 颜色方案展示 */
.color-scheme { display: flex; gap: 8px; margin-top: 12px; }

.color-scheme div { 
    flex: 1; height: 60px; border-radius: 8px; 
    display: flex; align-items: flex-end; justify-content: center; 
    padding-bottom: 5px; font-size: 11px; color: white; 
    text-shadow: 0 1px 2px rgba(0,0,0,0.5); 
    cursor: pointer; transition: transform 0.2s; 
}

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

/* 布局辅助类 */
.flex-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.input-group { margin-bottom: 10px; }
.input-group label { 
    display: block; margin-bottom: 5px; 
    font-size: 12px; color: #5a5347; font-weight: 500; 
}

.color-preview { 
    width: 100%; height: 45px; border-radius: 8px; 
    margin-top: 8px; border: 2px solid #e8e2d9; 
}

/* 页脚样式 */
footer {
    background: #2d2a24; color: rgba(245, 240, 230, 0.8);
    text-align: center; padding: 30px 20px;
    border-top: 1px solid rgba(245, 240, 230, 0.1);
}

.footer-icp { font-size: 13px; color: rgba(245, 240, 230, 0.6); }
.footer-icp a { color: rgba(245, 240, 230, 0.7); text-decoration: none; transition: color 0.3s; }
.footer-icp a:hover { color: #e07b39; text-decoration: underline; }

/* 响应式设计 */
@media (min-width: 1400px) {
    .tools-grid { 
        grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); 
    }
}

@media (max-width: 1024px) {
    .tools-grid { 
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); 
        gap: 18px; 
    }
}

@media (max-width: 768px) {
    header { padding: 18px 15px; }
    .company-name { font-size: 18px; }
    .logo-icon { width: 45px; height: 45px; font-size: 24px; }
    
    .tools-grid { 
        grid-template-columns: 1fr; 
        gap: 15px; 
    }
    
    .tool-card {
        padding: 20px;
        border-radius: 14px;
    }
    
    .tool-header {
        gap: 10px;
        margin-bottom: 15px;
    }
    
    .tool-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .tool-title { font-size: 16px; }
    .tool-desc { font-size: 11px; }
    
    main { padding: 20px 12px; }
    .section-title { font-size: 22px; margin-bottom: 12px; }
    .section-subtitle { font-size: 14px; margin-bottom: 30px; }
    
    textarea, input, select {
        padding: 10px;
        font-size: 13px;
    }
    
    .btn {
        padding: 9px 15px;
        font-size: 12px;
        margin: 3px 3px 3px 0;
    }
    
    .result {
        padding: 10px;
        font-size: 12px;
        margin-top: 14px;
    }
    
    .flex-row {
        gap: 6px;
    }
    
    .input-group label {
        font-size: 11px;
        margin-bottom: 4px;
    }
}

@media (max-width: 480px) {
    .tool-card {
        padding: 16px;
    }
    
    .tool-title { font-size: 15px; }
    .tool-desc { font-size: 10px; }
    
    .tool-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
    
    .btn {
        padding: 8px 12px;
        font-size: 11px;
    }
    
    textarea, input, select {
        padding: 9px;
        font-size: 12px;
    }
}
