/* ===============================================================
 * tool-common.css - 工具页面通用样式表
 * 所有 /Tool/* 页面共享的基础样式，避免在每个页面内重复定义
 * =============================================================== */

/* 工具容器 */
.tool-container {
    max-width: 1400px;
    width: 95%;
    margin: 120px auto 60px;
    background: rgba(25, 25, 35, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px;
    color: white;
}

/* 工具标题（绿→蓝渐变，大多数工具使用）*/
.tool-title {
    text-align: center;
    margin-bottom: 8px;
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 工具副标题 */
.subtitle {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 30px;
    font-size: 0.95rem;
}

/* 内容面板 */
.panel {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.panel-title {
    font-size: 1.1rem;
    color: #3b82f6;
    margin-bottom: 20px;
    font-weight: 600;
}

/* 表单分组 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
}

/* 输入框容器 */
.input-grp {
    display: flex;
    align-items: stretch;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    transition: 0.3s;
}

.input-grp:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.input-grp input,
.input-grp select,
.input-grp textarea {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 15px;
    color: white;
    font-size: 1.05rem;
    outline: none;
    width: 100%;
}

/* 全局下拉框选项修复：深色背景以防止浏览器原生的浅色背景与白色字体冲突 */
.tool-container select option,
.input-grp select option {
    background-color: #1e1e2f !important;
    color: white !important;
}

/* 通用按钮 - 蓝色 */
.btn-tool {
    width: 100%;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    font-weight: 600;
}

.btn-tool:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

/* 通用按钮 - 绿色（主动作） */
.btn-tool-green {
    width: 100%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    font-weight: 600;
}

.btn-tool-green:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

/* 文本区域 */
textarea.tool-textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 20px;
    color: #e2e8f0;
    font-family: 'Fira Code', monospace;
    font-size: 1.1rem;
    resize: vertical;
    outline: none;
    line-height: 1.8;
}

textarea.tool-textarea:focus {
    border-color: #3b82f6;
}

/* 上传/拖放区域 */
.upload-zone {
    width: 100%;
    min-height: 200px;
    border: 2px dashed rgba(59, 130, 246, 0.4);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(0, 0, 0, 0.2);
    gap: 15px;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
    transform: scale(1.01);
}

/* 响应式断点 - 双列布局 */
@media (max-width: 768px) {
    .tool-container {
        margin: 80px auto 40px;
        padding: 20px;
    }

    .layout-grid,
    .split-layout {
        grid-template-columns: 1fr !important;
    }
}