:root {
    --primary-color: #2c7be5;
    --primary-dark: #1a5fc1;
    --secondary-color: #6c757d;
    --success-color: #27b345;
    --warning-color: #fd7e14;
    --danger-color: #d92525;
    --light-color: #f8f9fa;
    --dark-color: #333;
    --border-color: #e4e7ed;
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

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

.header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.logo i {
    color: var(--primary-color);
    font-size: 36px;
}

.logo h1 {
    font-size: 32px;
    color: var(--dark-color);
    font-weight: 700;
}

.subtitle {
    color: var(--secondary-color);
    font-size: 16px;
    max-width: 600px;
    margin: 0 auto;
}

.header-actions {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    font-size: 14px;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-outline {
    background-color: transparent;
    color: var(--secondary-color);
    border: 2px solid var(--border-color);
}

.btn-outline:hover {
    background-color: var(--light-color);
    color: var(--dark-color);
}

.dashboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 900px) {
    .dashboard {
        grid-template-columns: 1fr;
    }
}

.card {
    background-color: white;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.card-header {
    padding: 22px 30px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    font-size: 22px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.formula-display {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 14px;
}

.card-body {
    padding: 30px;
}

.form-group {
    margin-bottom: 22px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-label i {
    color: var(--primary-color);
    font-size: 16px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
    background-color: white;
}

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

.form-hint {
    font-size: 13px;
    color: var(--secondary-color);
    margin-top: 6px;
    display: flex;
    justify-content: space-between;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.cooling-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 10px;
}

.cooling-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 12px;
    border-radius: 10px;
    border: 2px solid #e1e5e9;
    transition: all 0.3s;
}

.cooling-option input[type="radio"] {
    margin-bottom: 8px;
}

.cooling-option.active {
    border-color: var(--primary-color);
    background-color: rgba(44, 123, 229, 0.05);
}

.result-section {
    margin-top: 25px;
}

.result-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 10px;
    padding: 22px;
    border: 2px solid #e1e8f0;
}

.result-card h3 {
    margin-bottom: 20px;
    color: var(--dark-color);
    font-size: 18px;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.result-item {
    text-align: center;
    padding: 18px;
    background-color: white;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.result-label {
    font-size: 14px;
    color: var(--secondary-color);
    margin-bottom: 8px;
}

.result-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.result-unit {
    font-size: 14px;
    color: var(--secondary-color);
    margin-left: 4px;
    font-weight: normal;
}

.result-sub {
    font-size: 13px;
    color: var(--success-color);
    margin-top: 5px;
}

.density-indicator {
    margin-top: 15px;
}

.density-bar {
    height: 10px;
    background: linear-gradient(90deg, #67c23a, #e6a23c, #f56c6c);
    border-radius: 5px;
    margin-bottom: 8px;
    overflow: hidden;
    position: relative;
}

.density-marker {
    position: absolute;
    top: 0;
    width: 3px;
    height: 100%;
    background-color: white;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
    transform: translateX(-50%);
    transition: left 0.5s ease;
}

.density-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--secondary-color);
}

.shrinkage-result {
    text-align: center;
    margin-bottom: 25px;
}

.shrinkage-value {
    font-size: 48px;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 10px;
}

.mold-factor {
    background-color: #f0f9ff;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
}

.factor-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--dark-color);
}

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

.factor-item {
    text-align: center;
}

.factor-label {
    font-size: 13px;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.factor-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
}

.footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 25px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    color: var(--secondary-color);
    font-size: 14px;
}

.footer-note {
    margin-top: 5px;
    font-size: 13px;
}

.status-success {
    color: var(--success-color);
}

.status-warning {
    color: var(--warning-color);
}

.status-error {
    color: var(--danger-color);
}

input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #e1e5e9;
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

select {
    cursor: pointer;
}