* { margin: 0; padding: 0; box-sizing: border-box; }
        
@font-face{
    font-family:NexonFootbalGothic;
    src:url(./NEXON Football Gothic L.ttf) format('truetype');
    font-style:normal;
    font-weight:normal;
}

@font-face{
    font-family:JejuGothic;
    src:url(./JejuGothic.ttf) format('truetype');
    font-style:normal;
    font-weight:normal;
}
header {
    margin:0 auto;
    text-align:center;
    height:62px;
}
div {
    font-family:JejuGothic;
    line-height:140%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* 화면 높이를 최소 100% 확보 */
}

/* --- [수정] 배너 영역 기본 설정 (PC) --- */
.banner-wrapper {
    position: relative;         
    width: 100%;
    height: calc(100vh - 62px); /* 상단 헤더 공간을 제외한 화면에 꽉 차게 */
    overflow: hidden;
    cursor:pointer;                         
}

.banner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    transition: opacity 1s ease-in-out;
}

.banner a {
    display: block;
    height: 100%;
    width: 100%;
}

#banner2:hover {
    background-image: url('../image/slideimg2_2.webp') !important;
}

/* --- [수정] 메인 타이틀 영역 (PC 기본) --- */
.main_wrap {
    width:100%;
    text-align:center; 
    color:#333;
    margin-bottom: 2rem;
    padding: 3rem 15px 1rem 15px; /* 내부 여백으로 조율 */
}

.main_wrap h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

.main_wrap h2 {
    font-size: 20px;
    font-weight: normal;
    color: #666;
}

.main_title {
    margin-bottom: 25px;
    justify-content: center;
    display: flex;
}

/* --- [수정] 중간 섹션 및 하단 이미지 상자 (PC) --- */
.main_section {
    display:flex;
    justify-content:center;
    width: 100%;
    padding: 0 15px;
    margin-bottom: 5rem;
}

.main_div {
    width: 90%;          /* 기존 80%에서 90%로 가로폭을 더 넓게 확장 */
    max-width: 1200px;   /* 큰 모니터에서 너무 무한정 커지지 않도록 맥스값 상향 (기존 720px) */
    height: 320px;    /* PC 기준 고정 높이 (vh 대신 px로 안정화) */
    display:flex;
    align-items:center;
    background-position: center;
    justify-content:center;    
    background-size: contain;
    background-repeat: no-repeat;
}

.main_div_text {
    width:40%; 
    height:15vh; 
    background-color:white;
    display:flex; 
    align-items:center; 
    justify-content:center; 
    padding:10px;
    float:right;
}

/* ================================================================== */
/* 📱 [추가/수정] 반응형 미디어 쿼리 조율 (태블릿 & 모바일 대폭 개선) */
/* ================================================================== */

/* 1. 태블릿 및 일차적 반응형 (1200px 이하) */
@media (max-width: 1200px) {
    .banner-wrapper {
        height: auto; /* vh 해제 */
    }
    .banner-wrapper .banner {
        position: static;           
        height: auto;              
        aspect-ratio: 16/9; /* 비율 유지 */        
        background-size: cover; /* contain 대신 cover로 변경하여 양옆이 꽉 차고 부드럽게 안착 */
    }
}

/* 2. 스마트폰 모바일 핵심 구간 (530px 이하) ⚠️ 이 부분이 없어서 깨졌던 것입니다! */
@media (max-width: 530px) {
    .banner-wrapper .banner {
        aspect-ratio: 16/10; /* 모바일에서는 배너가 너무 위아래로 얇아지지 않게 비율을 살짝 늘림 */
    }
    
    /* 거대했던 글자 크기 축소 및 여백 압축 */
    .main_wrap {
        padding-top: 0rem;
        margin-bottom: 1rem;
    }
    .main_wrap h1 {
        font-size: 35px !important;
        margin-bottom: 6px;
    }
    .main_wrap h2 {
        font-size: 15px ;
    }
    
    /* 하단 하늘색 상자(꽃나라)가 모바일에서 자연스럽게 줄어들도록 세로 px 축소 */
    .main_div {
        width: 100%;
        height: 110px; 
    }
}
/* ================================================================== */
/* 👥 제작자 소개 페이지 (PC 기준 기본 설정)                           */
/* ================================================================== */

