/*===========================================================
  全直角 · 纯黑图标 · 零表情 · 高级复杂工业风格
  GTA SA 黑色控制台 · 多层边框 · 信息密集
===========================================================*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
    font-weight: 300;
}

html, body {
    width: 100%;
    min-height: 100vh;
    background-color: #e9ecee; /* 冷灰基底 */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow-x: hidden;
}

/* 主容器 – 全直角，宽边界内收，多层结构 */
.container {
    width: 100%;
    max-width: 480px;
    background-color: #ffffff;
    min-height: 100vh;
    padding: 20px 16px 36px 16px;
    margin: 0 auto;
    border-left: 0.5px solid #b0b6bb;
    border-right: 0.5px solid #b0b6bb;
    box-shadow: 0 0 0 0.5px #d0d4d8 inset; /* 内嵌细线 */
}

/*-------- 全局直角重置（强制所有元素无圆角）--------*/
.container,
.game-tag,
.file-section,
.file-picker,
.file-pick-btn,
.file-name,
.history-section,
.history-header,
.history-clear,
.history-list,
.history-item,
.history-use,
.convert-section,
.convert-btn,
.divider,
.cpu-section,
.chip-grid,
.chip,
.detect-wrapper,
.detect-btn,
.toast-message,
.progress-track,
.progress-fill,
.scan-line,
.success-icon,
.footer-note,
.meta-tag,
.meta-item,
.option-modal,
.option-btn {
    border-radius: 0px !important;
}

