@charset "UTF-8";
/* =============================================
   糊涂记｜工具集合公共样式 tool-common.css
============================================= */
*{
    margin:0;padding:0;box-sizing:border-box;font-family:system-ui,-apple-system,sans-serif;
    -webkit-touch-callout: none;
    touch-action: manipulation;
}
body{
    background:#f8f9fa;
    color:#222;
    padding:10px 12px;
    line-height:1.5;
}
.container{
    max-width:660px;
    margin:0 auto;
    padding:10px 0;
}
.head{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:16px;
    gap:12px;
    flex-wrap:wrap;
}
.head h1{
    font-size:22px;
    font-weight:600;
}
.head-link-group{
    display:flex;
    gap:14px;
}
.back{
    color:#009670;
    text-decoration:none;
    font-size:14px;
}
.card{
    background:#fff;
    border-radius:16px;
    padding:16px;
    box-shadow:0 4px 20px rgba(0,0,0,0.08);
    margin-bottom:14px;
}
.desc{
    color:#666;
    font-size:14px;
    margin-bottom:18px;
    text-align:center;
}
.form-item{
    margin-bottom:16px;
}
.form-label{
    display:block;
    font-size:14px;
    color:#444;
    margin-bottom:6px;
    font-weight:500;
}
.form-input{
    width:100%;
    border:1px solid #ddd;
    border-radius:10px;
    padding:12px 14px;
    font-size:15px;
    outline:none;
    transition:0.15s;
}
.form-input:focus{
    border-color:#009670;
    box-shadow:0 0 0 2px rgba(0,150,112,0.15);
}
.form-row{
    display:flex;
    gap:12px;
    flex-wrap:wrap;
    margin-bottom:20px;
}
.form-col{
    flex:1;
    min-width:140px;
}
.form-select{
    width:100%;
    border:1px solid #ddd;
    border-radius:10px;
    padding:12px 14px;
    font-size:15px;
    outline:none;
    background:#fff;
}
.form-textarea{
    width:100%;
    border:1px solid #ddd;
    border-radius:10px;
    padding:12px 14px;
    font-size:14px;
    outline:none;
    transition:0.15s;
    min-height:140px;
    resize: vertical;
    font-family:Consolas,Monaco,monospace;
}
.form-textarea:focus{
    border-color:#009670;
    box-shadow:0 0 0 2px rgba(0,150,112,0.15);
}

.result-box{
    background:#f8f9fa;
    border-radius:12px;
    padding:14px;
    border:1px solid #eee;
}
.result-text{
    font-size:14px;
    color:#222;
    white-space: pre-wrap;
    line-height:1.6;
    user-select:text;
    font-family:Consolas,Monaco,monospace;
    min-height:80px;
}
.error-text{
    color:#d03030;
}
.btn-row{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    margin-bottom:18px;
    justify-content:center;
}
.btn-row.top-space{
    margin-top:8px;
}
.btn {
    padding: 10px 18px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(145deg, #009670, #007a5c);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 3px 8px rgba(0, 150, 112, 0.2);
    transition: 0.15s ease;
    user-select: none;
}
.btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 150, 112, 0.2);
}
.btn-gray {
    background: linear-gradient(145deg, #666, #444);
    box-shadow: 0 3px 8px rgba(102, 102, 102, 0.2);
}
.btn-gray:active {
    background: linear-gradient(145deg, #444, #666);
}
.tip-text{
    text-align:center;
    margin-top:14px;
    font-size:14px;
    color:#009670;
    min-height:20px;
}

@media (max-width:520px){
    .card{padding:14px 12px;}
    .btn-row{justify-content:center;}
}


/* ====== 【二维码生成】tool/qrcode 私有样式 ====== */
.qrcode-box{
    background:#f8f9fa;
    border-radius:12px;
    padding:20px;
    border:1px solid #eee;
    text-align:center;
    min-height:140px;
    display:flex;
    align-items:center;
    justify-content:center;
}


/* ====== 【简易计算器】tool/calc 私有样式 ====== */
.calc-wrap{max-width:400px;margin:0 auto;}
.calc-display{
    background:#f8f9fa;
    border-radius:12px;
    padding:14px;
    border:1px solid #eee;
    margin-bottom:14px;
}
.calc-exp{
    min-height:22px;
    font-size:13px;
    color:#666;
    text-align:right;
    word-break:break-all;
}
.calc-input{
    width:100%;
    border:none;
    background:transparent;
    text-align:right;
    font-size:26px;
    font-weight:500;
    outline:none;
    padding:4px 0;
    user-select:text;
}
.calc-history{
    max-height:120px;
    overflow-y:auto;
    margin-bottom:12px;
    background:#f8f9fa;
    border-radius:10px;
    padding:10px;
    border:1px solid #eee;
}
.history-item{
    text-align:right;
    font-size:13px;
    padding:3px 0;
    color:#444;
    cursor:pointer;
}
.history-item:hover{color:#009670;}

.btn-grid{
    display:grid;
    grid-template-columns: repeat(4,1fr);
    gap:8px;
}
.calc-btn{
    height:46px;
    border:none;
    border-radius:10px;
    font-size:16px;
    cursor:pointer;
    transition:0.12s;
    user-select:none;
}
.calc-btn:active{transform:scale(0.96);}
.btn-num{background:#f1f1f1;color:#222;}
.btn-op{background:linear-gradient(145deg,#009670,#007a5c);color:#fff;}
.btn-clear{background:#d03030;color:#fff;}

@media (max-width:520px){
    .calc-btn{height:42px;font-size:15px;}
}


/* ====== 【时间戳转换】tool/timestamp 私有样式 ====== */
.ts-row{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
}
.ts-col{
    flex:1;
    min-width:180px;
}


/* ====== 【JSON工具箱】tool/json 私有样式 ====== */
.json-textarea{
    min-height:220px;
    resize:vertical;
    font-family:Consolas,Monaco,monospace;
}
.json-error{
    color:#d03030;
    text-align:left;
    word-break:break-all;
}
.json-result-box{
    background:#f8f9fa;
    border-radius:12px;
    padding:14px;
    border:1px solid #eee;
    margin-top:12px;
}
.json-result-text{
    font-family:Consolas,Monaco,monospace;
    font-size:14px;
    white-space:pre-wrap;
    line-height:1.6;
    min-height:80px;
}

/* ====== 【工具首页 tool.html 私有样式｜原始版本】 ====== */
.tool-list{
    display:grid;
    grid-template-columns: repeat(auto-fill, minmax(140px,1fr));
    gap:12px;
}
.tool-card{
    display:block;
    text-decoration:none;
    background:linear-gradient(145deg,#ffffff,#f7f7f7);
    border-radius:14px;
    padding:16px 12px;
    text-align:center;
    box-shadow:0 2px 10px rgba(0,0,0,0.06);
    transition:0.18s ease;
    border:1px solid #efefef;
}
.tool-card:active{
    transform:translateY(2px);
    box-shadow:0 1px 4px rgba(0,0,0,0.06);
}
.tool-icon{
    font-size:32px;
    margin-bottom:8px;
}
.tool-name{
    font-size:15px;
    font-weight:600;
    color:#222;
    margin-bottom:4px;
}
.tool-sub{
    font-size:12px;color:#777;
}
.blank-tip{
    text-align:center;color:#999;padding:30px 0;font-size:14px;
}
@media (max-width:520px){
    .tool-list{
        grid-template-columns: repeat(2,1fr);
    }
}