.screen {
    background-color: #ffffff;
    display: grid;
    justify-items: center;
    align-items: start;
    width: 100%;
    min-height: 100vh;
    padding: 0;
    margin-top: 108px;
}

.screen .div {
    background-color: #ffffff;
    overflow: visible;
    width: 100%;
    max-width: 1048px;
    padding: 0 120px;
    box-sizing: border-box;
    margin: 0 auto;
}

/* Header Section */
.contact-header {
    text-align: center;
    margin-top: 48px;
}

.screen .text-wrapper {
    font-family: "Noto Sans JP", sans-serif;
    font-weight: 700;
    color: #000000;
    font-size: 32px;
    line-height: 40px;
    text-align: center;
    white-space: nowrap;
    letter-spacing: 0;
    margin-bottom: 0;
}

.screen .text-wrapper-2 {
    font-family: "Noto Sans JP", sans-serif;
    font-weight: 500;
    color: #000000;
    font-size: 16px;
    text-align: center;
    line-height: 24px;
    letter-spacing: 0;
    margin-bottom: 24px;
    margin-top: 24px;
}

.screen .rectangle {
   width: 113px;
    height: 7px;
    background: linear-gradient(90deg, #009A55 0%, #00FF00 100%);
    margin-bottom: 48px;
    border-radius: 100px;
    margin: 24px auto 0;
}

/* Notice Message */
.screen .cloud-door-jp {
    font-family: "Noto Sans JP", sans-serif;
    font-weight: 400;
    font-size: 16px;
    margin: 48px auto;
}

/* Form Container */
form {
    margin: 0 auto;
}

/* Form Field Labels */
.screen .p,
.screen .div-2,
.screen .div-4,
.screen .div-5 {
    font-family: "Noto Sans JP", sans-serif;
    font-weight: 400;
    color: transparent;
    font-size: 16px;
    line-height: 25.6px;
    white-space: nowrap;
    letter-spacing: 0;
    margin-top: 25px;
    text-align: left;
    padding-left: 20px;
}

.screen .span {
    color: #000000;
    margin-top: 0;
}

.screen .text-wrapper-3 {
    color: #d34646;
    font-family: "Noto Sans JP", sans-serif;
    font-weight: 700;
}

/* Form Inputs */
.screen .overlap,
.screen .rectangle-2,
.screen .rectangle-3 {
    width: 100%;
    max-width: 780px;
    height: 40px;
    margin: -48px auto 15px;
    background-color: #ffffff;
    border-radius: 4px;
    border: 1px solid #cccccc;
    color: #000;
    padding: 0 15px;
    box-sizing: border-box;
    font-family: "Noto Sans JP", sans-serif;
    font-size: 16px;
    display: block;
    margin-left: 56%;
    transform: translate(-50%);
}

.screen .overlap:focus,
.screen .rectangle-2:focus,
.screen .rectangle-3:focus {
    outline: none;
    border-color: #00BD68;
}

/* Textarea */
.screen .rectangle-5 {
    width: 100%;
    max-width: 780px;
    height: 200px;
    margin: -40px auto 20px;
    background-color: #ffffff;
    border-radius: 4px;
    border: 1px solid #cccccc;
    color: #000;
    padding: 15px;
    box-sizing: border-box;
    font-family: "Noto Sans JP", sans-serif;
    font-size: 16px;
    resize: vertical;
    display: block;
    margin-left: 17%;
    transform: translate(0);

}

.screen .rectangle-5:focus {
    outline: none;
    border-color: #00BD68;
}




/* Form Actions Section */
.form-actions {
    max-width: 780px;
    margin: 40px auto 0;
    text-align: center;
}

.screen .text-wrapper-4 {
    font-weight: 700;
    color: #d34646;
    font-size: 14px;
    line-height: 160%;
    margin-bottom: 16px;
    text-align: left;
}

/* Privacy Policy Checkbox */
.screen .overlap-3 {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 48px;
    gap: 10px;
}

.screen .div-6 {
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    white-space: nowrap;
}

.screen .text-wrapper-9 {
    color: #334eff;
    text-decoration: none;
}

input[type="checkbox"] {
    accent-color: #28a745;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Submit Button */
.screen .group {
    margin: 48px 0;
    border-radius: 50px;
    display: inline-block;
}

.screen .overlap-group {
    width: 242px;
    height: 56px;
    background-color: #009A55;
    border-radius: 100px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button.overlap-group {
    cursor: pointer;
}

button.overlap-group:hover {
    cursor: pointer;
}

.screen .overlap-group:hover {
    background-color: #00a558;
}

.screen .text-wrapper-5 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: "Noto Sans JP", sans-serif;
    font-weight: 700;
    color: #ffffff;
    font-size: 18px;
    text-align: center;
    line-height: 21.2px;
    white-space: nowrap;
    letter-spacing: 0;
    transition: opacity 0.3s ease;
}

/* Loading Spinner for Button */
.button-loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Button Loading State */
.screen .overlap-group.loading {
    background-color: #00BD68;
    cursor: not-allowed;
}

.screen .overlap-group.loading .text-wrapper-5 {
    opacity: 0;
}

.screen .overlap-group.loading .button-loading-spinner {
    display: block;
}

/* Disabled Button State */
.screen .overlap-group:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    opacity: 3;
}

.screen .overlap-group:disabled:hover {
    background-color: #00a558;
    transform: none;
}

.screen .overlap-group:disabled .text-wrapper-5 {
    color: #999999;
}

/* Error Styles */
.error {
    color: #dc3545;
    font-size: 14px;
}

/* Alert styles */
.alert {
    padding: 12px 16px;
    margin: 20px auto;
    border-radius: 4px;
    font-family: "Noto Sans JP", sans-serif;
    max-width: 780px;
    text-align: center;
}

.alert-danger {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

/* Input Error State */
.input-group.error {
    border-color: #dc3545;

}

/* RESPONSIVE DESIGN */

/* Tablet Styles */
@media (max-width: 1024px) {
    .screen .div {
        padding: 0 40px;
    }

    .screen .overlap,
    .screen .rectangle-2,
    .screen .rectangle-3 {
        max-width: 70%;
    }

    .screen .rectangle-5 {
        max-width: 70%;
        margin-left: 21%;
    }

    .form-actions {
        max-width: 100%;
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    .screen {
        padding: 0;
        margin-top: 68px;
    }

    .screen .div {
        padding: 0 20px;
        margin-top: 0;
    }

    /* Form */
    form {
        padding: 20px 0;
    }

    /* Form Labels */
    .screen .p,
    .screen .div-2,
    .screen .div-4,
    .screen .div-5 {
        font-size: 14px;
        padding-left: 10px;
        margin-top: 20px;
        margin-bottom: 6px;
        margin-left: 40px;
    }

    /* Form Inputs */
    .screen .overlap,
    .screen .rectangle-2,
    .screen .rectangle-3 {
        max-width: 100%;
        margin: 0 0 15px;
        padding: 0 12px;
        font-size: 16px;
        height: 44px;
        left: 50%;
        transform: translate(0);
    }

    /* Textarea */
    .screen .rectangle-5 {
        max-width: 100%;
        margin: 0 0 15px;
        padding: 12px;
        font-size: 16px;
        height: 120px;
    }

    /* Form Actions */
    .form-actions {
        margin: 30px auto 0;
        padding: 0 10px;
    }

    .screen .group-2 {
        flex-direction: row;
        align-items: flex-start;
        gap: 8px;
        width: 100%;
    }

    input[type="checkbox"] {
        width: 16px;
        height: 16px;
        margin-top: 2px;
        flex-shrink: 0;
        margin-left: 30px;
    }

    /* Submit Button */
    .screen .group {
        margin: 25px auto;
    }

    .screen .overlap-group {
        width: 250px;
        height: 44px;
    }

    .screen .text-wrapper-5 {
        font-size: 16px;
    }

    /* Alert Messages */
    .alert {
        margin: 15px auto;
        padding: 10px 12px;
        font-size: 14px;
    }

    .screen .div-6 {
        font-size: 14px;
    }

    .form-group {
        display: grid !important;
    }
}

/* Small Mobile Styles */
@media (max-width: 480px) {
    .screen .div {
        padding: 0 15px;
    }

    .screen .text-wrapper {
        font-size: 24px;
        line-height: 30px;
        margin-top: 52px;
    }

    .screen .text-wrapper-2 {
        font-size: 13px;
        line-height: 18px;

    }

    .screen .overlap,
    .screen .rectangle-2,
    .screen .rectangle-3 {
        padding: 0 10px;
        font-size: 15px;
        width: 330px;
        margin: 0 auto;
    }

    .screen .rectangle-5 {
        padding: 10px;
        font-size: 15px;
        width: 330px;
        margin: 0 auto;
    }

    .screen .overlap-group {
        width: 220px;
        height: 42px;
    }

    .screen .text-wrapper-5 {
        font-size: 15px;
    }
}
#form label {
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    color: #3F3E4E;
    width: 170px;
    flex-shrink: 0;
}

.required {
    color: #d34646;
    margin-left: 4px;
}

.form-group {
    display: flex;
    margin-bottom: 16px;
}

.form-group .input-wrapper {
    width: 100%;
}

.input-group {
    flex: 1;
    box-sizing: border-box;
    width: 100%;
    padding: 12px 16px;
    border-radius: 4px;
    border: 1px solid #cccccc;
    color: #000;
    resize: vertical;
    font-size: 16px;
    font-family: "Noto Sans JP", sans-serif;
}

.input-group:focus {
    outline: none;
    border-color: #00BD68;
}
