/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    background-color: #f8f9fa;
    padding-bottom: 80px; /* 为底部操作按钮预留空间 */
}

.navbar{
	height:80px !important;
}

/* 主容器卡片 */
.container1 {
	
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    background: white;
    border-radius: 32px;
    box-shadow: 0 5px 15px 2px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.2s ease;
	margin-top:40px;
}

/* 内边距统一，移动端舒适 */
.card-padding {
    padding: 28px 24px;
}

/* 头部区域 */
.input-section {
	
    background: #ffffff;
    border-bottom: 1px solid #eef2f6;
}

.label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #1e293b;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.label svg {
    opacity: 0.7;
}

.number-input-wrapper {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
    padding: 4px 12px;
}

.number-input-wrapper:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.2);
    background: white;
}

.currency-symbol {
    font-size: 1.4rem;
    font-weight: 500;
    color: #475569;
    padding-right: 8px;
}

#numberInput {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1.5rem;
    font-weight: 500;
    padding: 14px 0;
    outline: none;
    font-family: 'Courier New', 'SF Mono', monospace;
    color: #0f172a;
    width: 100%;
	text-align:center;
}

#numberInput::placeholder {
    font-size: 1rem;
    font-weight: 400;
    color: #94a3b8;
    font-family: system-ui;
}

/* 大写结果显示区域 */
.result-section {
    background: #fefce8;
    border-bottom: 1px solid #fde047;
}

.result-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #a16207;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px;
}

.amount-box {
    background: #ffffffd9;
    border-radius: 24px;
    padding: 20px 18px;
    box-shadow: inset 0 1px 2px #00000008, 0 4px 12px rgba(0,0,0,0.02);
    border: 1px solid #fef3c7;
    word-break: break-word;
	text-align:center;
}

.uppercase-amount {
    font-size: 1.35rem;
    line-height: 1.5;
    font-weight: 600;
    color: #334155;
    font-family: 'SF Mono', 'Courier New', monospace;
    letter-spacing: 0.5px;
}

/* 修改这里 - 让按钮水平居中 */
.copy-btn {
    background: #3b82f6;
    border: none;
    padding: 8px 18px;
    border-radius: 40px;
    color: white;
    font-weight: 500;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    margin: 20px auto 0 auto;  /* 上边距20px，左右自动居中，下边距0 */
    width: fit-content;  /* 宽度根据内容自适应 */
}

.copy-btn:hover {
    background: #2563eb;
    transform: scale(0.97);
}

.copy-btn:active {
    background: #1d4ed8;
}

.copy-feedback {
    font-size: 0.75rem;
    color: #16a34a;
    font-weight: 500;
    background: #dcfce7;
    padding: 4px 12px;
    border-radius: 30px;
    display: inline-block;
}

/* 超大汉字网格区 */
.glyph-grid-section {
    background: #ffffff;
    padding: 20px 24px 32px;
}

.section-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: #475569;
    margin-bottom: 20px;
    letter-spacing: 0.3px;
    border-left: 4px solid #3b82f6;
    padding-left: 12px;
}

/* 网格布局: PC默认一行5个，移动端自适应flex换行，每个方块独立 */
.number-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 12px;
    justify-content: flex-start;
}

/* 每个汉字块超大字体，块状背景 */
.grid-item {
    background: #f1f5f9;
    border-radius: 24px;
    padding: 16px 8px;
    text-align: center;
    min-width: 70px;
    flex: 0 0 auto;
    width: calc(20% - 12px);  /* 默认一行5个 (100% / 5 - gap调整) */
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
    border: 1px solid #e2e8f0;
}

/* 超大字体 */
.grid-char {
    font-size: 2.4rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: 2px;
    display: block;
    line-height: 1.2;
}

/* 移动端适配: 当屏幕宽度小于 640px 时，每个块自适应，但一行尽量显示3~4个，更美观，且字号略调 */
@media (max-width: 640px) {
    body {
        padding: 16px 12px 32px;
    }
    .card-padding {
        padding: 20px 18px;
    }
    .grid-item {
        width: calc(33.333% - 10px); /* 移动端一行3个，舒服 */
        min-width: 70px;
    }
    .grid-char {
        font-size: 2rem;
    }
    .uppercase-amount {
        font-size: 1.1rem;
    }
    #numberInput {
        font-size: 1.2rem;
    }
    .currency-symbol {
        font-size: 1.2rem;
    }
    .copy-btn {
        margin: 16px auto 0 auto;  /* 移动端稍微减小上边距 */
    }
}

/* 针对超小设备进一步优化 */
@media (max-width: 480px) {
    .grid-item {
        width: calc(33.333% - 10px);
        padding: 12px 4px;
    }
    .grid-char {
        font-size: 1.8rem;
    }
}

/* PC端大屏幕确保严格每行5个 */
@media (min-width: 641px) {
    .grid-item {
        width: calc(20% - 12px);
    }
}

/* 点击复制临时反馈动画 */
.copy-flash {
    background-color: #bbf7d0;
    transition: 0.1s;
}

footer {
    font-size: 0.7rem;
    text-align: center;
    color: #94a3b8;
    border-top: 1px solid #eef2f6;
    padding: 16px 24px;
    background: #fafcff;
}

.error-msg {
    color: #dc2626;
    font-size: 0.75rem;
    margin-top: 6px;
    padding-left: 8px;
}

/* 大写规范说明区域样式 */
.spec-section {
    background: #f8fafc;
    border-radius: 24px;
    margin-top: 16px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.spec-section .section-title {
    background: #f1f5f9;
    margin: 0;
    padding: 16px 24px;
    border-bottom: 1px solid #e2e8f0;
    border-left: 4px solid #3b82f6;
    font-size: 1rem;
    font-weight: 600;
}

.spec-content {
    padding: 20px 24px;
}

.spec-intro {
    background: #eef2ff;
    padding: 14px 18px;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #1e293b;
    margin-bottom: 20px;
    border-left: 3px solid #3b82f6;
}

.spec-block {
    margin-bottom: 24px;
}

.spec-block h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 10px;
    padding-left: 8px;
    border-left: 3px solid #3b82f6;
}

.spec-block p {
    font-size: 0.88rem;
    line-height: 1.6;
    color: #334155;
    margin-bottom: 8px;
}

.spec-block ul {
    margin-left: 20px;
    font-size: 0.88rem;
    line-height: 1.7;
    color: #334155;
}

.spec-block li {
    margin-bottom: 6px;
}

.highlight {
    background: #fef3c7;
    padding: 2px 6px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.85rem;
}

.case-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.case-item {
    background: #ffffff;
    border-radius: 12px;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    font-size: 0.85rem;
    line-height: 1.5;
}

.case-label {
    font-weight: 700;
    color: #3b82f6;
    margin-right: 8px;
}

.case-desc {
    color: #1e293b;
}

.case-note {
    display: block;
    margin-top: 6px;
    font-size: 0.75rem;
    color: #64748b;
    padding-left: 24px;
}

.warning-note {
    background: #fef2e8;
    border-left: 3px solid #f97316;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.82rem;
    color: #9a3412;
    margin-top: 12px;
}

/* 移动端适配 */
@media (max-width: 640px) {
    .spec-content {
        padding: 16px;
    }
    
    .spec-intro {
        padding: 12px 14px;
        font-size: 0.85rem;
    }
    
    .spec-block h4 {
        font-size: 0.88rem;
    }
    
    .spec-block p, .spec-block ul {
        font-size: 0.82rem;
    }
    
    .case-item {
        padding: 10px 12px;
    }
}