* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    height: 100%;
}

body {
    height: 100%;
    font-family: "Inter", sans-serif;
    background: #f7f9fc;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    color: #222;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("img/background.jpeg") center center / cover no-repeat;
    opacity: 0;
    animation: fadeInBackground 2s ease forwards;
    z-index: -1;
}

@keyframes fadeInBackground {
    from {
        opacity: 0;
        transform: scale(1.05);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.5);
    z-index: -1;
}

header {
    text-align: center;
    padding: 40px 0 20px;
}

.logo {
    width: 150px;
    height: auto;
    opacity: 0.9;
}

.nav-menu {
    background: white;
    margin: 20px auto 0;
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    max-width: 300px;
}

.nav-menu ul {
    display: flex;
    justify-content: center;
    gap: 30px;
    list-style: none;
}

.nav-menu a {
    position: relative;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 16px;
    padding: 6px 0;
    cursor: pointer;
    transition: color 0.3s;
}

.nav-menu a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0%;
    height: 2px;
    background-color: #0077ff;
    transition: width 0.3s ease;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.nav-menu a:hover {
    color: #0077ff;
}

main {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-bottom: 40px;
}

#folieCalculator {
    display: none;
}

.calculator-container {
    background: white;
    padding: 40px 30px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    max-width: 800px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: left;
}

.calculator-container h2 {
    margin-top: 15px;
    margin-bottom: -5px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

label {
    font-weight: 500;
    font-size: 14px;
    color: #333;
}

input,
select {
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 15px;
}

select {
    margin-left: 3px;
    width: 80%;
}

.deactivated {
    display: none;
}

.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 6px;
}

.results p {
    margin: 4px 0;
    font-size: 15px;
}

.results span {
    font-weight: bold;
}

#mengeMaterialLabel,
#kostenMaterialLabel {
    font-weight: normal;
}

.final-cost {
    margin-top: 12px;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.form-group.full-width {
    grid-column: span 2;
}

.form-section {
    margin-top: 10px;
}

.copy-btn {
    padding: 6px 12px;
    font-size: 14px;
    border-radius: 6px;
    border: none;
    background: #0077ff;
    color: white;
    cursor: pointer;
    transition: background 0.2s;
}

.copy-btn:hover {
    background: #005ecc;
}

.reset-btn {
    background: #f0f0f0;
    color: #333;
    padding: 8px 14px;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 15px;
    margin-bottom: 0px;
    transition: background 0.2s;
}

.reset-btn:hover {
    background: #ddd;
}

footer {
    position: relative;
    background-color: #f0f0f0;
    padding: 20px 0;
    text-align: center;
    font-size: 14px;
    color: #555;
    margin-top: 40px;
    border-top: 1px solid #ddd;
}

@media (max-width: 768px) {
    header {
        padding: 20px 0 10px;
    }

    .nav-menu {
        width: 90%;
        max-width: none;
        padding: 10px;
        border-radius: 10px;
    }

    .nav-menu ul {
        flex-direction: column;
        gap: 10px;
    }

    .calculator-container {
        padding: 20px 15px;
        border-radius: 12px;
        margin: 0 10px;
    }

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

    .form-group.full-width {
        grid-column: span 1;
    }

    .final-cost {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .copy-btn {
        align-self: flex-end;
    }

    input,
    select {
        font-size: 16px;
    }
}
