/* 공통 submit 버튼 스타일 개선 */
button#submitBtn {
    background: transparent;
    border: none;
    padding: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}
@media screen and (min-width: 701px) {
    button#submitBtn {
        width: auto;
        max-width: 320px;
        margin-left: auto;
        margin-right: 0;
        display: block;
    }
    .dbInput-submit.pc-only {
        width: 100%;
        max-width: 320px;
        height: auto;
        display: block;
        margin: 0;
    }
}
@media screen and (max-width: 700px) {
    button#submitBtn {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        max-width: 100%;
    }
    .dbInput-submit.mo-only {
        width: 100% !important;
        max-width: 320px;
        height: auto !important;
        display: block;
        margin: 0 auto;
        object-fit: contain;
    }
}
/* 02, 04 이미지 공통 패딩 */
.main-section-img {
    display: block;
    width: 100%;
    margin-top: 70px;
    padding-left: 25%;
    padding-right: 25%;
    box-sizing: border-box;
}
@media screen and (max-width: 700px) {
    .main-section-img {
        padding-left: 15%;
        padding-right: 15%;
    }
}
@media screen and (max-width:700px) {
    .dbInput-submit.mo-only {
        width: 100% !important;
        height: auto !important;
        max-width: 500px;
        display: block;
        margin: 0 auto;
        object-fit: contain;
    }
}
/* PC/모바일 전용 이미지 표시 */
.pc-only { display: block; }
.mo-only { display: none}

@media screen and (max-width: 700px) {
    .pc-only { display: none !important; }
    .mo-only { display: block !important;}
}
/* 하단 고정 폼 스타일 */
.fixed-bottom-form {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3000;
    background: #00054b;
    box-shadow: 0 -2px 16px rgba(0,0,0,0.15);
    padding-top: 0;
    padding-bottom: 0;
}

@media screen and (max-width:700px) {
    .fixed-bottom-form {
        max-width: 100vw;
        left: 0;
        right: 0;
        border-radius: 0;
        max-height: 45vh;
        overflow-y: auto;
        padding-bottom: env(safe-area-inset-bottom, 6px);
    }
    .fixed-bottom-form .form_section {
        height: auto !important;
        min-height: 100px;
        padding: 12px 6px 6px 6px;
        margin-bottom: 0;
    }
    .inputForm-flex-wrap {
        flex-direction: column;
        gap: 0.2rem;
        width: 100%;
    }
    .inputForm-flex-wrap > div {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        width: 100% !important;
        min-width: 0 !important;
        gap: 0.2rem;
    }
    .name-label, #counsel_name {
        margin-bottom: 0 !important;
    }
    #counsel_name {
        flex: 1 1 0%;
        min-width: 0;
        width: 100%;
        box-sizing: border-box;
    }
    .name-label, .num-label {
        font-size: 0.85rem;
        min-width: 38px;
        padding-right: 0.2rem;
        white-space: nowrap;
    }
    .num-label-first {
        font-size: 0.8rem;
        padding: 0.45rem 0.4rem;
        border-radius: 6px 0 0 6px;
        margin-right: 2px;
    }
    input[type="text"] {
        font-size: 0.8rem;
        padding: 0.5rem 0.6rem;
        border-radius: 6px;
        height: 28px;
        width: 100%;
        min-width: 0;
        flex: 1 1 0%;
        box-sizing: border-box;
    }
    .agreeText {
        font-size: 0.7rem;
    }
    label[for="privacy_agree"] {
        flex-direction: row !important;
        align-items: center !important;
        font-size: 0.8rem;
        margin-top: 0.2rem;
        gap: 0.2rem;
        width: 100%;
        justify-content: flex-start !important;
    }
    #privacy_agree {
        width: 15px !important;
        height: 15px !important;
    }
    .fixed-bottom-form > div:first-child {
        font-size: 0.95rem !important;
        height: 32px !important;
        min-height: 32px !important;
        padding: 0 2px;
    }
    .dbInput-submit {
        max-width: 100px;
        height: 28px;
    }
}

@media screen and (max-width:700px) {
    .fixed-bottom-form {
        max-width: 100vw;
        left: 0;
        right: 0;
        border-radius: 0;
    }
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    line-height: 1;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
    line-height: 1.6;
    background-color: #333;
}

main {
    width: 100%;
    margin: 0 auto;
    background: #00054b;
}

main>img {
    width: 100%;
    height: auto;
}


.form_section {
    position: relative;
    padding: 30px 20px;
    margin-bottom: 40px;
    text-align: center;
    width: 100%;
    margin: 0 auto;
    background: #09ec98;
}


