:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #4caf50;
    --info-color: #2196f3;
    --warning-color: #ff9800;
    --danger-color: #f44336;
    --dark-color: #333;
    --light-color: #f5f5f5;
    --border-radius: 12px;
    --transition: all 0.3s ease;
    --background-gradient: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --hover-shadow: 0 8px 30px rgba(102, 126, 234, 0.3);
}

* {
    box-sizing: border-box;
}

.child-height-section {
    padding: 20px 0;
    min-height: 100vh;
    background: var(--background-gradient);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.calculator-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 40px 20px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
}

.header-content {
    max-width: 800px;
    margin: 0 auto;
}

.calculator-title {
    font-size: 2.5rem;
    color: var(--dark-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.calculator-title i {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.calculator-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 20px;
}

.calculator-badge {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.badge-item {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.calculator-main {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    padding: 30px;
    margin-bottom: 30px;
}

.calculator-inputs {
    margin-bottom: 20px;
}

.input-section {
    margin-bottom: 25px;
}

.section-title {
    font-size: 1.3rem;
    color: var(--dark-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: var(--primary-color);
}

.gender-section {
    margin-bottom: 25px;
}

.gender-label {
    display: block;
    font-weight: 500;
    color: var(--dark-color);
    margin-bottom: 12px;
    font-size: 1rem;
}

.gender-options {
    display: flex;
    gap: 20px;
}

.gender-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: #f5f5f5;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.gender-option:hover {
    background: #e8e8e8;
}

.gender-option input {
    display: none;
}

.gender-option input:checked + .gender-icon {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.gender-option input:checked ~ .gender-text {
    color: var(--primary-color);
    font-weight: 600;
}

.gender-option input:checked ~ .gender-icon i {
    color: white;
}

.gender-option:has(input:checked) {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.05);
}

.gender-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.gender-icon i {
    font-size: 1.3rem;
    color: #666;
}

.gender-text {
    font-size: 1.1rem;
    color: var(--dark-color);
    transition: var(--transition);
}

.input-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-color);
}

.input-group label i {
    margin-right: 5px;
    color: var(--primary-color);
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--hover-shadow);
}

.btn-secondary {
    background: #f5f5f5;
    color: var(--dark-color);
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.calculator-results {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.result-display {
    background: linear-gradient(135deg, #667eea20, #764ba220);
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
}

.result-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 25px;
}

.result-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-icon i {
    font-size: 2.5rem;
    color: white;
}

.result-value {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.height-value {
    font-size: 4rem;
    font-weight: bold;
    color: var(--primary-color);
    line-height: 1;
}

.height-unit {
    font-size: 1.5rem;
    color: #666;
}

.result-range {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 20px;
}

.range-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.range-label {
    font-size: 0.9rem;
    color: #666;
}

.range-value {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--dark-color);
}

.height-bar {
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    margin: 20px 0 10px;
}

.height-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    transition: width 0.5s ease;
}

.height-marker {
    position: absolute;
    top: -8px;
    width: 4px;
    height: 36px;
    background: var(--danger-color);
    border-radius: 2px;
    transform: translateX(-50%);
    transition: left 0.5s ease;
}

.height-marker::after {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid var(--danger-color);
}

.height-scale {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #999;
}

.result-tips {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    padding: 20px;
    background: #fff8e1;
    border-radius: 10px;
    border-left: 4px solid var(--warning-color);
}

.tip-icon {
    font-size: 1.5rem;
    color: var(--warning-color);
}

.tip-content h4 {
    margin: 0 0 8px;
    color: var(--dark-color);
    font-size: 1rem;
}

.tip-content p {
    margin: 0;
    color: #666;
    line-height: 1.6;
    font-size: 0.9rem;
}

.formula-section {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #f0f0f0;
}

.formula-title {
    font-size: 1.1rem;
    color: var(--dark-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.formula-title i {
    color: var(--primary-color);
}

.formula-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.formula-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
}

.formula-label {
    font-weight: 600;
    color: var(--dark-color);
}

.formula-express {
    font-family: monospace;
    color: var(--primary-color);
    font-size: 0.95rem;
}

.calculator-info {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    padding: 30px;
    margin-bottom: 30px;
}

.info-section {
    margin-bottom: 25px;
}

.info-section:last-child {
    margin-bottom: 0;
}

.info-title {
    font-size: 1.3rem;
    color: var(--dark-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-title i {
    color: var(--primary-color);
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-list li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    color: #666;
    line-height: 1.6;
}

.info-list li:last-child {
    border-bottom: none;
}

.info-list li strong {
    color: var(--dark-color);
}

.faq-section {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    padding: 30px;
    margin-bottom: 30px;
}

.faq-title {
    font-size: 1.8rem;
    color: var(--dark-color);
    margin-bottom: 25px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.faq-title i {
    color: var(--primary-color);
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.faq-question {
    padding: 18px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    font-weight: 500;
    color: var(--dark-color);
    transition: var(--transition);
}

.faq-question:hover {
    background: #f0f0f0;
}

.faq-question i {
    transition: transform 0.3s;
    color: var(--primary-color);
}

.faq-question.active i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 20px 18px 20px;
    color: #666;
    line-height: 1.7;
    display: none;
}

.faq-answer.show {
    display: block;
}

.related-section {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    padding: 30px;
}

.related-title {
    font-size: 1.5rem;
    color: var(--dark-color);
    margin-bottom: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.related-title i {
    color: var(--primary-color);
}

.related-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.related-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 10px;
    text-decoration: none;
    color: var(--dark-color);
    transition: var(--transition);
}

.related-item:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    transform: translateY(-3px);
}

.related-item i {
    font-size: 1.2rem;
    color: var(--primary-color);
}

.related-item:hover i {
    color: white;
}

@media (max-width: 768px) {
    .calculator-title {
        font-size: 1.8rem;
    }

    .calculator-header {
        padding: 25px 15px;
    }

    .calculator-main {
        padding: 20px 15px;
    }

    .input-row {
        grid-template-columns: 1fr;
    }

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

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

    .btn {
        width: 100%;
        justify-content: center;
    }

    .result-main {
        flex-direction: column;
    }

    .result-range {
        flex-direction: column;
        gap: 15px;
    }

    .height-value {
        font-size: 3rem;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.calculator-results.show {
    animation: fadeIn 0.3s ease;
}

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

.height-value.animate {
    animation: pulse 0.5s ease;
}