body, div, input, li, p, span, td, textarea {
    font-family: arial, helvetica, sans-serif;
    font-size: 16px;
}

.calculator-container {
    background-color: white;
    width: 90%;
    max-width: 500px;
    margin: 20px auto;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.calculator-container h1 {
    color: #053b7d;
    font-size: 1.4rem;
    margin-bottom: 20px;
    text-align: center;
}

.calculator-container h1 i {
    margin-right: 10px;
}

.conversion-tabs {
    display: flex;
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #053b7d;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: white;
    color: #053b7d;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: #053b7d;
    color: white;
}

.tab-btn:hover:not(.active) {
    background: #e8f4f8;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.input-container {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

.input-container label {
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.time-input {
    display: flex;
    align-items: center;
    gap: 5px;
}

.time-input input {
    width: 80px;
    padding: 12px;
    font-size: 1.2rem;
    text-align: center;
    border: 1px solid #cfd1d8;
    border-radius: 5px;
    outline: none;
}

.time-input span {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

.time-input input:focus {
    border-color: #053b7d;
    box-shadow: 0 0 5px rgba(5, 59, 125, 0.3);
}

#button-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

#button-container button {
    padding: 12px 25px;
    border: 0;
    color: #fff;
    font-size: 16px;
    background: #084288;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

#button-container button:hover {
    background-color: #0a5a9c;
}

#result {
    margin-top: 25px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 10px;
}

#result h3 {
    color: #053b7d;
    margin-top: 0;
    margin-bottom: 15px;
    text-align: center;
}

.pace-display {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
    flex-wrap: wrap;
    gap: 15px;
}

.pace-box {
    text-align: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    min-width: 120px;
}

.pace-box .value {
    font-size: 1.8rem;
    font-weight: bold;
    font-family: 'Orbitron', monospace;
}

.pace-box .label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 5px;
}

.race-times {
    margin-top: 20px;
}

.race-times h4 {
    color: #053b7d;
    margin-bottom: 10px;
}

.race-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.race-item {
    background: white;
    padding: 10px;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
}

.race-item .race-name {
    font-weight: bold;
    color: #333;
}

.race-item .race-time {
    color: #053b7d;
    font-family: monospace;
}

.race-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.race-table th, .race-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.race-table th {
    background-color: #053b7d;
    color: white;
}

.race-table tr:hover {
    background-color: #f5f5f5;
}

@media (max-width: 600px) {
    .calculator-container {
        width: 95%;
        padding: 15px;
    }

    .time-input {
        justify-content: center;
    }

    .time-input input {
        width: 70px;
    }

    #button-container {
        flex-direction: column;
    }

    #button-container button {
        width: 100%;
        justify-content: center;
    }

    .race-grid {
        grid-template-columns: 1fr;
    }

    .pace-display {
        flex-direction: column;
        align-items: center;
    }

    .pace-box {
        width: 100%;
    }
}
