/* styles from header.php */

html, body {
    margin: 0;
    padding: 0;
}
.top-nav-container {
    position: fixed; /* 메뉴를 화면 상단에 고정 */
    top: 0px; /* 상단에서 60px 아래에 위치 */
    left: 0; /* 왼쪽에 붙임 */
    width: 100%; /* 전체 너비 사용 */
    z-index: 1000000; /* 다른 요소 위에 오도록 z-index 설정 */
    text-align: center; /* 내부 inline-flex 요소를 중앙 정렬 */
}

.nav-login-btn {
    color: #efad0c;
    font-family: 'K_Quest', monospace;
    font-size: 1.3em; /* 메인 메뉴 폰트 크기와 통일 */
    text-decoration: none;
    transition: all 0.3s ease;
    margin: 0 10px; /* 메뉴 칸 간격 조정 */
    text-transform: uppercase; /* 다른 메뉴 항목과 통일 */
    display: inline-block; /* 블록 요소로 변경 */
    padding: 10px 25px; /* 칸 크기 조정 (가로폭 증가) */
    border-radius: 5px; /* 둥근 모서리 */
    background-color: rgba(255, 255, 255, 0.05); /* 칸 배경색 */
}
.nav-login-btn:hover {
    background-color: transparent; /* 호버 시 배경색 변경 */
    color: white;
}

/* 사용자 드롭다운 메뉴 스타일 */
.nav-user-menu {
    pointer-events: auto; /* 드롭다운 자체는 클릭 가능 */
    margin: 0 10px; /* 메뉴 칸 간격 조정 */
}
.nav-username {
    color: #efad0c;
    font-family: 'K_Quest', monospace;
    font-size: 1.3em; /* 메인 메뉴 폰트 크기와 통일 */
    text-decoration: none;
    display: inline-block; /* 블록 요소로 변경 */
    padding: 10px 25px; /* 칸 크기 조정 (가로폭 증가) */
    border-radius: 5px; /* 둥근 모서리 */
    background-color: rgba(255, 255, 255, 0.05); /* 칸 배경색 */
}
.nav-username:hover {
    background-color: transparent; /* 호버 시 배경색 변경 */
    color: white;
    text-decoration: none;
}
.nav-user-menu .dropdown-menu {
    background-color: rgba(30, 30, 40, 0.9);
    border: 1px solid #efad0c;
    margin-top: 10px;
}
.nav-user-menu .dropdown-item {
    color: #F5E6AB;
    font-family: 'Flaticon', monospace;
    text-align: left; /* 정렬 수정 */
}
.nav-user-menu .dropdown-item:hover {
    background-color: rgba(239, 173, 12, 0.2);
    color: #fff;
}
.nav-user-menu .dropdown-divider {
    border-top: 1px solid #555;
}


.main-navigation {
    display: flex; /* 너비를 콘텐츠에 맞게 축소 */
    justify-content: flex-start;
    align-items: center;
    padding: 12px 30px; /* 내부 여백으로 크기 조절 */
    
    /* 블러 효과와 배경 */
    background-color: black;

    pointer-events: auto; /* 메뉴 자체는 클릭 가능하도록 설정 */
}

/* 햄버거 메뉴 숨김 처리 */
#bookmark-menu {
    display: none;
}

.main-navigation a {
    color: #efad0c;
    font-family: 'K_Quest', monospace;
    font-size: 1.3em; /* 폰트 크기 증가 */
    text-transform: uppercase;
    margin: 0 10px; /* 메뉴 칸 간격 조정 */
    text-decoration: none;
    display: inline-block; /* 블록 요소로 변경 */
    padding: 10px 25px; /* 칸 크기 조정 (가로폭 증가) */
    border-radius: 5px; /* 둥근 모서리 */
    background-color: rgba(255, 255, 255, 0.05); /* 칸 배경색 */
}
.main-navigation a:hover {
    background-color: transparent; /* 호버 시 배경색 변경 */
    color: white;
}

