/**
 * 征兵体检BMI计算器插件 - 样式文件
 *
 * @package BMI_Calculator
 * @version 2.0.0
 */

/* ==================== 军事风格主题 ==================== */

/* 容器样式 - 军事主题 */
.bmi-calculator-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 30px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    border: 3px solid #1a252f;
    position: relative;
    overflow: hidden;
}

.bmi-calculator-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #c0392b 0%, #e74c3c 50%, #c0392b 100%);
}

/* 军事徽章 */
.military-badge {
    font-size: 3em;
    margin-bottom: 15px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* 头部样式 - 军事主题 */
.bmi-calculator-header {
    text-align: center;
    margin-bottom: 40px;
    color: #ecf0f1;
    position: relative;
    z-index: 1;
}

.bmi-calculator-header h1 {
    margin: 0 0 10px 0;
    font-size: 2.5em;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 2px;
    color: #f39c12;
    text-transform: uppercase;
}

.bmi-subtitle {
    margin: 0 0 10px 0;
    font-size: 1.3em;
    color: #3498db;
    font-weight: 600;
    letter-spacing: 1px;
}

.bmi-description {
    margin: 0;
    font-size: 1em;
    color: #bdc3c7;
    line-height: 1.6;
}

/* 主体内容 */
.bmi-calculator-body {
    background: #ecf0f1;
    padding: 40px;
    border-radius: 15px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 2px solid #7f8c8d;
}

/* 输入区域 */
.bmi-input-section {
    margin-bottom: 30px;
}

/* 性别选择 */
.gender-selection {
    margin-bottom: 30px;
}

.gender-label {
    display: block;
    margin-bottom: 15px;
    font-size: 1.2em;
    font-weight: 700;
    color: #2c3e50;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gender-buttons {
    display: flex;
    gap: 15px;
}

.gender-btn {
    flex: 1;
    padding: 20px 30px;
    border: 2px solid #95a5a6;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    font-size: 1.1em;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #7f8c8d;
}

.gender-btn:hover {
    border-color: #3498db;
    background: #e8f4f8;
    transform: translateY(-2px);
}

.gender-btn.active {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border-color: #3498db;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.gender-icon {
    font-size: 2em;
}

.gender-text {
    font-size: 1.1em;
}

/* 征兵标准信息 */
.military-standards-info {
    margin-bottom: 30px;
}

.standards-box {
    padding: 20px;
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-left: 4px solid #f39c12;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.standards-title {
    font-size: 1.2em;
    font-weight: 700;
    color: #d35400;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.standards-content {
    color: #e67e22;
    font-size: 1.1em;
    line-height: 1.8;
    font-weight: 600;
}

/* 单位切换按钮 */
.unit-toggle {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.unit-btn {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #95a5a6;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #7f8c8d;
}

.unit-btn:hover {
    border-color: #3498db;
    background: #e8f4f8;
    transform: translateY(-2px);
}

.unit-btn.active {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border-color: #2980b9;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.unit-icon {
    font-size: 1.3em;
}

/* 输入组 */
.input-group {
    margin-bottom: 25px;
}

.input-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 1.1em;
    font-weight: 700;
    color: #2c3e50;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.label-icon {
    font-size: 1.3em;
}

.input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-wrapper.hidden {
    display: none;
}

.bmi-input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #bdc3c7;
    border-radius: 10px;
    font-size: 1.1em;
    transition: all 0.3s ease;
    background: #fff;
    font-weight: 600;
}

.bmi-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    background: #fff;
}

.bmi-input.small {
    flex: 0 0 auto;
    width: 80px;
}

.input-unit {
    color: #7f8c8d;
    font-weight: 700;
    min-width: 60px;
    font-size: 1em;
}

.input-separator {
    color: #95a5a6;
    font-size: 1.5em;
    font-weight: 700;
}

