/* ==================== 공통 스타일 ==================== */
:root {
    --background-color: #f8f9fa;
    --border-color: #dee2e6;
    --primary-color: #4a90e2;
}

body { 
    /*background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important; */
    min-height: 100vh; 
}

/* ==================== ADMIN.HTML 스타일 ==================== */
.main-container { 
    max-width: 1650px;
    margin: 30px auto; 
    background: #fff; 
    border-radius: 14px; 
    box-shadow: 0 8px 32px rgba(0,0,0,0.10); 
    padding: 18px; 
}

.top-bar { 
    display: flex; 
    justify-content: flex-end; 
    margin-bottom: 18px; 
}

.btn-add-member { 
    font-size: 1rem; 
    padding: 7px 20px; 
    border-radius: 8px; 
    background: #4b8fff; 
    color: #fff; 
    border: none; 
    box-shadow: 0 2px 8px rgba(80,80,140,0.09);
}

.btn-add-member:hover { 
    background: #2e6be6; 
}

.board-flex { 
    display: flex; 
    gap: 6px;
}

/* 좌측: 등록된모임원 */
.col-members { 
    flex: 1 1 0; 
    min-width: 250px;
	max-width: 370px;
}

/* 중앙-좌: 오늘참여자 */
.col-participants { 
    flex: 1.1 1 0; 
    min-width: 270px;
    max-width: 430px;
}

/* 중앙-우: 1팀/2팀 */
.col-teams { 
    flex: 1.1 1 0; 
    min-width: 270px;
    max-width: 420px;
    display: flex; 
    flex-direction: column; 
    gap: 14px; 
}

/* 우측: 채팅/알림 */
.col-chat { 
    flex: 0.8 1 0; 
    min-width: 270px;
    max-width: 390px;
    display: flex; 
    flex-direction: column;
    gap : 8px;
}

.section-card { 
    background: #f7f8fc; 
    border-radius: 10px; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.04); 
    /*padding: 13px 12px 10px 12px;*/ 
}

.section-header { 
    font-size: 1.05rem; 
    font-weight: 700; 
    color: #fff; 
    padding: 7px 13px; 
    border-radius: 8px 8px 0 0; 
    margin-bottom: 10px; 
}

