body {
    font-family: 'Microsoft YaHei', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    margin: 0;
    padding: 20px;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    min-height: 100vh;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background-color: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

h1 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 30px;
    font-size: 32px;
    border-bottom: 3px solid #3498db;
    padding-bottom: 15px;
}

/* Tab Styles */
.tabs {
    overflow: hidden;
    border-bottom: 2px solid #3498db;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.tab-btn {
    background-color: #f1f1f1;
    float: left;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 14px 24px;
    transition: 0.3s;
    font-size: 16px;
    font-weight: bold;
    color: #555;
    border-radius: 10px 10px 0 0;
    margin: 0 2px;
}

.tab-btn:hover {
    background-color: #ddd;
    color: #333;
}

.tab-btn.active {
    background-color: #3498db;
    color: white;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
}

.tab-content {
    display: none;
    animation: fadeEffect 0.5s;
}

.tab-content.active {
    display: block;
}

@keyframes fadeEffect {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.calculator,
.target-calculator,
.formula {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.target-calculator {
    background-color: #e8f4fc;
}

.formula {
    background-color: #f0f7ff;
    font-size: 14px;
}

h2,
h3 {
    color: #2980b9;
    margin-top: 0;
}

.input-group {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    /* Allowed wrapping for small screens */
}

label {
    width: 220px;
    /* Slightly wider for longer labels */
    font-weight: bold;
    color: #34495e;
}

select,
input[type="number"] {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    width: 250px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

select:focus,
input[type="number"]:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.button-group {
    text-align: center;
    margin: 20px 0;
}

button {
    background: linear-gradient(to right, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);
}

/* Specific style for calculate buttons inside forms just in case we need overrides */


.result {
    background-color: #e8f4fc;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    text-align: center;
    border: 1px solid #3498db;
}

#speed-value,
#attack-value,
#hp-value {
    font-size: 36px;
    font-weight: bold;
    color: #e74c3c;
}

.radio-group {
    display: flex;
    gap: 15px;
}

.radio-group label {
    display: flex;
    align-items: center;
    width: auto;
    font-weight: normal;
    cursor: pointer;
}

.radio-group input {
    margin-right: 5px;
}

#target-result p {
    margin: 10px 0;
    font-size: 18px;
}

#target-result span {
    font-weight: bold;
    color: #e74c3c;
}

@media (max-width: 768px) {
    .input-group {
        flex-direction: column;
        align-items: flex-start;
    }

    label {
        width: 100%;
        margin-bottom: 5px;
    }

    select,
    input[type="number"] {
        width: 100%;
    }

    .tab-btn {
        padding: 10px 15px;
        font-size: 14px;
    }
}