/*-------- 纯黑SVG图标系统（完全取代表情符号）--------*/
.icon-black {
    display: inline-block;
    width: 14px;
    height: 14px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    filter: brightness(0); /* 强制纯黑 */
    flex-shrink: 0;
}
.icon-folder { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M1 3v10h14V4H8L7 3H1z" fill="black"/></svg>'); }
.icon-file { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M2 2v12h12V5h-4V2H2z" fill="black"/></svg>'); }
.icon-format { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M3 2v12h10V2H3zm2 2h6v1H5V4zm0 2h6v1H5V6zm0 2h4v1H5V8z" fill="black"/></svg>'); }
.icon-cpu { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M2 2v12h12V2H2zm2 2h8v8H4V4zm2 2v4h4V6H6z" fill="black"/></svg>'); }
.icon-history { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M8 2v6h4v1H7V2h1z M3 4v8h10V8h-1v3H4V5h3V4H3z" fill="black"/></svg>'); }
.icon-clear { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M3 4v1h1v7h8V5h1V4H3zm3 2h1v5H6V6zm3 0h1v5H9V6z" fill="black"/></svg>'); }
.icon-detect { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M8 3L3 7v4l5 4 5-4V7L8 3zm0 2l3 2.25V10L8 13l-3-3V7.25L8 5z" fill="black"/></svg>'); }
.icon-check { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><polygon points="14,3 6,11 2,7 3,6 6,9 13,2" fill="black"/></svg>'); }
.icon-arrow { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M6 4v2h4V4H6z M5 7v2h6V7H5z M4 10v2h8v-2H4z" fill="black"/></svg>'); }
.icon-scan { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M2 2v3h1V3h3V2H2zm8 0v1h3v2h1V2h-4zm-8 9v3h3v-1H3v-2H2zm11 0v2h-2v1h3v-3h-1z" fill="black"/></svg>'); }
.icon-grid { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M2 2h3v3H2V2zm4 0h3v3H6V2zm4 0h3v3h-3V2zM2 6h3v3H2V6zm4 0h3v3H6V6zm4 0h3v3h-3V6zM2 10h3v3H2v-3zm4 0h3v3H6v-3zm4 0h3v3h-3v-3z" fill="black"/></svg>'); }

/*-------- 头部 – 完全直角，黑色标识 --------*/
.game-tag {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #4d565c;
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 0.5px solid #b6bdc2;
    font-weight: 350;
}
.tag-left {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #edf0f2;
    padding: 4px 12px;
    border: 0.5px solid #9ea5aa;
}

/*-------- 文件区块 – 多重边框，直角，密集信息 --------*/
.file-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
    width: 100%;
    position: relative;
    border: 0.5px solid #c2c8cd;
    padding: 16px 14px;
    background: #fcfdfd;
}
.file-section::after {
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    border: 0.5px solid #dee3e6;
    pointer-events: none;
}

.file-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #2d353b;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 4px;
}

.file-picker {
    display: flex;
    align-items: center;
    background-color: #f4f7f9;
    border: 0.5px solid #aab1b6;
    padding: 4px 4px 4px 16px;
    width: 100%;
}

.file-input {
    display: none;
}

.file-pick-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    padding: 8px 18px;
    background-color: #e9edf0;
    border: 0.5px solid #929ba1;
    color: #1f282e;
    cursor: pointer;
    font-weight: 350;
    line-height: 1;
    flex-shrink: 0;
    letter-spacing: 0.6px;
}
.file-pick-btn:active {
    background-color: #d3dadf;
}

.file-name {
    flex: 1;
    font-size: 11px;
    color: #3e484f;
    margin-left: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'SF Mono', monospace;
}

/*-------- 历史记录 – 高级复杂，纯黑图标 --------*/
.history-section {
    margin-top: 12px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border: 0.5px solid #cfd6db;
    padding: 14px 12px;
    background: #f9fbfc;
    position: relative;
}

.history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 10px;
    color: #4f5a61;
    padding: 0 2px;
    text-transform: uppercase;
}

.history-clear {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 9px;
    color: #3a444b;
    padding: 6px 14px;
    background-color: #e6ebee;
    border: 0.5px solid #9ca3a9;
    cursor: pointer;
    letter-spacing: 0.8px;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
    background-color: #ffffff;
    border: 0.5px solid #d4dce0;
    margin-top: 4px;
}

.history-list.show {
    max-height: 200px;
    overflow-y: auto;
    padding: 10px;
}

.history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 10px;
    padding: 10px 12px;
    background-color: #f6f9fb;
    border: 0.5px solid #ccd3d8;
    color: #2c353c;
}

.history-item span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
    font-family: monospace;
}

.history-use {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 9px;
    padding: 5px 14px;
    background-color: #e2e7eb;
    border: 0.5px solid #919ba2;
    color: #232b31;
    cursor: pointer;
    letter-spacing: 0.5px;
}

/*-------- 改格式按钮 – 全直角，黑块，长条形 --------*/
.convert-section {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
    margin-top: 12px;
    width: 100%;
}

.convert-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background-color: #1d2429;
    border: 0.5px solid #4d595f;
    padding: 14px 0;
    width: 94%;
    max-width: 360px;
    font-size: 12px;
    color: #f0f3f5;
    font-weight: 330;
    letter-spacing: 2.2px;
    cursor: pointer;
    line-height: 1.2;
    text-align: center;
    text-transform: uppercase;
}
.convert-btn:active {
    background-color: #303b43;
}

.divider {
    height: 0.5px;
    background-color: #c9d0d4;
    margin: 20px 0 20px 0;
    width: 100%;
}

/*-------- CPU区域 – 直角，黑标芯片，复杂细节 --------*/
.cpu-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    border: 0.5px solid #c8cfd4;
    padding: 18px 16px;
    background: #fbfdfe;
    position: relative;
}

.section-caption {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #333d44;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    background: #edf1f4;
    padding: 6px 14px;
    border: 0.5px solid #a7afb5;
    width: fit-content;
}

.chip-grid {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.chip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: #f4f8fa;
    border: 0.5px solid #9aa1a7;
    padding: 8px 22px;
    font-size: 11px;
    color: #2b343b;
    font-weight: 330;
    cursor: pointer;
    transition: none;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.chip:active {
    background-color: #d5dce1;
}
.chip.selected {
    background-color: #2d353c;
    border-color: #0f1316;
    color: #ffffff;
}
.chip.selected .icon-black {
    filter: brightness(10); /* 选中时图标变白 */
}

.selected-hint {
    font-size: 10px;
    color: #707b83;
    margin-left: 4px;
    font-weight: 320;
    display: flex;
    align-items: center;
    gap: 6px;
}

/*-------- 检测按钮 – 全直角，黑标 --------*/
.detect-wrapper {
    margin-top: 16px;
    display: flex;
    align-items: center;
    width: 100%;
}

.detect-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: #eef2f5;
    border: 0.5px solid #8e979e;
    padding: 12px 28px;
    font-size: 11px;
    color: #20282e;
    font-weight: 330;
    cursor: pointer;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}
.detect-btn:active {
    background-color: #d3dbe0;
}

/*-------- 反馈层 – 全直角，贴顶，纯黑进度 --------*/
.toast-message {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100vw;
    background-color: #f9fbfd;
    border-bottom: 0.5px solid #8f989f;
    padding: 18px 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 14px;
    color: #20282e;
    font-size: 12px;
    font-weight: 320;
    z-index: 1500;
    transform: translateY(-100%);
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 6px 10px rgba(0,0,0,0.01);
}
.toast-visible {
    transform: translateY(0) !important;
}

.format-progress, .detect-progress {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 12px;
}
.progress-header {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 12px;
}
.progress-track {
    width: 100%;
    height: 4px;
    background-color: #d7dee2;
    border: 0.2px solid #949ea5;
    overflow: hidden;
}
.progress-fill {
    width: 0%;
    height: 4px;
    background-color: #232b31;
    animation: fill5 5s linear forwards;
}
@keyframes fill5 {
    0% { width: 0%; } 100% { width: 100%; }
}

.scan-line {
    width: 60px;
    height: 4px;
    background-color: #cdd5da;
    position: relative;
    overflow: hidden;
    border: 0.2px solid #919ba2;
}
.scan-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 40%;
    height: 4px;
    background-color: #2d373f;
    animation: scanMove 1.2s ease-in-out infinite;
}
@keyframes scanMove {
    0% { left: -40%; } 100% { left: 100%; }
}

.success-icon {
    width: 20px;
    height: 20px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><polygon points="14,3 6,11 2,7 3,6 6,9 13,2" fill="black"/></svg>');
    background-size: contain;
    filter: brightness(0);
}

/*-------- 脚注 – 直角，黑标 --------*/
.footer-note {
    margin-top: 32px;
    font-size: 8px;
    color: #939ea5;
    text-align: center;
    border-top: 0.5px solid #c9d0d5;
    padding-top: 22px;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 16px;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}

/* 附加复杂层次 */
.meta-line {
    display: flex;
    gap: 16px;
    margin-top: 12px;
    font-size: 8px;
    color: #6c7880;
    border-top: 0.5px solid #d9e0e4;
    padding-top: 14px;
}
.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #edf1f4;
    padding: 5px 12px;
    border: 0.5px solid #b5bdc3;
}