.member_section {
    display: flex;
    justify-content: center;
    margin-bottom: 4rem;
    width: 100%;
    padding: 0 20px;
}

.member_div_image {
    width: 80%;
    max-width: 1000px;  /* PC에서 너무 광활해지지 않도록 상한선 */
    height: 450px;      /* vh 단위 대신 안정적인 고정 px로 변경 */
    display: flex;
    align-items: center;
    border-radius: 20px;
    justify-content: flex-start; 
    padding: 60px;      /* PC 패딩 최적화 */
    color: white;
    background-size: cover;
    background-position: center top; /* 얼굴 중심 정렬 */
    box-shadow: 0 10px 25px rgba(0,0,0,0.15); /* 부드러운 그림자 효과 */
    position: relative;
    overflow: hidden;
}

/* 이미지 카드 위에 어두운 오버레이를 살짝 깔아 글씨 가독성을 높입니다 */
.member_div_image::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.1) 60%, rgba(0,0,0,0) 100%);
    z-index: 1;
}

.member_text {
    position: relative;
    z-index: 2; /* 오버레이보다 위로 올리기 */
    text-align: left;
}

.member_text h2 {
    font-family: NexonFootbalGothic, sans-serif !important;
    margin-bottom: 1rem;
    font-size: 45px; /* PC용 타이틀 크기 조정 */
    font-weight: normal;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.6);
}

.member_text p {
    font-family: NexonFootbalGothic, sans-serif !important;
    font-size: 50px; /* PC용 이름 크기 조정 */
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.6);
}


/* ================================================================== */
/* 📱 [핵심] 모바일 전용 반응형 레이아웃 조율 (530px 이하)            */
/* ================================================================== */

@media (max-width: 530px) {
    .member_section {
        margin-bottom: 2rem; /* 카드간 간격 축소 */
        padding: 0 15px;
    }

    /* 2. 카드 비율 리사이징 및 텍스트 하단 배치로 변경 (얼굴 안 가리게!) */
    .member_div_image {
        width: 100%;
        height: 240px; /* 모바일에서 보기 딱 좋은 컴팩트한 카드 높이 */
        padding: 20px; /* 웅장했던 90px 패딩을 20px로 다이어트 */
        align-items: flex-end; /* 글씨를 카드 아래쪽으로 정렬하여 얼굴 침범 방지 */
        border-radius: 12px;
    }
    
    /* 모바일에서는 그라데이션 오버레이를 아래에서 위로 깔아줍니다 */
    .member_div_image::before {
        background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0) 100%);
    }

    .member_text {
        line-height:120%;
        margin-bottom:2rem;
    }

    /* 3. 모바일 화면에 맞춰 폰트 다운사이징 */
    .member_text h2 {
        font-size: 32px !important; /* 거대했던 h2 축소 */
        margin-bottom: 2px !important;
    }

    .member_text p {
        font-size: 32px !important; /* 거대했던 이름 크기 축소 */
    }
}



.site-footer {
    background-color: #e5e5e5;   
    color: #333;                
    padding: 30px 0; /* PC는 기존처럼 여유 있게 유지 */           
    text-align: center;        
    position: relative;
    z-index: 2;
    font-family: JejuGothic, sans-serif; 
    margin-top: auto; /* 내용이 적어도 푸터가 항상 바닥에 가도록 보완 */
}

/* 푸터 내부 정돈 */
.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.footer-content .main_title {
    margin-bottom: 10px; /* 로고와 카피라이트 사이 간격 */
}

.footer-content p {
    margin: 0;
    font-size: 14px;
    color: #555;
}