/* 언어 변경 모달 위치 조정 */
#lang-modal .modal-dialog {
    margin-top: 180px;
}

#character-modal .modal-dialog {
    max-width: 1000px !important; /* Further reduced width, added important */
    width: 90%; /* Ensure it's responsive */
}

.nav-login-btn {
    margin: 0 10px !important;
    text-transform: uppercase !important;
    display: inline-block !important;
    padding: 10px 25px !important;
    border-radius: 5px !important;
    background-color: transparent !important; /* 음영 제거 */
    text-shadow: none !important; /* 텍스트 그림자 제거 */
}        .nav-login-btn:hover {
    background-color: rgba(239, 173, 12, 0.2) !important; /* 호버 시 배경색 변경 */
    color: white !important;
}

.nav-user-menu {
    margin: 0 10px !important;
}
.nav-username {
    display: inline-block !important;
    padding: 10px 20px !important;
    border-radius: 5px !important;
    background-color: transparent !important; /* 음영 제거 */
    text-shadow: none !important; /* 텍스트 그림자 제거 */
}
.nav-username:hover {
    background-color: rgba(239, 173, 12, 0.2) !important; /* 호버 시 배경색 변경 */
    color: white !important;
}
.nav-user-menu .dropdown-item {
    text-align: left !important;
    text-shadow: none !important; /* 텍스트 그림자 제거 */
}

.main-navigation a {
    margin: 0 10px !important;
    display: inline-block !important;
    padding: 10px 25px !important; /* 칸 크기 조정 (가로폭 증가) */
    border-radius: 5px !important;
    background-color: transparent !important; /* 음영 제거 */
    text-shadow: none !important; /* 텍스트 그림자 제거 */
}
.main-navigation a:hover {
    background-color: rgba(239, 173, 12, 0.2) !important; /* 호버 시 배경색 변경 */
    color: white !important;
}

/* CSS dynamically injected by JS */
/* This block originally was inside document.addEventListener('DOMContentLoaded', function() { ... }) */
/* It has PHP variables, so it will remain dynamic but its static part moved here */
/* Menu item block form and spacing adjustment */
.nav-login-btn {
    margin: 0 10px !important;
    text-transform: uppercase !important;
    display: inline-block !important;
    padding: 10px 25px !important;
    border-radius: 5px !important;
    background-color: transparent !important; /* 음영 제거 */
    text-shadow: none !important; /* 텍스트 그림자 제거 */
}
.nav-login-btn:hover {
    color: #FFFF00 !important; /* 호버 시 텍스트 색상 변경 */
}

.nav-user-menu {
    margin: 0 10px !important;
}
.nav-username {
    display: inline-block !important;
    padding: 10px 20px !important;
    border-radius: 5px !important;
    background-color: transparent !important; /* 음영 제거 */
    text-shadow: none !important; /* 텍스트 그림자 제거 */
}
.nav-username:hover {
    color: #FFFF00 !important; /* 호버 시 텍스트 색상 변경 */
    text-decoration: none !important;
}
.nav-user-menu .dropdown-menu {
    background-color: rgba(30, 30, 40, 0.9) !important;
    border: 1px solid #efad0c !important;
    margin-top: 10px !important;
}
.nav-user-menu .dropdown-item {
    color: #F5E6AB !important;
    font-family: 'K_Quest', monospace !important;
    text-align: left !important;
    text-shadow: none !important;
    font-size: 1.2em !important; /* 폰트 크기 증가 */
    display: block !important; /* 전체 너비로 확장 */
    padding: 10px 20px !important; /* 내부 여백 증가 */
}
.nav-user-menu .dropdown-item:hover {
    background-color: transparent !important; /* 배경색 제거 */
    color: #FFFF00 !important; /* 호버 시 텍스트 색상 변경 */
}
.nav-user-menu .dropdown-divider {
    border-top: 1px solid #555 !important;
}