.today-header { 
    background: linear-gradient(45deg, #667eea, #764ba2);
}

.member-section-header { 
    background: linear-gradient(45deg, #4CAF50, #45a049);
}

.team1-header { 
    background: linear-gradient(45deg, #FF6B6B, #ee5a52);
}

.team2-header { 
    background: linear-gradient(45deg, #4ECDC4, #44A08D);
}

.member-list { 
    min-height: 200px; 
    max-height: 620px; 
    overflow-y: auto; 
    padding: 8px;
}

.member-item { 
    background: #f8f9fa; 
    border: 1.5px solid #e9ecef; 
    border-radius: 8px; 
    padding: 8px 10px; 
    margin-bottom: 7px; 
    cursor: move; 
    transition: all 0.2s; 
    position: relative;
}

.member-item:hover { 
    background: #e3f2fd; 
    border-color: #2196f3; 
    transform: translateY(-2px); 
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

/* 개별 멤버 정보 - 수정된 레이아웃 */
.member-info { 
    display: flex; 
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
}

.member-name { 
    font-weight: bold; 
    font-size: 0.98rem; 
    color: #2c3e50; 
    display: flex; 
    align-items: center; 
    gap: 6px;
}

/* 추가: 텍스트만 오버플로우 처리 */
.member-name-text {
    flex: 1;
    min-width: 0;
    max-width: 280px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: bold;
    font-size: 0.75rem;
    color: #2c3e50;
}

/* 추가: 배지 그룹 */
.member-badges {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-shrink: 0;
}

.member-actions { 
    display: flex; 
    gap: 6px; 
    align-items: center;
    flex-shrink: 0;
}

/* 수정된 badge-num (원형 중앙정렬) */
.badge-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    font-size: 11px;
    font-weight: bold;
    color: #fff;
    background: #fa3e3e;
    border-radius: 50%;
    margin-left: 4px;
    text-align: center;
    line-height: 1;
}

.pc-badge { 
    display: inline-block; 
    border-radius: 9px; 
    padding: 1px 7px; 
    font-size: 0.7rem; 
    font-weight: bold; 
    margin-left: 4px; 
    background: #ccc; 
    color: #fff; 
    cursor: pointer; 
    user-select: none; 
    transition: background 0.2s; 
    vertical-align: middle;
}

.pc-badge.active { 
    background: #dc3545 !important; 
    color: #fff;
}

.rest-badge { 
    display: inline-block; 
    border-radius: 9px; 
    padding: 1px 7px; 
    font-size: 0.7rem; 
    font-weight: bold; 
    margin-left: 4px; 
    background: #ccc; 
    color: #fff; 
    cursor: pointer; 
    user-select: none; 
    transition: background 0.2s; 
    vertical-align: middle;
}

.rest-badge.active { 
    background: #28a745 !important; 
    color: #fff;
}

.edit-btn,
.delete-btn {
    display: grid;
    place-items: center;
    place-content: center;    /* 추가: 콘텐츠 중앙 정렬 강화 */

    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    box-sizing: border-box;

    /* 텍스트 정렬 강화 */
    text-align: center;
    line-height: 1;          /* 수직 정렬 개선 */
    vertical-align: middle;

    font-size: 11px;
    cursor: pointer;

    /* Flex 속성 제거 방지 */
    flex: 0 0 22px;
    flex-shrink: 0;
}



/* edit-btn 스타일 */
.edit-btn {
    background: #ffc107;
    color: #000;
}

.edit-btn:hover {
    background: #e0a800;
    transform: scale(1.1);    /* 호버 시 살짝 확대 */
}

/* delete-btn 스타일 */
.delete-btn {
    background: #dc3545;
    color: #fff;
}

.delete-btn:hover {
    background: #c82333;
    transform: scale(1.1);    /* 호버 시 살짝 확대 */
}

.small-stats { 
    font-size: 9px; 
    color: #888; 
    margin-left: 4px; 
    font-weight: normal; 
    letter-spacing: -0.5px; 
    vertical-align: middle;
}

.empty-state { 
    text-align: center; 
    color: #6c757d; 
    padding: 28px 8px;
}

.empty-state i { 
    font-size: 1.6rem; 
    margin-bottom: 10px; 
    opacity: 0.5;
}

.drop-zone { 
    border: 1.5px dashed #dee2e6; 
    border-radius: 7px; 
    min-height: 60px; 
    transition: all 0.2s;
}

.drop-zone.drag-over { 
    border-color: #007bff; 
    background: rgba(0,123,255,0.08);
}

.team-power { 
    font-size: 0.85rem; 
    padding: 3px 8px;
}

.chat-panel { 
    background: #f7f8fc; 
    border-radius: 10px; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.04); 
    /*padding: 13px 12px 10px 12px;*/ 
    min-height: 240px; 
    display: flex; 
    flex-direction: column;
}

.chat-header { 
    font-size: 1.05rem; 
    font-weight: 700; 
    color: #fff; 
    padding: 7px 13px; 
    border-radius: 8px 8px 0 0; 
    margin-bottom: 10px; 
    background: linear-gradient(45deg, #222, #888);
}

.chat-list { 
    flex: 1; 
    overflow-y: auto; 
    padding: 0; 
    margin: 0; 
    list-style: none; 
    min-height: 200px; 
    max-height: 300px;
}

.chat-msg { 
    background: #fff; 
    border-radius: 7px; 
    padding: 9px 13px; 
    margin-bottom: 8px; 
    font-size: 0.96rem; 
    box-shadow: 0 1px 4px rgba(80,80,140,0.06); 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
}

.chat-msg .msg-text { 
    color: #333; 
}

.chat-actions { 
    display: flex; 
    gap: 8px; 
}

.btn-accept, .btn-decline { 
    font-size: 0.75rem; 
    border-radius: 7px; 
    padding: 2px 12px; 
    border: none; 
}

.inline-time {
    color: #999;
    font-size: 0.85em;
    font-weight: normal;
    margin-left: 4px;
}

.btn-accept { 
    background: #4CAF50; 
    color: #fff;
}

.btn-accept:hover { 
    background: #388e3c;
}

.btn-decline { 
    background: #fa3e3e; 
    color: #fff;
}

.btn-decline:hover { 
    background: #b71c1c;
}

.control-panel { 
    background: #fff; 
    border-radius: 10px; 
    padding: 15px 15px 10px 15px; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.04); 
    margin-bottom: 14px;
}

.game-btn { 
    border-radius: 7px; 
    padding: 7px 18px; 
    font-weight: bold; 
    margin: 3px; 
    font-size: 0.98rem;
}

.game-btn:hover { 
    transform: translateY(-1px); 
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* ==================== HOME.HTML 스타일 ==================== */
/* home.html용 main-container (admin과 다름) */
.home-main-container {
    max-width: 1100px;
    margin: 40px auto;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.10);
    padding: 38px 18px 30px 18px;
}

.home-page-container .top-section {
    position: relative;
    width: 100%;
    min-height: 250px;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 20px;
    padding: 10px 0;
}

.home-page-container .main-info-col {
    flex-grow: 1;
    text-align: center;
    order: 1;
}

.home-page-container #civilwar-title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -1px;
    color: #4b3aff;
}

.flex-board {
    display: flex;
    gap: 30px;
}

.teams-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.team-card {
    background: #f7f8fc;
    border-radius: 12px;
    padding: 22px 18px 16px 18px;
    box-shadow: 0 2px 10px rgba(80,80,140,0.04);
}

.team-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 13px;
    color: #fff;
    padding: 7px 14px;
    border-radius: 8px 8px 0 0;
    letter-spacing: -0.5px;
}

.team1-title { 
    background: linear-gradient(45deg, #FF6B6B, #ee5a52);
}

.team2-title { 
    background: linear-gradient(45deg, #4ECDC4, #44A08D);
}

.user-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.user-list li {
    background: #f3f4fa;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 8px;
    font-size: 1.05rem;
    font-weight: 500;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 0.5px 2px rgba(80,80,140,0.04);
}

.user-list li:last-child { 
    margin-bottom: 0; 
}

/* home.html용 badge-num (admin과 다름) */
.home-badge-num {
    display: inline-block;
    min-width: 20px;
    padding: 0 7px;
    font-size: 13px;
    font-weight: bold;
    color: #fff;
    background: #fa3e3e;
    border-radius: 12px;
    text-align: center;
    margin-left: 4px;
    vertical-align: middle;
}

.wait-col {
    flex: 1; /* 반반 비율 */
    background: #f7f8fc;
    border-radius: 12px;
    padding: 22px 18px 16px 18px;
    box-shadow: 0 2px 10px rgba(80,80,140,0.04);
    display: flex;
    flex-direction: column;
    min-width: 240px;
    min-height: 600px;
}

.wait-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 13px;
    color: #fff;
    padding: 7px 14px;
    border-radius: 8px 8px 0 0;
    background: linear-gradient(45deg, #667eea, #764ba2);
    letter-spacing: -0.5px;
}

.btn-area {
    margin-top: 30px;
    text-align: center;
}

.btn-action {
    font-size: 1.08rem;
    font-weight: 600;
    padding: 8px 28px;
    border-radius: 10px;
    margin: 0 7px;
    box-shadow: 0 2px 8px rgba(100,100,180,0.09);
    transition: background 0.18s, color 0.18s;
}

.btn-join { 
    background: #4b8fff; 
    color: #fff; 
    border: none;
}

.btn-join:hover { 
    background: #2e6be6; 
    color: #fff;
}

.btn-join:disabled {
    background-color: #a9c7ff;
    border: 1px solid #7daaff;
    color: #fff;
}

.btn-cancel { 
    background: #fff; 
    color: #d43f3a; 
    border: 2px solid #d43f3a;
}

.btn-cancel:hover { 
    background: #d43f3a; 
    color: #fff;
}

.alert-area { 
    min-height: 38px; 
    margin-top: 10px;
}

/* ==================== MATCH-HISTORY.HTML 스타일 ==================== */
.match-history-container {
    max-width: 1000px;
    margin: 40px auto;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.10);
    padding: 30px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f8f9fa;
}

.page-title {
    margin: 0;
    color: #333;
    font-size: 1.8rem;
    font-weight: 700;
}

.header-stats {
    display: flex;
    gap: 30px;
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #4b8fff;
}

.filter-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.search-box {
    position: relative;
}

.filter-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.filter-btn.active {
    background: #4b8fff;
    color: white;
    border-color: #4b8fff;
}

/* 날짜 필터 스타일 추가 */
.date-filter-buttons {
    display: flex;
    gap: 10px;
    margin-top: 24px;
}

.date-filter-buttons .btn {
    flex: 1;
}

.match-list {
    margin-bottom: 30px;
}

.match-item {
    background: #f7f8fc;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.2s ease;
}

.match-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

.match-date {
    display: flex;
    flex-direction: column;
}

.match-date .date {
    font-weight: 600;
    color: #333;
}

.match-date .time {
    font-size: 0.9rem;
    color: #666;
}

.match-duration {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
    font-size: 0.9rem;
}

.match-map {
    background: #4b8fff;
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
}

.teams-result {
    display: flex;
    align-items: center;
    gap: 20px;
}

.team-section {
    flex: 1;
    background: white;
    border-radius: 10px;
    padding: 15px;
    transition: all 0.2s ease;
}

.team-section.winner {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 2px solid #28a745;
}

.team-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.team-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: #333;
}

.winner-badge {
    background: #28a745;
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

.team-players {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.player-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 8px;
    background: #f8f9fa;
    border-radius: 6px;
}

.player-name {
    font-weight: 500;
    color: #333;
}

.player-rank {
    background: #6c757d;
    color: white;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
}

.vs-divider {
    background: #4b8fff;
    color: white;
    padding: 10px 15px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.9rem;
    min-width: 50px;
    text-align: center;
}

.load-more-section {
    text-align: center;
    margin-bottom: 20px;
}

.load-more-btn {
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.load-more-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.loading-state, .empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.empty-state h4 {
    color: #333;
    margin-bottom: 10px;
}

/* ==================== 반응형 디자인 ==================== */
@media (max-width: 1600px) {
    .main-container {
        max-width: 100%;
        margin: 20px;
    }
    
    .board-flex {
        gap: 18px;
    }
}

@media (max-width: 1200px) {
    .board-flex { 
        flex-direction: column; 
        gap: 15px;
    }
    
    .col-members, .col-participants, .col-teams, .col-chat { 
        min-width: 0; 
        max-width: 100%; 
    }
}

@media (max-width: 991.98px) {
    .main-container { 
        padding: 8px; 
    }
    
    .home-main-container { 
        padding: 10px 2px; 
    }
    
    .board-flex { 
        flex-direction: column; 
        gap: 10px;
    }
    
    .col-members, .col-participants, .col-teams, .col-chat { 
        min-width: 0; 
        max-width: 100%; 
    }
    
    .chat-panel { 
        min-height: 120px;
    }
    
    .flex-board { 
        flex-direction: column; 
        gap: 16px;
    }
    
    .wait-col { 
        min-width: 0; 
        min-height: 400px;
    }
}

@media (max-width: 768px) {
    body {
        background: #f4f6f8;
        overflow-x: hidden;
    }

    .admin-main-container {
        margin: 0;
        padding: 10px 10px 14px;
        border-radius: 0;
        box-shadow: none;
        background: #f4f6f8;
    }

    .admin-main-container .top-bar {
        align-items: stretch !important;
        flex-direction: column;
        gap: 8px !important;
        margin-bottom: 10px;
    }

    .admin-main-container .top-bar > div {
        width: 100%;
        flex-wrap: wrap;
    }

    .admin-main-container .top-bar .ms-auto {
        margin-left: 0 !important;
        justify-content: stretch;
    }

    .admin-main-container #civilwarDay {
        display: block;
        width: 100%;
        font-size: 1rem !important;
        line-height: 1.35;
    }

    .admin-main-container #createTodayMatchBtn,
    .admin-main-container #openOperatorModalBtn,
    .admin-main-container .btn-add-member {
        flex: 1 1 0;
        min-width: 0;
        min-height: 42px;
        padding: 8px 10px;
        font-size: 0.9rem;
        white-space: normal;
    }

    .admin-main-container .control-panel {
        display: grid;
        grid-template-columns: auto 1fr;
        gap: 8px;
        align-items: center;
        padding: 10px;
        margin-bottom: 10px !important;
        border: 1px solid #e6e9ee;
        box-shadow: none;
    }

    .admin-main-container .control-panel .form-label {
        margin: 0;
        font-size: 0.9rem;
        white-space: nowrap;
    }

    .admin-main-container .control-panel .form-select {
        width: 100% !important;
        margin: 0 !important;
        min-height: 42px;
    }

    .admin-main-container .control-panel .game-btn {
        grid-column: span 2;
        width: 100%;
        min-height: 42px;
        margin: 0;
        padding: 8px 10px;
        font-size: 0.92rem;
    }

    .admin-main-container .board-flex {
        flex-direction: row;
        gap: 10px;
        margin: 0 -10px;
        padding: 0 10px 10px;
        overflow-x: auto;
        overflow-y: visible;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .admin-main-container .col-members,
    .admin-main-container .col-participants,
    .admin-main-container .col-teams,
    .admin-main-container .col-chat {
        flex: 0 0 88vw;
        min-width: 0;
        max-width: none;
        scroll-snap-align: start;
    }

    .admin-main-container .col-teams {
        gap: 10px;
    }

    .admin-main-container .section-card,
    .admin-main-container .section-card2,
    .admin-main-container .chat-panel {
        background: #fff;
        border: 1px solid #e6e9ee;
        border-radius: 8px;
        box-shadow: none;
        overflow: hidden;
    }

    .admin-main-container .section-header,
    .admin-main-container .chat-header {
        display: flex;
        align-items: center;
        gap: 6px;
        min-height: 42px;
        margin-bottom: 0;
        padding: 8px 10px;
        border-radius: 0;
        font-size: 0.95rem;
        line-height: 1.2;
    }

    .admin-main-container .team-power {
        margin-left: auto;
        padding: 0;
        font-size: 0.78rem;
        white-space: nowrap;
    }

    .admin-main-container .member-list {
        min-height: 52vh;
        max-height: 52vh;
        padding: 8px;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .admin-main-container #team1-members,
    .admin-main-container #team2-members {
        min-height: 24vh;
        max-height: 24vh;
    }

    .admin-main-container .member-item {
        margin-bottom: 8px;
        padding: 9px 10px;
        border-radius: 8px;
        touch-action: manipulation;
        user-select: none;
    }

    .admin-main-container .member-item:hover {
        transform: none;
    }

    .admin-main-container .member-info {
        gap: 6px;
        min-width: 0;
    }

    .admin-main-container .member-name-text {
        max-width: none;
        min-width: 0;
        font-size: 0.82rem;
        line-height: 1.25;
    }

    .admin-main-container .member-badges {
        gap: 3px;
    }

    .admin-main-container .badge-num {
        width: 22px;
        height: 22px;
        margin-left: 0;
        font-size: 11px;
    }

    .admin-main-container .pc-badge,
    .admin-main-container .rest-badge {
        margin-left: 0;
        padding: 2px 6px;
        font-size: 0.68rem;
    }

    .admin-main-container .small-stats {
        display: none;
    }

    .admin-main-container .edit-btn,
    .admin-main-container .delete-btn {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
        font-size: 12px;
    }

    .mobile-sortable-chosen {
        background: #eaf3ff !important;
        border-color: #4b8fff !important;
    }

    .mobile-sortable-ghost {
        opacity: 0.35;
    }

    .mobile-sortable-drag {
        opacity: 0.96;
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
    }

    .admin-main-container .chat-panel {
        min-height: 0;
    }

    .admin-main-container .chat-list {
        min-height: 32vh;
        max-height: 32vh;
        padding: 8px;
        overscroll-behavior: contain;
    }

    .admin-main-container .chat-msg {
        align-items: flex-start;
        gap: 8px;
        padding: 9px 10px;
        font-size: 0.88rem;
    }

    .admin-main-container .chat-actions {
        flex-shrink: 0;
        gap: 5px;
    }

    .admin-main-container .btn-accept,
    .admin-main-container .btn-decline {
        min-height: 30px;
        padding: 4px 8px;
        font-size: 0.72rem;
    }

    .home-container {
        max-width: none;
        padding: 0;
    }

    .home-page-container {
        margin: 0;
        padding: 10px 10px 14px;
        border-radius: 0;
        box-shadow: none;
        background: #f4f6f8;
    }

    .home-page-container .top-section {
        min-height: 0;
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 0;
    }

    .home-page-container .main-info-col,
    .home-page-container #home-notification-box {
        width: 100%;
        order: initial;
    }

    .home-page-container .main-info-col {
        background: #fff;
        border: 1px solid #e6e9ee;
        border-radius: 8px;
        padding: 16px 12px;
    }

    .home-page-container #civilwar-title {
        font-size: 1.28rem;
        line-height: 1.35;
        word-break: keep-all;
    }

    .home-page-container #civilwar-status {
        margin-bottom: 0 !important;
        font-size: 0.92rem;
    }

    .home-page-container .btn-area {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        margin-top: 14px;
    }

    .home-page-container .btn-action {
        width: 100%;
        min-height: 44px;
        margin: 0;
        padding: 9px 12px;
        border-radius: 8px;
        font-size: 0.95rem;
    }

    .home-page-container #home-notification-box {
        min-width: 0;
        height: 180px;
        margin: 0;
        padding: 12px;
        border: 1px solid #e6e9ee;
        border-radius: 8px;
        box-shadow: none;
        background: #fff;
    }

    .home-page-container .notification-title {
        margin-bottom: 8px;
        padding-bottom: 7px;
        font-size: 0.94rem;
    }

    .home-page-container #notification-list {
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .home-page-container .notification-message {
        padding: 7px 8px;
        font-size: 0.8rem;
    }

    .home-page-container .flex-board {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        margin-top: 10px;
    }

    .home-page-container .teams-col {
        gap: 10px;
    }

    .home-page-container .team-card,
    .home-page-container .wait-col {
        min-height: 0;
        padding: 0;
        border: 1px solid #e6e9ee;
        border-radius: 8px;
        box-shadow: none;
        background: #fff;
        overflow: hidden;
    }

    .home-page-container .team-title,
    .home-page-container .wait-title {
        display: flex;
        align-items: center;
        gap: 6px;
        min-height: 42px;
        margin: 0;
        padding: 8px 10px;
        border-radius: 0;
        font-size: 0.95rem;
        line-height: 1.2;
        letter-spacing: 0;
    }

    .home-page-container .user-list {
        max-height: 34vh;
        padding: 8px;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .home-page-container .user-list li {
        min-height: 38px;
        margin-bottom: 7px;
        padding: 8px 10px;
        border-radius: 8px;
        font-size: 0.9rem;
        line-height: 1.25;
        word-break: break-word;
        box-shadow: none;
    }

    .dashboard-container, .admin-container {
        padding: 0.5rem;
    }
    
    .teams-section {
        grid-template-columns: 1fr;
    }
    
    .control-buttons {
        grid-template-columns: 1fr;
    }
    
    .match-history-container {
        margin: 20px;
        padding: 20px;
    }
    
    .page-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .header-stats {
        gap: 20px;
    }
    
    .filter-section .row {
        gap: 15px;
    }
    
    .filter-buttons {
        justify-content: center;
    }
    
    .teams-result {
        flex-direction: column;
        gap: 15px;
    }
    
    .match-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .date-filter-buttons {
        margin-top: 15px;
        flex-direction: column;
    }
}