@media (max-width: 530px) {
    .site-footer {
        padding: 15px 0; /* 상하 여백을 절반으로 확 줄임 */
    }

    /* 모바일에서 로고 크기 축소 */
    .footer-content .main_title img {
        width: 120px !important; /* 기존 180px에서 120px로 아담하게 변경 */
        margin: 0 auto;
    }

    /* 모바일 카피라이트 글자 크기 축소 */
    .footer-content p {
        font-size: 11px !important; 
        letter-spacing: -0.5px; /* 자간을 살짝 좁혀 한 줄에 이쁘게 나오도록 */
    }
}

/* hint */

/* ==========================================
   1. 기본 요소 공통 설정 (반응형 최적화)
   ========================================== */
input[type=text], input[type=password], input.answer {
    width: 100%;             /* 기본적으로 부모 너비에 맞춤 */

    padding: 10px 15px;
    margin: 8px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;  /* 패딩이 박스 크기를 늘리지 않도록 고정 */
    font-size: 14px;
}

textarea {
    width: 100%;             /* 모바일 대응을 위해 100%로 변경 */
    max-width: 650px;        /* PC에서 최대 크기 제한 */
    padding: 12px 20px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-family: JejuGothic;
    font-size: 14px;
    resize: none;
}

/* 버튼 공통 개정 (pt 단위를 px로 변경하여 일관성 유지) */
.button {
    border: 1px solid black;
    font-size: 14px;         /* 14pt에서 14px로 변경 */
    padding: 6px 14px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    background: #f5f5f5;
    border-radius: 4px;
    transition: all 0.2s;
}
.button:hover {
    background-color: black;
    color: white;
}

/* ==========================================
   2. 게시판 테이블 (목록) 관련
   ========================================== */
.board-table {
    width: 100%;             /* 모바일 기본 100% */
    max-width: 1000px;       /* PC 최대 해상도 제한 */
    border-collapse: collapse;
    margin: 0 auto 20px auto;
    font-size: 14px;
    table-layout: fixed;     /* 글자가 칸 밖으로 나가는 것 방지 */
}
.board-table thead {
    background-color: #f5f5f5;
    border-top: 2px solid #333;
}
.board-table thead th {
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    border-bottom: 1px solid #ddd;
}
.board-table tbody td {
    padding: 12px 8px;
    text-align: center;
    border-bottom: 1px solid #eee;
    overflow: hidden;
    text-overflow: ellipsis; /* 너무 길면 말줄임표(...) */
    white-space: nowrap;
}
/* 제목 칸은 줄바꿈 허용 */
.board-table tbody td.title {
    text-align: left;
    white-space: normal;
    word-break: break-all;
}
.board-table tbody tr {
    cursor: pointer;
    transition: background 0.2s;
}
.board-table tbody tr:hover {
    background: #fafafa;
}

/* 글쓰기 버튼 정렬용 wrapper */
.text {
    text-align: center;
    padding-top: 20px;
    color: #000000;
}
.text:hover {
    text-decoration: underline;
}
a:link { color:black; text-decoration:none;}
a:visited { color:black; text-decoration:none;}

/* ==========================================
   3. 페이징 (Pagination) 관련
   ========================================== */
.paging {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}
.paging ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;         /* 모바일에서 버튼이 많으면 다음줄로 자연스럽게 넘어가게 함 */
    gap: 4px;
    padding: 0;
    justify-content: center;
}
.clickbutton, .currentbutton {
    border: 1px solid black;
    font-size: 13px;         /* 모바일 가독성을 위해 단위를 px로 조정 */
    padding: 4px 10px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    border-radius: 4px;
}
.clickbutton:hover {
    background-color: black;
    color: white;
}
.currentbutton {
    font-weight: 600;
    background-color: #dcdcdc;
}

/* ==========================================
   4. 검색창 (SearchBox) 관련 - Flexbox 정렬
   ========================================== */