.main-navigation a {
    margin: 0 10px !important;
    display: inline-block !important;
    padding: 10px 20px !important;
    border-radius: 5px !important;
    background-color: transparent !important; /* 음영 제거 */

}
.main-navigation a:hover {
    color: #FFFF00 !important; /* 호버 시 텍스트 색상 변경 */
}

/* @font-face K_Damage */
@font-face {
    font-family: 'K_Damage';
    src: url('../fonts/K_Damage.TTF') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* .footer-section */
.footer-section {
    /* position: fixed; */
    /* bottom: 0; */
    /* left: 0; */
    width: 100%;
    /* z-index: 99999; */
    background-color: transparent;
    padding: 10px 0;
    text-align: center;
    margin-top: 40px; /* Add some margin to separate from content above */
}

/* @media (max-width: 768px) */
@media (max-width: 768px) {
    .main-navigation {
        flex-wrap: nowrap !important;       /* Force flex items onto a single line */
        white-space: nowrap !important;     /* Prevent text within menu items from wrapping */
        overflow-x: auto !important;        /* Enable horizontal scrolling for all items */
        justify-content: flex-start !important; /* Align items to the start (left) */
        width: 100% !important;             /* Ensure it takes full width */
        overflow-y: hidden !important;      /* Prevent vertical scrolling on the main nav itself */
    }
    /* Fixed-position dropdown styling when active */
    body.dropdown-fixed-active .nav-user-menu .dropdown-menu {
        position: fixed !important;
        top: 50px !important;               /* Below the header - estimated */
        left: 50% !important;               /* Center horizontally */
        transform: translateX(-50%) !important; /* Adjust for element's own width */
        width: 200px !important;            /* Fixed width */
        height: auto !important;
        max-height: calc(100vh - 60px) !important; /* Max height less header and some margin */
        overflow-y: auto !important;        /* Make dropdown itself scrollable if content overflows */
        z-index: 1000002 !important;        /* Even higher than header */
        display: block !important;
        padding: 0 !important; /* Ensure dropdown's internal padding is controlled */
    }
}

/* .scroll-container */
.scroll-container {
    color: #ffd700;
    padding: 10px 0;
    overflow: hidden;
    white-space: nowrap;
    position: fixed;
    top: 94px;
    left: 0;
    width: 100%;
    z-index: 100;
    background-color: rgba(0, 0, 0, 0.7); /* Added for solid background */
}

.scroll-text {
    display: inline-block;
    padding-left: 100%;
    animation: scroll-left 30s linear infinite;
    will-change: transform; /* Hint for browser optimization */
    backface-visibility: hidden; /* Fix flickering for 3D transforms */
}

@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* .account-status-panel */
.account-status-panel {
    background-color: rgba(0,0,0,0.2);
    border: 1px solid #444;
    padding: 20px;
    border-radius: 8px;
    max-width: 800px;
    margin: 20px auto 40px auto; /* Add margin-bottom */
    text-align: center;
}
.account-status-panel .welcome-message {
    margin-bottom: 20px !important;
    font-family: 'K_Quest', monospace;
}
.security-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 10px 15px;
    border-radius: 5px;
    font-family: 'K_Quest', monospace;
    font-size: 1.1em;
}
.security-warning {
    background-color: rgba(255, 193, 7, 0.1);
    border: 1px solid #ffc107;
    color: #ffc107;
}
.security-ok {
    background-color: rgba(40, 167, 69, 0.1);
    border: 1px solid #28a745;
    color: #28a745;
}
.security-status .site-btn {
    padding: 5px 15px;
    font-size: 0.9em;
    margin-left: 10px;
    border: 1px solid #ffc107;
    background-color: transparent;
    color: #ffc107;
}
.security-status .site-btn:hover {
    background-color: rgba(255, 193, 7, 0.2);
    color: #fff;
}
/* New styles for account summary */
.account-summary {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}
.main-character-avatar {
    width: 120px;
    height: 120px;
    /* border-radius: 50%; */ /* Removed for square shape */
    border: 3px solid #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}
.total-gold-display {
    font-family: 'K_Pagetext', monospace;
    font-size: 1.2em;
    color: #ffd700;
    display: flex;
    align-items: center;
    gap: 5px;
}
.total-gold-display .fas {
    font-size: 1em;
}

/* .character-card-list */
.character-card-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 800px;
    margin: 20px auto;
}
.character-card {
    position: relative; /* For badge positioning */
    display: flex;
    align-items: flex-start; /* Align items to the top */
    background-color: rgba(0, 0, 0, 0.3);
    border-left: 7px solid; /* This will be set by class color */
    padding: 10px;
    border-radius: 5px;
    transition: background-color 0.2s, transform 0.2s;
    cursor: pointer;
}
.character-card:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}
.character-avatar img {
    width: 90px;
    height: 90px;
    /* border-radius: 50%; */ /* Removed for square shape */
    border: 2px solid #555;	
    margin-right: 15px;
}
.character-info {
    flex-grow: 1;
    text-align: left;
}
.character-name {
    font-family: 'K_Pagetext', monospace;
    font-size: 2.1em;
    font-weight: bold;
    margin: 0;
    text-shadow: 1px 1px 2px #000;
}
.character-details {
    font-family: 'K_Pagetext', monospace;
    font-size: 1.1em;
    color: #FFFF;
    margin: 5px 0 0 0;
}
.character-zone {
    font-family: 'K_Pagetext', monospace;
    font-size: 0.9em;
    color: #999;
    margin: 3px 0 0 0;
}
.character-extra-details {
    font-family: 'K_Pagetext', monospace;
    font-size: 1em;
    color: #a9a9a9;
    margin-top: 8px;
    display: flex;
    gap: 15px;
}
.character-extra-details span {
    display: inline-flex;
    align-items: center;
}
.character-extra-details .fas {
    margin-right: 5px;
    color: #ffd700;
}
/* Main Character Highlighting */
.character-card.main-character {
    border-top: 1px solid #ffd700;
    border-right: 1px solid #ffd700;
    border-bottom: 1px solid #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}
.main-character-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: #ffd700;
    color: #000;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 0.8em;
    font-weight: bold;
    font-family: 'K_Quest', monospace;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* .char-sheet-left */
.char-sheet-left {
    background-color: rgba(0,0,0,0.2);
    border: 1px solid #444;
    border-radius: 5px;
    padding: 15px;
    height: 100%;
}
.char-header {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    background: #111;
    padding: 10px;
    border-radius: 4px;
    overflow: hidden;
}
#char-header-background {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.2;
    filter: blur(2px);
}
.char-portrait {
    position: relative;
    width: 80px;
    height: 80px;
    margin-right: 15px;
    flex-shrink: 0;
}
.char-portrait img {
    width: 100%;
    height: 100%;
    border-radius: 4px;
    border: 2px solid #efad0c;
}
#modal-char-level-badge {
    position: absolute;
    bottom: -5px;
    right: -5px;
    background-color: #000;
    color: #efad0c;
    font-family: 'K_Damage', monospace;
    font-size: 1.3em;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    border-radius: 50%;
    border: 2px solid #efad0c;
    box-shadow: 0 0 5px #000;
}
.char-info-primary {
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 1;
}
#modal-char-name {
    font-family: 'K_Damage', monospace;
    color: #efad0c;
    margin: 0;
    font-size: 1.8em;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
    line-height: 1.2;
}
#modal-char-guild {
    margin-top: -5px;
    color: #ccc;
    font-size: 1em;
    line-height: 1.2;
}
#modal-char-race-class {
    margin-top: -2px;
    font-size: 1em;
    line-height: 1.2;
}
.char-info-secondary {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 0.9em;
    color: #aaa;
}
.stats-header {
    color: #efad0c;
    border-bottom: 1px solid #555;
    padding-bottom: 8px;
    margin-bottom: 10px;
    font-size: 1.2em;
    text-align: left;
}
.stat-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 1em;
}
.stat-name .fas {
    width: 20px;
    margin-right: 8px;
    color: #efad0c;
}
.stat-bar-container {
    flex-grow: 1;
    height: 12px;
    background-color: rgba(0,0,0,0.4);
    border-radius: 6px;
    margin: 0 10px;
    overflow: hidden;
    border: 1px solid #222;
}
.stat-bar-value {
    height: 100%;
    background-color: #efad0c;
    border-radius: 6px;
    transition: width 0.5s ease-out;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.5);
}
.stat-value {
    width: 40px;
    flex-shrink: 0;
    text-align: right;
    color: #fff;
    font-weight: bold;
}
#modal-char-professions ul {
    list-style: none;
    padding: 0;
}
#modal-char-professions li {
    background-color: rgba(0,0,0,0.2);
    padding: 5px 10px;
    border-radius: 3px;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
}

