/* ✅ 전체 컨테이너 */
.join-container {
    max-width: 400px;
    margin: 25px auto; /* 중앙 정렬 */
    padding: 20px;
    font-family: 'Arial', sans-serif;
    background: #F8F9FB;
    border-radius: 10px;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
}

/* ✅ 헤더 */
h2 {
    text-align: left;
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
}

/* ✅ 경기 카드 */
.match-card {
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    background: #fff;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
}

.match-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 10px;
}

.match-info {
    text-align: left;
}

.match-info h3 {
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
}

.match-info p {
    font-size: 14px;
    color: #777;
}

/* ✅ 태그 */
.tags {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.tag {
    font-size: 12px;
    background: #EAF0FF;
    color: #0575E6;
    padding: 5px 10px;
    border-radius: 5px;
}

/* ✅ 입력 필드 스타일 개선 */
form input, form select, form textarea {
    width: 100%;
    padding: 12px;
    margin-top: 5px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 8px; /* 둥글게 */
    font-size: 14px;
    box-sizing: border-box;
    background: #fff;
    transition: border-color 0.3s ease-in-out;
}

form input:focus, form select:focus, form textarea:focus {
    border-color: #0575E6;
    outline: none;
    box-shadow: 0 0 5px rgba(5, 117, 230, 0.2);
}

/* ✅ textarea 스타일 */
form textarea {
    height: 120px;
    resize: none; /* 크기 조절 방지 */
}

/* ✅ 라벨 스타일 */
form label {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    display: block;
    margin-bottom: 5px;
}

/* ✅ 설명 */
.description {
    font-size: 12px;
    color: #666;
    margin-bottom: 15px;
}

/* ✅ 참가 버튼 */
.submit-button {
    background-color: #0575E6;
    color: white;
    padding: 14px;
    border-radius: 8px;
    display: block;
    font-size: 16px;
    text-align: center;
    border: none;
    width: 100%;
    cursor: pointer;
    margin: 10px auto;
    transition: background 0.3s ease-in-out;
}

.submit-button:hover {
    background-color: #055abc;
}

.error-message {
    color: red;
    font-size: 14px;
    margin-top: 5px;
}
.popup {
    display: none; /* 기본적으로 숨김 */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    text-align: center;
    z-index: 1000;
}
.popup button {
    margin-top: 10px;
    padding: 8px 15px;
    background-color: #4CAF50;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 5px;
}
/* ✅ 반응형 스타일 (태블릿 & 모바일 최적화) */
@media screen and (max-width: 768px) {
    .join-container {
        max-width: 90%;
        padding: 15px;
        margin: 15px auto;
    }

    h2 {
        font-size: 16px;
    }

    .match-card {
        padding: 12px;
    }

    .match-card img {
        height: 130px;
    }

    .match-info h3 {
        font-size: 14px;
    }

    .match-info p {
        font-size: 12px;
    }

    .tag {
        font-size: 11px;
        padding: 4px 8px;
    }

    form input, form select {
        font-size: 13px;
        padding: 8px;
    }

    .submit-button {
        font-size: 14px;
        padding: 10px;
    }
}

/* ✅ 초소형 기기 (최대 480px) */
@media screen and (max-width: 480px) {
    .join-container {
        max-width: 95%;
        padding: 10px;
    }

    .match-card img {
        height: 100px;
    }

    .match-info h3 {
        font-size: 13px;
    }

    .match-info p {
        font-size: 11px;
    }

    .tag {
        font-size: 10px;
        padding: 3px 6px;
    }

    form input, form select {
        font-size: 12px;
        padding: 6px;
    }

    .submit-button {
        font-size: 13px;
        padding: 8px;
    }
}
/* 체크박스 항목 라벨 줄바꿈 방지 */
div#id_age_groups label {
    display: flex;
    gap: 6px;
    font-size: 14px;
    color: hsl(0, 0%, 20%);
    cursor: pointer;
    white-space: nowrap; /* 👉 줄바꿈 막기! */
    align-items: center;
}
div#id_age_groups {
    display: grid;
    grid-template-columns: repeat(3, 1fr);  /* 3열 정렬 */
    gap: 10px 20px;
    margin-bottom: 20px;
}
.image-form {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
    border: 1px solid #eee;
    padding: 10px;
    border-radius: 8px;
    background-color: #fafafa;
}

.image-form img {
    width: 120px;
    height: auto;
    margin-bottom: 8px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.image-form label {
    font-size: 14px;
    color: #444;
    margin-bottom: 4px;
}

.remove-button {
    margin-top: 8px;
    background-color: #bbb;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
}

.age-group-container {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
}

.age-participant-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.age-participant-item {
    display: flex;
    align-items: center;
    gap: 8px;
}
form .age-groups-wrapper label {
   display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 10px;
}