/* style.css - 字数统计工具样式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: #f8f9fa;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    padding: 1.5rem;
    margin: 0;
}
.navbar{
	height:80px !important;
}

.word-counter-container {
    max-width: 1400px;
    width: 100%;
    background: #ffffff;
    border-radius: 2rem;
    padding: 2rem;
    box-shadow: 0 5px 15px 2px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.05);
}


h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    background-clip: text;
    color: #333;
    text-align: center;
}

.sub {
    text-align: center;
    color: #6b7280;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}


.main-layout {
    display: flex;
    gap: 2rem;
    align-items: stretch;
}

/* 左侧统计面板 */
.stats-panel {
    flex: 0 0 30%;
    min-width: 240px;
    background: #f8f9fa;
    border-radius: 1.5rem;
    padding: 1.5rem;
    border: 1px solid #e9edf4;
}

.stats-panel .stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px solid #e9edf4;
    font-size: 0.95rem;
}

.stats-panel .stat-item:last-child {
    border-bottom: none;
}

.stats-panel .stat-label {
    color: #475569;
    font-weight: 500;
}

.stats-panel .stat-value {
    color: #0b1a33;
    font-weight: 600;
    font-size: 1.1rem;
    background: #ffffff;
    padding: 0.1rem 0.8rem;
    border-radius: 20px;
    min-width: 40px;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.stats-panel .stat-value.highlight {
    background: #0D6EFD;
    color: white;
    border-color: #0D6EFD;
}

.stats-panel .stat-title {
    font-weight: 600;
    color: #0b1a33;
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
    border-bottom: 2px solid #0D6EFD;
    padding-bottom: 0.3rem;
    display: inline-block;
}

.stats-panel .category-title {
    font-weight: 600;
    color: #0b1a33;
    margin: 0.8rem 0 0.3rem 0;
    font-size: 0.95rem;
    border-bottom: 1px dashed #dce2ec;
    padding-bottom: 0.2rem;
}

/* 右侧输入区域 */
.input-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.input-panel .toolbar {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.8rem;
    flex-wrap: wrap;
	
}


.input-panel .toolbar button {
    background: #f1f4f9;
    border: 1px solid #dce2ec;
    color: #1e293b;
    padding: 0.4rem 1rem;
    border-radius: 2rem;
    cursor: pointer;
    font-size: 0.85rem;
    transition: 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 500;
}

.input-panel .toolbar button:hover {
    background: #e9edf4;
    border-color: #0D6EFD;
    color: #0D6EFD;
}

.input-panel .toolbar button.btn-primary-custom {
    background: #0D6EFD;
    border-color: #0D6EFD;
    color: white;
}

.input-panel .toolbar button.btn-primary-custom:hover {
    background: #0b5ed7;
    border-color: #0b5ed7;
    color: white;
}

.input-panel textarea {
    width: 100%;
    height: 500px;
    padding: 1.2rem;
    border: 2px solid #dce2ec;
    border-radius: 1.2rem;
    font-size: 1rem;
    font-family: 'JetBrains Mono', 'Fira Code', monospace, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    line-height: 1.8;
    resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fafbfc;
    color: #0b1a33;
}

.input-panel textarea:focus {
    outline: none;
    border-color: #0D6EFD;
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.1);
    background: #ffffff;
}

.input-panel textarea::placeholder {
    color: #94a3b8;
}

#clearBtn{
	color:#D9001B;
}

/* 统计摘要行（移动端友好） */
.stats-summary {
    display: none;
    background: #f8f9fa;
    border-radius: 1rem;
    padding: 1rem;
    margin-top: 1rem;
    border: 1px solid #e9edf4;
}

.stats-summary .summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
}

.stats-summary .summary-item {
    display: flex;
    justify-content: space-between;
    padding: 0.3rem 0.5rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9edf4;
    font-size: 0.85rem;
}

.stats-summary .summary-item .label {
    color: #475569;
}

.stats-summary .summary-item .value {
    font-weight: 600;
    color: #0b1a33;
}

/* 响应式 */
@media (max-width: 820px) {
    .main-layout {
        flex-direction: column-reverse;
    }

    .stats-panel {
        flex: 1;
        min-width: unset;
    }

    .stats-summary {
        display: block;
    }

    .input-panel textarea {
        height: 280px;
    }

    .header .subtitle {
        display: none;
    }
}

@media (max-width: 500px) {
    .word-counter-container {
        padding: 1rem;
    }
    .stats-panel {
        padding: 1rem;
    }
    .input-panel textarea {
        height: 200px;
        padding: 0.8rem;
        font-size: 0.9rem;
    }
}