.participantCountBox {
    position: relative;
    padding: 30px 0;
}

/* Speech Bubble */
.speech-bubble {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    color: #000;
    padding: 12px 24px;
    border-radius: 60px;
    font-size: 2rem;
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(106, 233, 248, 0.4);
    white-space: nowrap;
    z-index: 10;
}

.speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #fff;
}

.bubble-text {
    display: inline-block;
}

.count-number {
    display: inline-block;
    font-weight: 700;
    font-size: 2rem;
    text-align: center;
    color: #0074ff;
}

.form_section label,
.form_section h2 {
    color: white;
}

#agreeView {
    color: #fff;
}

.form_section h2 {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 24px;
}

.form_section h2 span {
    color: #6ae9f8;
}

/* Input Form Styling */

.inputForm-flex-wrap {
    display: flex;
    flex-direction: row;
    gap: 1rem;
}

@media screen and (max-width: 700px) {
    .inputForm-flex-wrap {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }
}

.inputForm-flex-wrap>div {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    position: relative;
}

.name-label,
.num-label {
    margin-bottom: 0;
    font-weight: 600;
    color: #000000;
    font-size: 1.1rem;
    letter-spacing: -0.5px;
    white-space: nowrap;
    min-width: 55px;
    padding-right: 0;
    flex-shrink: 0;
}

@media screen and (max-width: 700px) {
    .name-label,
    .num-label {
        font-size: 0.85rem;
        min-width: 38px;
        padding-right: 0;
    }
    .num-label-first {
        font-size: 0.8rem;
        padding: 0.55rem 0.5rem;
        border-radius: 6px 0 0 6px;
    }
    input[type="text"] {
        font-size: 0.8rem;
        padding: 0.5rem 0.6rem;
        border-radius: 6px;
        height: 32px;
    }
    .agreeText {
        font-size: 0.7rem;
    }
    .inputForm-flex-wrap > div {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
    }
    label[for="privacy_agree"] {
        flex-direction: row !important;
        align-items: center !important;
        font-size: 0.8rem;
        margin-top: 0.3rem;
        gap: 0.2rem;
        white-space: nowrap !important;
        width: 100%;
    }
    #privacy_agree {
        width: 15px !important;
        height: 15px !important;
    }
    .fixed-bottom-form > div:first-child {
        font-size: 1rem !important;
        height: 38px !important;
        min-height: 38px !important;
        padding: 0 4px;
    }
    .dbInput-submit {
        max-width: 120px;
        height: 32px;
    }
}

#counsel_hp {
    border-radius: 0 8px 8px 0;
}

input[type="text"] {
    flex: 1;
    padding: 0.875rem 1rem;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Noto Sans KR', sans-serif;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    color: #222;
    width: 100%;
}

input[type="text"]:focus {
    outline: none;
    border-color: #6ae9f8;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(106, 233, 248, 0.15);
}

input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.num-label-first {
    background: linear-gradient(135deg, #6ae9f8, #5dd9e6);
    color: #000000;
    padding: 1.1rem 1rem;
    border-radius: 8px 0 0 8px;
    font-size: 0.95rem;
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(106, 233, 248, 0.3);
}

.privacy_box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.5rem 0 0 0;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
}

.privacy_box label {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.privacy_box input[type="checkbox"] {
    width: 18px !important;
    height: 18px;
    cursor: pointer;
    accent-color: #fff;
}

.agreeText {
    color: #222 !important;
    font-size: 0.9rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.agreeText:hover {
    color: #6ae9f8;
}

#submitBtn {
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Modal Overlay */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1999;
    animation: fadeIn 0.3s ease-in-out;
}

.modal-overlay.active {
    display: block;
}

/* Modal Styles */
#myModal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0;
    width: 90%;
    max-width: 600px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease-in-out;
}

#myModal.active {
    display: block;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 16px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.modal-content h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: #333;
    font-weight: 600;
}

.modal-content p {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}

.modal-close:hover {
    color: #333;
}

.inputForm-wrapper{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

footer {
    background: #0a1d53;
    color: #fff;
    text-align: center;
    padding: 20px;
    font-size: 0.8rem;
    line-height: 1.4;
}


@media screen and (max-width:700px) {
    .form_section {
        padding: 35px 15px;
    }

    .speech-bubble {
        font-size: 1.2rem;
    }

    .count-number {
        font-size: 1.2rem;
    }

    .speech-bubble::after {
        bottom: -7px;
        border-left: 8px solid transparent;
        border-right: 8px solid transparent;
        border-top: 8px solid #fff;
    }

    .form_section h2 {
        font-size: 1.3rem;
    }

}