/**
 * 工具页面通用样式
 * 与老站保持一致的蓝色主题
 */

/* ========== 主内容区域 ========== */
.main-with-sidebar {
    margin-left: 220px;
    min-height: calc(100vh - 60px);
    background: #f5f5f5;
}

.tool-page { 
    margin: 0;
    padding: 40px;
}

.tool-header {
    text-align: center;
    margin-bottom: 40px;
}

.tool-header h1 {
    font-size: 32px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
}

.tool-desc { 
    color: #666; 
    font-size: 15px; 
    margin-top: 10px; 
}

/* 蓝色背景标题头 - 白色文字 (强制覆盖) */
.tool-page .tool-header {
    background: linear-gradient(135deg, #0d47a1 0%, #093290 100%);
    padding: 40px 20px;
    border-radius: 12px;
    color: white;
}

.tool-page .tool-header h1 {
    color: white !important;
}

.tool-page .tool-header p,
.tool-page .tool-header .tool-desc {
    color: rgba(255,255,255,0.95) !important;
    opacity: 1;
}

/* ========== 工具容器 ========== */
.tool-container {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* ========== 表单元素 ========== */
.tool-section { margin-bottom: 25px; }
.tool-label { display: block; margin-bottom: 10px; font-weight: 600; color: #333; }
.form-group { margin-bottom: 25px; }
.form-label { display: block; margin-bottom: 10px; font-weight: 600; color: #333; }

.tool-input,
.tool-textarea,
.tool-select,
.main-with-sidebar select,
.main-with-sidebar input[type="text"],
.main-with-sidebar textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
    transition: all 0.3s;
    background: #fff !important;
    color: #333 !important;
}

.tool-input:focus,
.tool-textarea:focus,
.tool-select:focus {
    outline: none;
    border-color: #0d47a1;
    box-shadow: 0 0 0 3px rgba(13, 71, 161, 0.1);
}

.tool-textarea {
    min-height: 120px;
    resize: vertical;
}

/* ========== 尺寸/选项按钮 ========== */
.size-selector,
.option-selector {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.size-btn,
.option-btn {
    flex: 1;
    min-width: 100px;
    padding: 12px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

.size-btn:hover,
.option-btn:hover {
    border-color: #0d47a1;
    color: #0d47a1;
}

.size-btn.active,
.option-btn.active {
    border-color: #0d47a1;
    background: #0d47a1;
    color: white;
}

/* ========== 平台标签页 ========== */
.platform-tabs {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.platform-tab {
    padding: 10px 25px;
    border: 2px solid #e0e0e0;
    background: white;
    color: #666;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.platform-tab:hover {
    border-color: #0d47a1;
    color: #0d47a1;
}

.platform-tab.active {
    background: #0d47a1;
    color: white;
    border-color: #0d47a1;
}

/* ========== 主按钮 - 蓝色 ========== */
.tool-btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    background: linear-gradient(135deg, #0d47a1 0%, #093290 100%);
    color: white;
}

.tool-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 71, 161, 0.4);
}

/* ========== 次要按钮 - 绿色 ========== */
.tool-btn-secondary,
.download-btn {
    padding: 12px 30px;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s;
}

.tool-btn-secondary:hover,
.download-btn:hover {
    background: #45a049;
    transform: translateY(-2px);
}

/* ========== 复制按钮 - 白底蓝边 ========== */
.copy-btn {
    padding: 8px 16px;
    background: white;
    color: #0d47a1;
    border: 1px solid #0d47a1;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s;
}

.copy-btn:hover {
    background: #0d47a1;
    color: white;
}

/* ========== 结果区域 ========== */
.result-container,
.qrcode-result {
    margin-top: 30px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 12px;
    display: none;
}

.result-container.show,
.qrcode-result.show {
    display: block;
}

/* ========== 表格 ========== */
.tool-table {
    width: 100%;
    border-collapse: collapse;
}

.tool-table thead tr {
    background: linear-gradient(135deg, #0d47a1 0%, #093290 100%);
    color: white;
}

.tool-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.tool-table td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.tool-table tbody tr:hover {
    background: #f8f9fa;
}

/* ========== 使用说明 ========== */
.tool-tips {
    margin-top: 30px;
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
}

.tool-tips h3 { 
    margin-bottom: 15px; 
    color: #333;
    font-size: 16px;
}

.tool-tips ul { 
    list-style: none; 
    padding: 0; 
    margin: 0; 
}

.tool-tips li { 
    padding: 8px 0; 
    color: #666;
    font-size: 14px;
}

/* ========== 卡片网格 ========== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.card-item {
    background: linear-gradient(135deg, #f8f9ff 0%, #fff 100%);
    border: 2px solid #e0e7ff;
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s;
}

.card-item:hover {
    border-color: #0d47a1;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(13, 71, 161, 0.15);
}

/* ========== 警告/提示框 ========== */
.warning-box {
    background: #fff3e0;
    border: 1px solid #ffb74d;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 25px;
    color: #e65100;
    font-size: 14px;
}

.info-box {
    background: #e3f2fd;
    border: 1px solid #64b5f6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 25px;
    color: #1565c0;
    font-size: 14px;
}

/* ========== 蓝色标题头部 - 与老站一致 ========== */
.tool-header-blue,
.tool-header[style*="background"] {
    text-align: center;
    margin-bottom: 40px;
    background: linear-gradient(135deg, #0d47a1 0%, #093290 100%) !important;
    padding: 40px 20px;
    border-radius: 12px;
    color: white !important;
}

.tool-header-blue h1,
.tool-header[style*="background"] h1 {
    color: white !important;
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 15px;
}

.tool-header-blue p,
.tool-header[style*="background"] p {
    color: rgba(255,255,255,0.95) !important;
    font-size: 16px;
}

/* ========== 全局颜色覆盖 - 紫色/绿色/红色 → 蓝色 ========== */
/* 紫色渐变修正 */
[style*="667eea"],
[style*="764ba2"],
[style*="#667eea"],
[style*="#764ba2"] {
    background: linear-gradient(135deg, #0d47a1 0%, #093290 100%) !important;
}

/* 橙色主题修正 */
[style*="ff6b35"],
[style*="f57c00"],
[style*="#ff6b35"],
[style*="#f57c00"] {
    background: linear-gradient(135deg, #0d47a1 0%, #093290 100%) !important;
    color: white !important;
}

/* 绿色主题保留给下载/成功按钮 */

/* ========== 复选框/单选框蓝色主题 ========== */
input[type="checkbox"]:checked,
input[type="radio"]:checked {
    accent-color: #0d47a1;
}

/* ========== 表单控件焦点状态 ========== */
input:focus,
textarea:focus,
select:focus {
    border-color: #0d47a1 !important;
    box-shadow: 0 0 0 3px rgba(13, 71, 161, 0.1) !important;
    outline: none !important;
}

/* ========== 滑块/范围控件 ========== */
input[type="range"] {
    accent-color: #0d47a1;
}

input[type="range"]::-webkit-slider-thumb {
    background: #0d47a1;
}

input[type="range"]::-moz-range-thumb {
    background: #0d47a1;
}

/* ========== 链接颜色 ========== */
a {
    color: #0d47a1;
}

a:hover {
    color: #093290;
}

/* ========== 按钮统一样式 ========== */
/* 主要按钮 */
.btn-primary,
.tool-btn:not(.tool-btn-secondary),
.generate-btn,
.convert-btn,
.search-btn,
.translate-btn,
.submit-btn,
button[type="submit"]:not(.tool-btn-secondary) {
    background: linear-gradient(135deg, #0d47a1 0%, #093290 100%) !important;
    color: white !important;
    border: none !important;
}

.btn-primary:hover,
.tool-btn:not(.tool-btn-secondary):hover,
.generate-btn:hover,
.convert-btn:hover,
.search-btn:hover,
.translate-btn:hover,
.submit-btn:hover,
button[type="submit"]:not(.tool-btn-secondary):hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 71, 161, 0.4) !important;
}

/* 次要/刷新按钮 */
.btn-secondary,
.refresh-btn,
.clear-btn,
.reset-btn {
    background: #f8f9fa !important;
    color: #666 !important;
    border: 2px solid #e0e0e0 !important;
}

.btn-secondary:hover,
.refresh-btn:hover,
.clear-btn:hover,
.reset-btn:hover {
    background: white !important;
    border-color: #0d47a1 !important;
    color: #0d47a1 !important;
}

/* ========== 邮箱/密码等工具特殊覆盖 ========== */
.email-display {
    background: linear-gradient(135deg, #0d47a1 0%, #093290 100%) !important;
}

.password-display,
.result-display {
    background: #f8f9fa !important;
    border: 2px solid #e0e7ff !important;
    border-radius: 8px;
}

/* ========== 移动端适配 ========== */
@media (max-width: 768px) {
    .main-with-sidebar { margin-left: 0; }
    .tool-page { padding: 20px 15px; }
    .tool-header h1,
    .tool-header-blue h1 { font-size: 22px; }
    .tool-header-blue { padding: 25px 15px; }
    .tool-container { padding: 20px 15px; }
    
    .size-selector,
    .option-selector { 
        flex-wrap: wrap; 
    }
    
    .size-btn,
    .option-btn { 
        flex: 1 1 45%; 
    }
    
    .platform-tabs { gap: 8px; }
    .platform-tab { 
        padding: 8px 16px; 
        font-size: 13px; 
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
    }
}