/* ============== nickname =============== */

.nickname-wrapper {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /*background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);*/
    margin: -20px;
    padding: 20px;
}

.nickname-card {
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 100%;
    max-width: 450px;
}

h2 {
    color: #333;
    font-size: 24px;
    margin-bottom: 12px;
    font-weight: 700;
}

.nickname-card > p {
    color: #666;
    font-size: 16px;
    margin-bottom: 30px;
    line-height: 1.5;
}

.input-group {
    text-align: left;
    margin-bottom: 30px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

.input-group input {
    width: 100%;
    padding: 16px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 16px;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
}

.validation-message {
    margin-top: 8px;
    font-size: 13px;
    min-height: 18px;
}

.validation-message.success {
    color: #28a745;
}

.validation-message.error {
    color: #dc3545;
}

#submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

#submit-btn:enabled:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

#submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

@media (max-width: 480px) {
    .nickname-wrapper {
        margin: -15px;
        padding: 15px;
    }

    .nickname-card {
        padding: 30px 20px;
    }
}
.member-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-start;
}

.participant-team1 { background: linear-gradient(45deg, #FF6B6B, #ee5a52); }
.participant-team2 { background: linear-gradient(45deg, #4ECDC4, #44A08D); }

/* ==================== HOME.HTML 실시간 알림 스타일 ==================== */
#home-notification-box {
    width: 100%; /*320px;*/
    flex-shrink: 0;
    background-color: #f7f8fc;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(80,80,140,0.04);
    padding: 18px 15px;
    display: flex;
    flex-direction: column;
    height: 200px; /* 고정 높이 */
}

.home-page-container #home-notification-box {
    margin-left: auto;
    min-width: 250px;
    max-width: 100%;
    order: 2;
}

.notification-title {
    font-size: 1rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e9ecef;
}

#notification-list {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
    flex-grow: 1;
}

.notification-message {
    font-size: 0.85rem;
    padding: 6px 8px;
    border-radius: 6px;
    margin-bottom: 5px;
    line-height: 1.4;
}

.notification-message:last-child {
    margin-bottom: 0;
}

.notification-message .timestamp {
    color: #888;
    font-weight: 500;
    margin-right: 5px;
}

.notification-message .message {
    color: #444;
}

/* 알림 타입별 색상 */
.notification-apply {
    background-color: #e7f3e8;
    border-left: 3px solid #4CAF50;
}

.notification-decline {
    background-color: #ffa098ff;
    border-left: 3px solid #f44336;
}

.notification-accept {
    background-color: #e3f2fd;
    border-left: 3px solid #2196F3;
}

.notification-reject {
    background-color: #fde3e3;
    border-left: 3px solid #f44336;
}

.notification-cancel {
    background-color: #fff8e1;
    border-left: 3px solid #FFC107;
}

/* ==================== 운영진 관리 모달 ==================== */
#operator-modal-list .modal-member-item {
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 5px;
    margin-bottom: 5px;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}

#operator-modal-list .modal-member-item:hover {
    background-color: #f0f0f0;
}

#operator-modal-list .modal-member-item.selected {
    background-color: #e0e7ff;
    border-color: #4a6cfa;
    font-weight: bold;
}

#operator-modal-list .modal-member-item.operator-member {
    background-color: #e6e6fa; /* 연보라색 */
}