.sidebar-card {
    width: 100%;
    box-sizing: border-box; /* 패딩과 테두리를 너비 계산에 포함시킵니다 */
    background-color: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 10px; /* Adjusted from 15px to 10px */
}
.sidebar-card:last-child {
    margin-bottom: 0;
}
.sidebar-card h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #efad0c;
    font-family: 'K_Quest', monospace;
    font-size: 1.1em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding-bottom: 10px;
    text-transform: uppercase;
    text-align: left; /* 명시적으로 왼쪽 정렬 추가 */
}
.nav-login-btn:hover,
.nav-username:hover,
.main-navigation a:hover,
.nav-user-menu .dropdown-item:hover {
    background-color: transparent !important;
}
/* WoW Class Colors */
.char-class-1 { color: #C79C6E !important; } /* Warrior */
.char-class-2 { color: #F58CBA !important; } /* Paladin */
.char-class-3 { color: #ABD473 !important; } /* Hunter */
.char-class-4 { color: #FFF569 !important; } /* Rogue */
.char-class-5 { color: #FFFFFF !important; } /* Priest */
.char-class-6 { color: #C41F3B !important; } /* Death Knight */
.char-class-7 { color: #0070DE !important; } /* Shaman */
.char-class-8 { color: #69CCF0 !important; } /* Mage */
.char-class-9 { color: #9482C9 !important; } /* Warlock */
.char-class-11 { color: #FF7D0A !important; } /* Druid */

.stat-name {
    width: 80px;
    display: flex;
    align-items: center;
}

.stat-name span {
    text-align: center;
    flex-grow: 1;
}

.stat-bar-container {
    border-radius: 0;
}

.stat-bar-value {
    border-radius: 0;
}

/* Custom Resource Bars (Health, Mana/Rage/Energy) */
.resource-bar {
    position: relative;
    height: 35px; /* Taller than regular stat bars */
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    margin-bottom: 0; /* Changed to stick together */
    overflow: hidden;
    display: flex;
    align-items: center;
}

.resource-bar-fill {
    height: 100%;
    transition: width 0.3s ease-out;
    background-color: #5cb85c; /* Default, will be overridden */
}

.resource-bar-label {
    position: absolute;
    left: 10px;
    color: #fff;
    font-weight: bold;
    font-size: 0.9em;
    z-index: 1;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
}

.resource-bar-text {
    position: absolute;
    right: 10px;
    color: #fff;
    font-size: 0.9em;
    z-index: 1;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
}

/* Health Bar Specific */
.health-bar .resource-bar-fill {
    background-color: #28a745; /* Green */
}

/* Mana Bar Specific */
.mana-bar .resource-bar-fill {
    background-color: #007bff; /* Blue */
}

/* Rage Bar Specific */
.rage-bar .resource-bar-fill {
    background-color: #dc3545; /* Red */
}

/* Energy Bar Specific */
.energy-bar .resource-bar-fill {
    background-color: #ffc107; /* Yellow/Orange */
}

#modal-char-stats-extended {
    margin-top: 15px;
}

.char-modal-row {
    display: flex;
    align-items: stretch;
}