/* 按钮 */
.calculate-btn, .reset-btn {
    width: 100%;
    padding: 18px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.calculate-btn {
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
    color: #fff;
    border: 2px solid #c0392b;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(192, 57, 43, 0.4);
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.calculate-btn.military-btn {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    border-color: #27ae60;
}

.calculate-btn.military-btn:hover {
    box-shadow: 0 5px 20px rgba(39, 174, 96, 0.4);
}

.reset-btn {
    background: #fff;
    color: #7f8c8d;
    border: 2px solid #95a5a6;
}

.reset-btn:hover {
    background: #f8f9fa;
    border-color: #7f8c8d;
}

.btn-icon {
    font-size: 1.3em;
}

.btn-text {
    font-size: 1em;
}

/* 结果区域 */
.bmi-result-section {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 3px solid #bdc3c7;
}

.bmi-result-section.hidden {
    display: none;
}

.bmi-result-header {
    text-align: center;
    margin-bottom: 30px;
}

.bmi-result-header h2 {
    margin: 0 0 20px 0;
    font-size: 2em;
    color: #2c3e50;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.military-result-header h2 {
    color: #c0392b;
}

.bmi-value-display {
    display: inline-block;
    padding: 25px 50px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border-radius: 15px;
    color: #f39c12;
    border: 3px solid #f39c12;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.bmi-number {
    font-size: 3.5em;
    font-weight: 700;
    display: block;
    color: #fff;
}

.bmi-label {
    font-size: 1.2em;
    opacity: 0.95;
    color: #bdc3c7;
    font-weight: 600;
}

/* 征兵体检结果 */
.military-result {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 15px;
    border: 2px solid #bdc3c7;
}

.result-badge {
    display: inline-block;
    padding: 20px 40px;
    border-radius: 50px;
    margin-bottom: 20px;
    font-size: 1.5em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
}

.result-badge.pass {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: #fff;
    box-shadow: 0 5px 20px rgba(39, 174, 96, 0.3);
}

.result-badge.fail {
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
    color: #fff;
    box-shadow: 0 5px 20px rgba(192, 57, 43, 0.3);
}

.result-icon {
    font-size: 1.5em;
    margin-right: 10px;
}

.result-text {
    font-size: 1.2em;
    font-weight: 700;
}

.result-description {
    font-size: 1.2em;
    color: #2c3e50;
    line-height: 1.8;
    font-weight: 600;
}

/* BMI类别 */
.bmi-category {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px solid #bdc3c7;
}

.category-icon {
    font-size: 2em;
    margin-right: 10px;
}

.category-text {
    font-size: 1.5em;
    font-weight: 700;
}

/* BMI范围图 */
.bmi-chart-section {
    margin: 30px 0;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px solid #bdc3c7;
}

.chart-title {
    text-align: center;
    font-size: 1.3em;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.bmi-range-bar {
    display: flex;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    border: 2px solid #7f8c8d;
}

.bmi-range-bar.military-bar {
    border-color: #34495e;
}

.range-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.9em;
    position: relative;
}

.range-item.underweight {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.range-item.normal {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
}

.range-item.overweight {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}

.range-item.obese {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.range-label {
    font-weight: 700;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.range-value {
    font-size: 0.8em;
    opacity: 0.95;
    font-weight: 600;
}

.bmi-indicator {
    position: absolute;
    top: 50%;
    width: 4px;
    height: 70px;
    background: #2c3e50;
    transform: translate(-50%, -50%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.bmi-indicator::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 12px solid #2c3e50;
}

.bmi-indicator::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 12px solid #2c3e50;
}

/* 健康建议 */
.bmi-advice {
    margin: 30px 0;
    padding: 25px;
    background: #fff3e0;
    border-left: 4px solid #f39c12;
    border-radius: 8px;
    border: 2px solid #f39c12;
}

.bmi-advice.military-advice {
    background: #e8f6f3;
    border-color: #27ae60;
    border-left-width: 4px;
}

.bmi-advice h3 {
    margin: 0 0 15px 0;
    font-size: 1.3em;
    color: #d35400;
    font-weight: 700;
}

.bmi-advice.military-advice h3 {
    color: #27ae60;
}

.advice-content {
    line-height: 1.8;
    color: #5d6d7e;
}

.advice-content strong {
    color: #2c3e50;
    font-weight: 700;
}

.advice-content ul {
    margin: 15px 0;
    padding-left: 20px;
}

.advice-content li {
    margin-bottom: 8px;
}

/* BMI说明 */
.bmi-details {
    margin-top: 30px;
    padding: 25px;
    background: #ebf5fb;
    border-radius: 10px;
    border: 2px solid #3498db;
}

.bmi-details h3 {
    margin: 0 0 15px 0;
    font-size: 1.3em;
    color: #2980b9;
    font-weight: 700;
}

.bmi-details p {
    margin-bottom: 15px;
    line-height: 1.8;
    color: #5d6d7e;
}

.bmi-reference {
    margin-top: 20px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    border: 2px solid #bdc3c7;
}

.bmi-reference ul {
    margin: 10px 0;
    padding-left: 20px;
}

.bmi-reference li {
    margin-bottom: 8px;
    color: #5d6d7e;
    font-weight: 600;
}

.military-reference {
    background: #fef5e7;
    border-color: #f39c12;
}

.military-reference strong {
    color: #d35400;
}

.standards-note {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #f39c12;
    color: #e67e22;
    font-size: 0.95em;
    font-weight: 600;
    font-style: italic;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .bmi-calculator-container {
        margin: 10px;
        padding: 30px 20px;
    }

    .bmi-calculator-header h1 {
        font-size: 1.8em;
    }

    .bmi-subtitle {
        font-size: 1.1em;
    }

    .bmi-calculator-body {
        padding: 25px 20px;
    }

    .bmi-number {
        font-size: 2.5em;
    }

    .bmi-value-display {
        padding: 20px 30px;
    }

    .range-item {
        font-size: 0.75em;
    }

    .range-label {
        font-size: 0.85em;
    }

    .category-text {
        font-size: 1.2em;
    }

    .gender-buttons {
        flex-direction: column;
    }

    .gender-btn {
        padding: 15px 20px;
    }

    .result-badge {
        padding: 15px 30px;
        font-size: 1.3em;
    }
}

@media (max-width: 480px) {
    .bmi-calculator-header h1 {
        font-size: 1.5em;
    }

    .bmi-subtitle {
        font-size: 1em;
    }

    .bmi-description {
        font-size: 0.95em;
    }

    .bmi-calculator-body {
        padding: 20px 15px;
    }

    .calculate-btn, .reset-btn {
        padding: 15px 20px;
        font-size: 1em;
    }

    .bmi-number {
        font-size: 2em;
    }

    .bmi-value-display {
        padding: 15px 25px;
    }

    .result-text {
        font-size: 1em;
    }

    .result-description {
        font-size: 1em;
    }

    .military-badge {
        font-size: 2.5em;
    }
}

/* ==================== 自定义尺寸控制 ==================== */

/* 计算器包装器 - 用于控制整体尺寸 */
.bmi-calculator-wrapper {
    width: 100%;
    height: auto;
    margin: 20px auto;
    overflow: hidden;
}

/* 计算器容器 - 响应式调整 */
.bmi-calculator-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    transition: all 0.3s ease;
}

/* 紧凑模式（小尺寸） */
.bmi-calculator-wrapper[data-size="small"] .bmi-calculator-container {
    max-width: 600px;
    padding: 20px;
}

.bmi-calculator-wrapper[data-size="small"] .bmi-calculator-header h1 {
    font-size: 1.8em;
}

.bmi-calculator-wrapper[data-size="small"] .bmi-number {
    font-size: 2.5em;
}

/* 大尺寸模式 */
.bmi-calculator-wrapper[data-size="large"] .bmi-calculator-container {
    max-width: 1000px;
    padding: 50px;
}

.bmi-calculator-wrapper[data-size="large"] .bmi-calculator-header h1 {
    font-size: 3em;
}

.bmi-calculator-wrapper[data-size="large"] .bmi-number {
    font-size: 4em;
}

/* 超大尺寸模式 */
.bmi-calculator-wrapper[data-size="xlarge"] .bmi-calculator-container {
    max-width: 1200px;
    padding: 60px;
}

/* 最小尺寸限制 */
.bmi-calculator-container {
    min-width: 300px;
}

/* 适配固定高度 */
.bmi-calculator-wrapper[style*="height"] {
    overflow-y: auto;
}

.bmi-calculator-wrapper[style*="height"] .bmi-calculator-container {
    height: 100%;
}

/* iframe 嵌入时的样式优化 */
iframe.bmi-calculator-iframe {
    width: 100%;
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
