html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
    font-family: "Segoe UI", sans-serif;
    color: #fff;
    background: url("../img/background.png") no-repeat center center fixed;
    background-size: cover;
}

.hero-section {
    min-height: 100svh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 60px 20px;
}

.search-card {
    background: rgba(0, 0, 0, 0.6);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    padding: 40px;
    max-width: 800px;
    width: 100%;
    animation: fadeIn 0.8s ease;
    backdrop-filter: blur(8px);
}

    .search-card h1 {
        white-space: nowrap;
        font-size: clamp(1.8rem, 3vw, 2.4rem);
        text-align: center;
        overflow: hidden;
        text-overflow: ellipsis;
    }

.text-gradient {
    background: linear-gradient(45deg, #00c6ff, #0072ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.search-box-wrapper {
    width: 100%;
    margin-bottom: 1rem;
}

.search-box {
    position: relative;
    width: 100%;
}

    .search-box input {
        width: 100%;
        padding: 14px 50px 14px 20px;
        border-radius: 12px;
        border: none;
        outline: none;
        font-size: 1rem;
        background: rgba(255, 255, 255, 0.1);
        color: #fff;
        transition: all 0.3s ease;
    }

        .search-box input:focus {
            background: rgba(255, 255, 255, 0.2);
            box-shadow: 0 0 0 3px rgba(0, 198, 255, 0.5);
        }

    .search-box button {
        position: absolute;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
        background: transparent;
        border: none;
        color: #00c6ff;
        font-size: 1.4rem;
        cursor: pointer;
        transition: transform 0.2s ease, color 0.2s ease;
    }

        .search-box button:hover {
            color: #fff;
            transform: translateY(-50%) scale(1.1);
        }

.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    color: #fff;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top: 4px solid #00c6ff;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.result-card {
    margin-top: 2rem;
    padding: 1.5rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(6px);
    color: #fff;
}

.calcolo-card {
    margin-top: 2rem;
    padding: 1.5rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(6px);
    color: #fff;
}

    .calcolo-card h5 {
        margin-bottom: 1rem;
        color: #00c6ff;
    }

    .calcolo-card li {
        margin-bottom: 0.8rem;
    }

.badge.supplemento {
    background: linear-gradient(135deg, #00c6ff, #0072ff);
    font-size: 1rem;
    padding: 0.4rem 0.7rem;
    border-radius: 8px;
    color: #fff;
}

.users-input,
#newUsersWrapper input,
.form-check-input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 6px;
    padding: 8px;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

    .users-input:focus,
    #newUsersWrapper input:focus {
        background: rgba(255, 255, 255, 0.2);
        box-shadow: 0 0 0 2px rgba(0, 198, 255, 0.5);
        outline: none;
    }

.btn-calc {
    background: linear-gradient(135deg, #00c6ff, #0072ff);
    border: none;
    color: #fff;
    font-weight: 600;
    border-radius: 10px;
    padding: 12px 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

    .btn-calc:hover:not(:disabled) {
        background: linear-gradient(135deg, #0072ff, #00c6ff);
        transform: translateY(-2px);
    }

#captchaWrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

    #captchaWrapper .d-flex {
        justify-content: center;
    }

#captchaCanvas {
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
}

#captchaWrapper .btn-outline-info {
    border-color: rgba(255, 255, 255, 0.3);
    color: #00c6ff;
    transition: all 0.3s ease;
}

    #captchaWrapper .btn-outline-info:hover {
        color: #fff;
        background: rgba(0, 198, 255, 0.2);
        border-color: #00c6ff;
    }

.captcha-input {
    width: 100%;
    max-width: 320px;
    padding: 14px 20px;
    border-radius: 12px;
    border: none;
    outline: none;
    font-size: 1rem;
    font-family: "Segoe UI", sans-serif;
    background: rgba(255, 255, 255, 0.1);
    color: #fff !important;
    transition: all 0.3s ease;
    text-align: center;
    caret-color: #00c6ff;
}

    .captcha-input::placeholder {
        color: rgba(255, 255, 255, 0.7);
    }

    .captcha-input:focus {
        background: rgba(255, 255, 255, 0.2);
        box-shadow: 0 0 0 3px rgba(0, 198, 255, 0.5);
        color: #fff !important;
    }

.btn-request {
    background: linear-gradient(135deg, #28a745, #218838);
    border: none;
    color: #fff;
    font-weight: 600;
    border-radius: 8px;
    padding: 10px 16px;
    transition: all 0.3s ease;
}

    .btn-request:hover {
        background: linear-gradient(135deg, #218838, #28a745);
        transform: translateY(-2px);
    }

.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0,0,0,0.8);
    color: #fff;
    border-radius: 8px;
    padding: 15px 20px;
    z-index: 3000;
    animation: fadeIn 0.5s ease;
}

.toast-message.success {
    color: #28a745;
}

.toast-message.error {
    color: #dc3545;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .search-card {
        margin-top: 40px;
        padding: 30px 20px;
        max-width: 95%;
    }

        .search-card h1 {
            font-size: 1.6rem;
        }
}
