/* ========================================
   관리자 설정 페이지 CSS
   ======================================== */

/* 인증 섹션 */
.auth-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 20px;
}

.auth-card {
    max-width: 500px;
    width: 100%;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.auth-card h2 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.auth-card .info-text {
    color: #7f8c8d;
    margin-bottom: 30px;
    font-size: 0.95rem;
}

.auth-card .form-group {
    margin-bottom: 20px;
}

.auth-card input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.auth-card input[type="password"]:focus {
    outline: none;
    border-color: #3498db;
}

.hint-text {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-left: 4px solid #3498db;
    border-radius: 4px;
    color: #555;
    font-size: 0.9rem;
    text-align: left;
}

.hint-text code {
    background: #e9ecef;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #c7254e;
}

/* 관리자 콘텐츠 */
.admin-content {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 카드 스타일 */
.card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.card h2 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 1.5rem;
}

.card h3 {
    margin-top: 20px;
    margin-bottom: 15px;
    color: #34495e;
    font-size: 1.2rem;
}

.card .info-text {
    color: #7f8c8d;
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.card hr {
    border: none;
    border-top: 2px solid #ecf0f1;
    margin: 30px 0;
}

/* 폼 그룹 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 600;
    font-size: 0.95rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #95a5a6;
    font-size: 0.85rem;
}

/* 버튼 스타일 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block;
    text-align: center;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5568d3 0%, #63408b 100%);
}

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #0d7a70 0%, #2dd46d 100%);
}

.btn-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #e07fe6 0%, #e04257 100%);
}

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #ff5252 0%, #d44756 100%);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* 비밀번호 섹션 */
.password-section {
    margin-bottom: 20px;
}

.current-passwords {
    margin-top: 20px;
    padding: 15px;
    background: #fff9e6;
    border-left: 4px solid #f39c12;
    border-radius: 4px;
}

/* 던전 추가 섹션 */
.dungeon-add-section {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* 던전 카드 */
.dungeon-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.dungeon-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 0;
    transition: all 0.3s;
    display: flex;
    align-items: stretch;
    overflow: hidden;
}

.dungeon-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.dungeon-card.active {
    border-color: #27ae60;
    background: #f0fff4;
}

.dungeon-card.inactive {
    border-color: #e74c3c;
    background: #fff5f5;
    opacity: 0.8;
}

/* 순서 컨트롤 영역 */
.dungeon-order-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 12px 10px;
    background: #f0f4ff;
    border-right: 2px solid #e0e0e0;
    min-width: 44px;
    flex-shrink: 0;
}

.dungeon-card.active .dungeon-order-controls {
    background: #e0f7e9;
    border-right-color: #a8d5b5;
}

.dungeon-card.inactive .dungeon-order-controls {
    background: #fff0f0;
    border-right-color: #f5c0c0;
}

.btn-order {
    width: 28px;
    height: 28px;
    border: 1.5px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
    line-height: 1;
}

.btn-order:hover:not(:disabled) {
    background: #667eea;
    color: white;
    transform: scale(1.1);
}

.btn-order:disabled,
.btn-order.disabled {
    border-color: #ccc;
    color: #ccc;
    cursor: not-allowed;
    background: #f9f9f9;
}

.order-num {
    font-size: 12px;
    font-weight: 700;
    color: #667eea;
    background: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #667eea;
    line-height: 1;
}

/* 카드 본문 */
.dungeon-card-body {
    flex: 1;
    padding: 16px 18px;
}

/* 순서 저장 버튼 행 */
.dungeon-order-save-row {
    display: flex;
    align-items: center;
    margin-top: 14px;
    gap: 12px;
}

/* 순서 힌트 */
.dungeon-sort-hint {
    background: #eef2ff;
    border: 1.5px dashed #a5b4fc;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 13px;
    color: #4338ca;
    margin-bottom: 10px;
}

.dungeon-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #ecf0f1;
}

.dungeon-header h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.1rem;
}

.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-badge.active {
    background: #d4edda;
    color: #155724;
}

.status-badge.inactive {
    background: #f8d7da;
    color: #721c24;
}

.dungeon-info {
    margin-bottom: 15px;
}

.dungeon-info p {
    margin: 8px 0;
    color: #555;
    font-size: 0.9rem;
}

.dungeon-info code {
    background: #e9ecef;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #c7254e;
}

.dungeon-actions {
    display: flex;
    gap: 10px;
}

.dungeon-actions button {
    flex: 1;
}

/* 정보 카드 */
.info-card {
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    border: 2px solid #667eea;
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 15px 0 0 0;
}

.info-list li {
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
    color: #555;
    line-height: 1.6;
}

.info-list li:last-child {
    border-bottom: none;
}

.info-list strong {
    color: #2c3e50;
}

/* 로딩 및 에러 텍스트 */
.loading-text {
    text-align: center;
    color: #7f8c8d;
    padding: 20px;
}

.error-text {
    text-align: center;
    color: #e74c3c;
    padding: 20px;
}

.empty-text {
    text-align: center;
    color: #95a5a6;
    padding: 20px;
    font-style: italic;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .card {
        padding: 20px;
    }
    
    .dungeon-cards {
        gap: 8px;
    }
    
    .btn-order {
        width: 26px;
        height: 26px;
    }
    
    .dungeon-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

/* ── 채팅 사용자 관리 카드 ── */
.chat-user-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-user-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 14px 16px;
    transition: box-shadow 0.2s;
    flex-wrap: wrap;
}

.chat-user-card:hover {
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
}

.chat-user-card.blocked {
    border-color: #fca5a5;
    background: #fff5f5;
    opacity: 0.9;
}

.chat-user-info {
    flex: 1;
    min-width: 0;
}

.chat-user-nick {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 15px;
    margin-bottom: 5px;
}

.chat-user-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
}
.chat-user-badge.active  { background: #d1fae5; color: #065f46; }
.chat-user-badge.blocked { background: #fee2e2; color: #991b1b; }

.chat-user-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 11.5px;
    color: #888;
}

.chat-user-id {
    font-family: 'Courier New', monospace;
    color: #aaa;
}

.chat-user-actions {
    display: flex;
    gap: 7px;
    flex-shrink: 0;
    flex-wrap: wrap;
}
