/* 自定义工业字体 Endfield，Cloudflare根路径加载 */
@font-face {
    font-family: "Endfield";
    src: url("/fonts/EndfieldByButan.ttf") format("truetype");
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* 字体选择下拉容器布局 */
.font-select-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 主标题字体基础通用类 */
.endfield-font {
    font-family: "Endfield", sans-serif;
    font-weight: 900;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    text-shadow: 1px 0 #000, -1px 0 #000, 0 1px #000, 0 -1px #000;
    font-stretch: condensed;
}

/* 副标题字体通用类 */
.ark-subtitle {
    font-family: sans-serif;
    letter-spacing: 0.6em;
    font-weight: 400;
    text-transform: uppercase;
}

/* 全局页面背景 工业深色渐变 */
body {
    background:
        radial-gradient(circle at 10% 10%, rgba(255,255,255,0.08) 0%, transparent 8%),
        linear-gradient(135deg, #111113 0%, #1c1c1f 45%, #111113 100%);
    color: #e0e0e0;
    background-attachment: fixed;
    min-height: 100vh;
    margin: 0;
}

/* 控制面板金属卡片面板 */
.card-panel {
    position: relative;
    background: linear-gradient(135deg, #2a2a2e 0%, #1f1f23 50%, #2a2a2e 100%);
    border: 1px solid #4a4a52;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.05),
        inset 0 -1px 0 rgba(0,0,0,0.15),
        0 8px 25px rgba(0,0,0,0.45);
    overflow: hidden;
}
/* 卡片顶部金色装饰条 */
.card-panel::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #f5b50a, transparent);
    opacity: 0.7;
}
/* 卡片右下角暗纹装饰 */
.card-panel::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, transparent 50%, rgba(245,181,10,0.04) 50%);
    pointer-events: none;
}

/* 通用机械风格按钮 */
.industrial-btn {
    position: relative;
    background: linear-gradient(180deg, #4a4a52 0%, #2e2e35 100%);
    border: 1px solid #6e6e76;
    color: #e0e0e0;
    transition: all 0.22s ease;
    text-shadow: 0 1px 0 rgba(0,0,0,0.35);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 2px 6px rgba(0,0,0,0.35);
}
.industrial-btn:hover {
    background: linear-gradient(180deg, #5a5a62 0%, #3e3e45 100%);
    border-color: #f5b50a;
    color: #ffffff;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.12),
        0 0 0 1px rgba(245,181,10,0.25),
        0 4px 12px rgba(0,0,0,0.45);
}
.industrial-btn:active {
    transform: translateY(1px);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.35), 0 1px 3px rgba(0,0,0,0.25);
}
/* 激活状态比例按钮高亮 */
.ratio-btn.active {
    border-color: #f5b50a;
    box-shadow: 0 0 6px rgba(245,181,10,0.4);
}

/* 预览画布网格背板 */
#exportCanvas {
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 0 auto;
    background-image:
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 24px 24px;
}
#exportCanvas::before {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(45deg, transparent, transparent 12px, rgba(245,181,10,0.018) 12px, rgba(245,181,10,0.018) 24px);
    pointer-events: none;
}
#exportCanvas::after {
    content: "";
    position: absolute;
    left: 16px;
    top: 16px;
    right: 16px;
    bottom: 16px;
    border: 1px solid rgba(255,255,255,0.06);
    pointer-events: none;
}

/* 表单输入框统一深色工业样式 */
input[type="text"],
input[type="range"],
input[type="color"],
select {
    background: linear-gradient(135deg, #2a2a2e 0%, #1e1e22 100%);
    border: 1px solid #4a4a52;
    color: #e0e0e0;
    outline: none;
    border-radius: 4px;
}
input:focus, select:focus {
    border-color: #f5b50a;
    box-shadow: 0 0 0 1px rgba(245,181,10,0.35);
}

/* 红色导出按钮特殊样式 */
#downloadBtn {
    border: 1px solid #a82020 !important;
    background: linear-gradient(180deg, #b82626 0%, #701515 100%) !important;
}
#downloadBtn:hover {
    border-color: #ff3636 !important;
    box-shadow: 0 0 10px rgba(255,50,50,0.4), inset 0 1px 0 rgba(255,255,255,0.15) !important;
}
#downloadBtn:active {
    background: linear-gradient(180deg, #941e1e 0%, #581010 100%) !important;
}

/* 页面顶部标题装饰条纹 */
.page-title {
    position: relative;
    padding-top: 12px;
}
.page-title::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
    height: 4px;
    background: repeating-linear-gradient(90deg, #f5b50a 0 8px, #111 8px 16px);
}