.searchBox {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 20px auto;
    width: 100%;
    max-width: 500px;
    padding: 0 15px;
    box-sizing: border-box;
    
}
.searchBox select,
.searchBox input[type="text"] {
    height: 38px;
    padding: 0 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    font-family: JejuGothic;
}
.searchBox select {
    flex-shrink: 0;          /* 크기 고정 */
}
.searchBox input[type="text"] {
    flex: 1;                 /* 남은 공간을 알아서 꽉 채우도록 설정 */
    min-width: 120px;
}
.searchBox .button {
    height: 38px;
    padding: 0 16px;
    font-size: 14px;
    box-sizing: border-box;
    flex-shrink: 0;
    margin: 0 !important; 
    font-family: JejuGothic;   /* 기존 마진 간섭 제거 */
}

/* ==========================================
   5. 공지사항 상세 보기 (view_hint / view_notice)
   ========================================== */
.view_table {
    width: 100%;
    max-width: 1000px;
    margin: 20px auto;
    border: 1px solid #ddd;
    border-collapse: collapse;
    background: #fff;
    table-layout: fixed; /* 4열 구조를 단정하게 고정 */
}

.view_table .view_title {
    font-size: 18px;
    font-weight: bold;
    padding: 14px;
    text-align: center;
    border-bottom: 1px solid #eee;
    background: #fafafa;
    word-break: break-all;
}

/* 테이블의 행(Row) 공통 스타일 */
.view_table .view_id,
.view_table .view_id2 {
    padding: 10px;
    font-size: 14px;
    border-bottom: 1px solid #eee;
}

/* 항목 이름 셀 (작성자, 조회수, 작성일) */
.view_table .view_id {
    font-weight: bold;
    background: #f9f9f9;
    width: 80px;          /* PC 기준 고정 너비 */
    text-align: center;
    white-space: nowrap;  /* 글자 줄바꿈 방지 */
}

/* 실제 데이터가 들어가는 셀 */
.view_table .view_id2 {
    background: #fff;
    word-break: break-all; /* 긴 영문/숫자 자동 줄바꿈 */
}

/* 본문 내용 영역 */
.view_table .view_content {
    padding: 20px;
    line-height: 1.6;
    font-size: 15px;
    color: #333;
    background: #fff;
    min-height: 300px;
    text-align: left;  
    vertical-align: top; 
    word-break: break-all;
}

/* 하단 버튼 영역 */
.view_btn {
    text-align: center;
    margin: 20px 0;
}


/* ==========================================
   [반응형 스타일 - 모바일 화면 (768px 이하)]
   ========================================== */
@media screen and (max-width: 768px) {
    /* 테이블 레이아웃 고정을 풀고 일반 블록 요소처럼 다룹니다. */
    .view_table {
        table-layout: auto !important;
    }

    /* 반응형을 적용할 중간 행(작성자, 조회수, 작성일 부분) */
    .view_table .responsive_row, 
    .view_table .responsive_row td {
        display: block;
        width: 100% !important; /* 기존에 선언된 너비와 colspan 무력화 */
        box-sizing: border-box;
    }

    /* 한 줄을 [이름(좌) + 내용(우)] 구조로 만들기 위해 Flexbox 적용 */
    .view_table .responsive_row {
        display: flex;
        flex-wrap: wrap;
        border-bottom: 1px solid #eee; /* 원래 tr 경계선 재현 */
    }

    /* 모바일 환경에서의 2열 구조 비율 설정 */
    .view_table .responsive_row .view_id {
        width: 25% !important;  /* '작성자', '조회수' 등의 너비 */
        border-bottom: none;    /* 내부 셀 경계선 제거 */
    }

    .view_table .responsive_row .view_id2 {
        width: 75% !important;  /* 실제 데이터 영역의 너비 */
        border-bottom: none;    /* 내부 셀 경계선 제거 */
    }
}

.comment_table {
    width: 100%;
    max-width: 1000px;
    margin: 20px auto;
    border-collapse: collapse;
}

