
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

body {
    background-color: #f0f2f5;
    padding: 20px;
}

/* Wave Pattern */
body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(to right, #4facfe 0%, #00f2fe 100%);
    position: relative;

}

body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23ffffff' fill-opacity='0.1' d='M0,96L48,112C96,128,192,160,288,186.7C384,213,480,235,576,213.3C672,192,768,128,864,128C960,128,1056,192,1152,208C1248,224,1344,192,1392,176L1440,160L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E") bottom no-repeat;
    background-size: cover;
    opacity: 0.6;
    pointer-events: none;
}
/* End */

#header {
    text-align: center;
    margin-bottom: 20px;
}

#header img {
    max-height: 180px;
    width: auto;
}

.container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.bookmark-button {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.bookmark-button:hover {
    background: #218838;
}

.tooltip {
    position: absolute;
    background: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    top: 60px;
    right: 20px;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 1000;
}

.tooltip.show {
    opacity: 1;
}

h1 {
    margin-bottom: 20px;
    padding-right: 150px;
}

p {
    margin-bottom: 30px;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab {
    padding: 10px 20px;
    border: none;
    background: #e0e0e0;
    cursor: pointer;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.2s;
}

.tab.active {
    background: #007bff;
    color: white;
}

.calculator {
    display: none;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 5px;
}

.calculator.active {
    display: block;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

fieldset {
    border: none;
    margin-bottom: 15px;
    font-size: 16px;
    line-height: 2;
}

.values {
    margin-bottom: 20px;
}

input[type="number"] {
    width: 80px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin: 0 5px;
    font-size: 16px;
    transition: border-color 0.2s;
}

input[type="number"]:focus {
    outline: none;
    border-color: #007bff;
}

input[type="submit"] {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-right: 10px;
}

input[type="submit"]:hover {
    background: #0056b3;
}

.result {
    display: inline-block;
    padding: 8px 15px;
    background: #e9ecef;
    border-radius: 5px;
    font-weight: bold;
    min-width: 100px;
    text-align: right;
}

.error {
    color: #dc3545;
    margin-top: 5px;
    font-size: 0.9em;
}

@media (max-width: 600px) {
    fieldset {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .values nobr {
        display: flex;
        align-items: center;
        gap: 5px;
    }

    .bookmark-button {
        position: relative;
        top: 0;
        right: 0;
        margin-bottom: 20px;
    }

    .tooltip {
        top: auto;
        bottom: -40px;
        right: 0;
    }

    h1 {
        padding-right: 0;
    }
}