/* --- 댓글 리스트 스타일 --- */
.comment_row {
    border-bottom: 1px solid #eee;
}
.comment_row td {
    padding: 15px 10px;
    font-size: 14px;
    vertical-align: middle;
}
.comment_id {
    width: 15%;
    text-align: center;
    font-weight: bold;
    color: #333;
}
.comment_content {
    width: 55%;
    text-align: left;
    word-break: break-all;
    color: #444;
}
.comment_meta {
    width: 30%;
    text-align: center;
    color: #888;
    font-size: 13px;
}
.comment_meta .delete {
    margin-left: 8px;
    padding: 3px 8px;
    font-size: 11px;
    background: #ff4d4f;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

/* --- 댓글 작성란 스타일 (PC) --- */
.write_row td {
    padding: 20px 0;
}
.comment_form {
    display: flex;
    align-items: center;
    background: #fcfcfc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    gap: 15px;
}
.write_user {
    width: 15%;
    text-align: center;
}
.user_badge {
    font-weight: bold;
    font-size: 14px;
    color: #4a5568;
    /* background: #edf2f7; */
    padding: 6px 12px;
    border-radius: 20px;
    display: inline-block;
}
.write_input {
    width: 73%;
}
.write_input textarea {
    width: 100%;
    height: 50px;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    resize: none;
    font-size: 14px;
    font-family: JejuGothic;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.write_input textarea:focus {
    outline: none;
    border-color: #3b82f6;
}
.write_action {
    width: 12%;
}
.comment_submit_btn {
    width: 100%;
    height: 50px;
    background: #959595;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
}


/* ==========================================
   [반응형 스타일 - 모바일 화면 (768px 이하)]
   ========================================== */
@media screen and (max-width: 768px) {
    /* 테이블의 격자 구조를 깨고 블록화 */
    .comment_table, 
    .comment_table tbody, 
    .comment_row, 
    .comment_row td,
    .write_row,
    .write_row td {
        display: block;
        width: 100% !important;
        box-sizing: border-box;
    }

    /* --- 모바일 댓글 리스트 배치 --- */
    .comment_row {
        display: flex;
        flex-wrap: wrap;
        padding: 12px 5px;
        border-bottom: 1px solid #ededed;
    }
    .comment_row td {
        padding: 4px 5px !important;
    }
    .comment_id {
        width: 40% !important;
        text-align: left;
    }
    .comment_meta {
        width: 60% !important;
        text-align: right;
    }
    .comment_content {
        width: 100% !important;
        margin-top: 6px;
    }

    /* --- 모바일 댓글 작성란 배치 --- */
    .write_row td {
        padding: 15px 5px !important;
    }
    .comment_form {
        flex-direction: column; /* 가로 배열을 세로 배열로 변경 */
        align-items: stretch;
        gap: 10px;
        padding: 12px;
    }
    .write_user, .write_input, .write_action {
        width: 100% !important;
        text-align: left;
    }
    .write_input textarea {
        height: 70px; /* 입력창 늘림 */
    }
    .comment_submit_btn {
        height: 40px;
    }
}

/* ==========================================
   7. 글쓰기 폼 (write_hint / write_notice)
   ========================================== */
.board-write {
    width: 100%;
    max-width: 800px;
    margin: 20px auto;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    font-family: "Noto Sans KR", sans-serif;
    box-sizing: border-box;
}
.board-header {
    background: #f7f7f7;
    border-bottom: 1px solid #ddd;
    padding: 14px;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
}
.form-group {
    display: flex;
    border-bottom: 1px solid #eee;
    padding: 14px 16px;
    align-items: center;
}
.form-group label {
    width: 80px;
    font-weight: bold;
    color: #333;
    flex-shrink: 0;          /* 라벨 크기 유지 */
}
.form-group input[type="text"],
.form-group textarea {
    flex: 1;
    width: 100%;
    max-width: 100%;         /* 제한 해제하여 부모 영역 채우기 */
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 10px;
    font-size: 14px;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input[type="text"]:focus,
.form-group textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 4px rgba(59,130,246,0.3);
    outline: none;
}
.form-group textarea {
    resize: vertical;
    min-height: 200px;
}
.form-footer {
    padding: 14px 16px;
    text-align: right;
    background: #fafafa;
}
.btn {
    background: #3b82f6;
    color: #fff;
    border: none;
    padding: 8px 18px;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
}
.btn:hover {
    background: #2563eb;
}

/* ==========================================
   📱 8. 모바일 반응형 최종 보정 (600px 이하 해상도)
   ========================================== */
@media screen and (max-width: 600px) {
    /* 테이블 폭 압축 및 덜 중요한 칼럼 숨김 처리 가능 */
    .board-table thead th:nth-child(5), 
    .board-table tbody td:nth-child(5) { 
        display: none;        /* 조회수 열 모바일에서 숨김 처리 */
    }
    .board-table thead th:nth-child(1),
    .board-table tbody td:nth-child(1) {
        width: 40px;          /* 번호 칸 축소 */
    }
    .board-table thead th:nth-child(3),
    .board-table tbody td:nth-child(3) {
        width: 70px;          /* 작성자 칸 축소 */
    }
    
    /* 글쓰기 레이아웃을 위아래 배치로 전환 */
    .form-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .form-group label {
        width: 100%;
    }
}


/*  flowerrank.php*/

/* ================================================================== */
/* 🏆 꽃의 전당 (랭킹 페이지 기본 및 PC 스타일)                         */
/* ================================================================== */

/* 랭킹 리스트 전체 감싸는 상자 */
.rank-container {
    width: 90%;
    max-width: 700px; /* PC에서 너무 퍼지지 않게 중앙 집중 */
    margin: 0 auto;
    background: #fff;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.rank-list {
    display: flex;
    flex-direction: column;
    gap: 12px; /* 아이템 간의 간격 */
    margin-top: 20px;
}

/* 개별 등수 한 줄 스타일 */
.rank-item {
    display: flex;
    align-items: center;
    justify-content: space-between; /* 양 끝과 가운데에 균등 분배 */
    padding: 15px 25px;
    background-color: #f9f9f9;
    border-radius: 12px;
    border-left: 5px solid #ddd; /* 기본 테두리 */
    transition: all 0.2s ease;
}

/* 1, 2, 3등 하이라이트 왼쪽 포인트 컬러 */
.rank-item.first { border-left-color: #ffd214; background-color: #fffbeb; }
.rank-item.second { border-left-color: #b1b1b1; background-color: #f3f3f3; }
.rank-item.third { border-left-color: #cc7a33; background-color: #faf3ee; }

/* 내부 글자 영역별 너비 할당 (줄바꿈 원천 차단) */
.rank-position {
    font-weight: bold;
    color: #ff6b6b;
    width: 50px;       /* 등수 영역 고정폭 */
    text-align: left;
}

.rank-name {
    font-weight: 500;
    color: #333;
    flex: 1;           /* 남는 공간을 닉네임이 차지함 */
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis; /* 혹시 이름이 너무 길면 ... 처리 */
    white-space: nowrap;
}

.rank-room {
    font-weight: normal;
    color: #666;
    width: 70px;       /* 천사/악마/방번호 영역 고정폭 */
    text-align: right;
}

/* 하단 통계문구 정돈 */
.rank-stats {
    margin-top: 40px;
    text-align: center;
    line-height: 1.6;
    color: #666;
    font-size: 15px;
}


/* ================================================================== */
/* 📱 [핵심] 꽃의 전당 모바일 반응형 조율 (530px 이하)                */
/* ================================================================== */

@media (max-width: 530px) {
    .rank-container {
        width: 100%;       /* 모바일 화면 꽉 차게 변경 */
        padding: 20px 15px; /* 내부 여백 줄여서 가로 공간 확보 */
        border-radius: 12px;
    }
    
    .rank-title {
        font-size: 24px !important; /* 타이틀 크기 압축 */
        margin-bottom: 10px;
    }

    /* 모바일 개별 등수 칸 디자인 다이어트 */
    .rank-item {
        padding: 12px 15px; /* 양옆 패딩을 줄여 글자 공간 마련 */
        gap: 10px;          /* 요소들 사이 최소 간격 */
    }

    .rank-position {
        font-size: 14px !important;
        width: 40px;        /* 좁은 화면에 맞춰 등수 폭 축소 */
    }

    .rank-name {
        font-size: 15px !important; /* 이름 글자 크기 최적화 */
    }

    .rank-room {
        font-size: 13px !important;
        width: 55px;        /* 좁은 화면에 맞춰 소속 폭 축소 */
    }
    
    .rank-stats {
        font-size: 13px !important; /* 하단 통계 폰트 축소 */
        margin-top: 25px;
    }
}

.canvasBtn { display:none; }
canvas{z-index:10;pointer-events: none;position: fixed;top: 0;transform: scale(1.1);}


/* past.php */
/* ================================================================== */
/* 🌸 과거 페이지 기본 및 PC 스타일                                   */
/* ================================================================== */

/* 1. 상단 메뉴 버튼 영역 */
.past_menu_wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;          /* 버튼 사이 간격 */
    margin-bottom: 30px;
    flex-wrap: wrap;    /* [핵심] 공간 부족하면 자연스럽게 다음 줄로 */
    padding: 0 15px;
}

.past_menu, .past_menu_not_clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    background-color: var(--btn-color, #eee);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
    min-width: 90px;    /* 버튼이 너무 찌그러지지 않게 최소폭 지정 */
    text-align: center;
}

/* 미해금 메뉴는 어둡게 처리 */
.past_menu_not_clear {
    background-color: #ddd !important;
    color: #999;
    cursor: not-allowed;
    box-shadow: none;
}

.past_menu:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

/* 2. 문제 리스트 본문 영역 */
.past_main_wrap {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.past_main_wrap h2 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 24px;
    color: #333;
}

/* 문제 카드들을 감싸는 컨테이너 */
.past_wrap_container {
    display: flex;
    flex-wrap: wrap;    /* 가로 공간 부족 시 다음 줄로 */
    justify-content: center; 
    gap: 20px;          /* 카드 감격 */
    width: 100%;
}

/* 개별 문제 카드 상자 */
.past_wrap {
    width: calc(25% - 15px); /* PC에서는 한 줄에 4개씩 배정 (여백 감안) */
    min-width: 200px;
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s;
    box-sizing: border-box;
}

.past_wrap:hover {
    transform: scale(1.03);
}

/* 카드 안의 이미지 비율 유지 및 꽉 차게 */
.past_wrap img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 10px;
    object-fit: cover;
}

.past_wrap b {
    display: block;
    font-size: 15px;
    color: #444;
    word-break: keep-all; /* 단어 단위 줄바꿈 */
}


/* ================================================================== */
/* 📱 과거 페이지 모바일 반응형 조율 (768px 이하 / 480px 이하)         */
/* ================================================================== */

/* 태블릿 및 큰 모바일 (한 줄에 2개씩) */
@media (max-width: 768px) {
    .past_wrap {
        width: calc(50% - 10px); /* 화면 폭 절반씩 차지 (한 줄에 2개) */
    }
    
    .past_menu {
        padding: 8px 16px;
        font-size: 14px;
        min-width: 80px;
    }
}

/* 작은 모바일 화면 (한 줄에 2개 유지하되 간격 다이어트) */
@media (max-width: 480px) {
    .past_menu_wrap {
        gap: 8px; /* 버튼 간격 더 좁게 */
    }
    
    .past_menu, .past_menu_not_clear {
        padding: 8px 12px;
        font-size: 13px;
        min-width: 75px;
        flex: 1 1 calc(33.33% - 8px); /* 모바일에서 3열 배치로 예쁘게 떨어지도록 유도 */
    }

    .past_wrap_container {
        gap: 12px; /* 카드 간격 축소 */
    }

    .past_wrap {
        width: calc(50% - 6px); /* 좁은 모바일에서도 한 줄에 2개씩 정렬 */
        padding: 10px;
    }
    
    .past_wrap b {
        font-size: 13px; /* 폰트 살짝 축소 */
    }
}