/* ==========================================
   Ashika Dark Brown Theme - Site Overrides
   ========================================== */

/* Global Font */
body {
    font-family: 'Outfit', sans-serif;
}

/* ==========================================
   Layout Utilities
   ========================================== */

.page-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 25px 20px;
    position: relative;
    z-index: 10;
}

.w-full {
    width: 100%;
}

.mb-15 {
    margin-bottom: 15px !important;
}

.mb-20 {
    margin-bottom: 20px !important;
}

.mt-10 {
    margin-top: 10px !important;
}

.mt-15 {
    margin-top: 15px !important;
}

.no-decor {
    text-decoration: none !important;
}

.no-decor:hover {
    text-decoration: none !important;
}

/* Bootstrap 4 (neumorphism.css) handles .mr-*, .ml-*, .mb-*, .d-block, .text-center, .text-right */
.ml-5 { margin-left: 5px !important; }
.font-bold { font-weight: 700 !important; }

/* ==========================================
   Header - Slim override for inner pages
   ========================================== */

.ashika-header--slim {
    height: 120px !important;
    min-height: 120px !important;
    margin-bottom: 0 !important;
    background-position: center top !important;
}

/* Mobile nav is handled by modern-layout.css burger-menu-toggle + mobile-open pattern */

/* ==========================================
   SweetAlert2 Dark + Gold Overrides
   ========================================== */

.swal2-popup {
    background: #1a1410 !important;
    color: #d1d5db !important;
    border: 1px solid #3d2f25 !important;
    border-radius: 10px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7) !important;
}

.swal2-title {
    color: #d1d5db !important;
}

.swal2-html-container,
.swal2-html-container * {
    color: #9ca3af !important;
}

.swal2-input,
.swal2-textarea,
.swal2-popup .form-control {
    background: rgba(0, 0, 0, 0.35) !important;
    color: #d1d5db !important;
    border: 1px solid #3d2f25 !important;
    box-shadow: none !important;
    border-radius: 6px !important;
}

.swal2-input::placeholder,
.swal2-textarea::placeholder {
    color: rgba(166,124,82,0.4) !important;
}

.swal2-input:focus,
.swal2-textarea:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 2px rgba(166,124,82,0.15) !important;
}

.swal2-styled.swal2-confirm {
    background: linear-gradient(135deg, #a67c52, #4b3621) !important;
    border: none !important;
    border-radius: 6px !important;
    color: #fff !important;
    font-weight: 700 !important;
}

.swal2-styled.swal2-confirm:hover {
    background: linear-gradient(135deg, #c49a6a, #6b4e31) !important;
}

.swal2-styled.swal2-cancel {
    background: transparent !important;
    border: 1px solid #3d2f25 !important;
    border-radius: 6px !important;
    color: #d1d5db !important;
    font-weight: 600 !important;
}

.swal2-styled.swal2-cancel:hover {
    background: rgba(166,124,82,0.12) !important;
}

.swal2-validation-message {
    background: rgba(169, 30, 44, 0.12) !important;
    color: #e74c3c !important;
    border: 1px solid rgba(231,76,60,0.2) !important;
}

.swal2-footer {
    border-top: 1px solid #3d2f25 !important;
    color: #9ca3af !important;
}

.swal2-close {
    color: #9ca3af !important;
}

.swal2-close:hover {
    color: #e74c3c !important;
}

.swal2-icon.swal2-info {
    border-color: var(--primary) !important;
    color: var(--primary) !important;
}

.swal2-icon.swal2-success {
    border-color: #18634B !important;
    color: #18634B !important;
}

.swal2-icon.swal2-success [class^=swal2-success-line] {
    background-color: #18634B !important;
}

.swal2-icon.swal2-success .swal2-success-ring {
    border-color: rgba(24,99,75,0.3) !important;
}

.swal2-icon.swal2-error {
    border-color: #A91E2C !important;
    color: #A91E2C !important;
}

.swal2-icon.swal2-error [class^=swal2-x-mark-line] {
    background-color: #A91E2C !important;
}

.swal2-icon.swal2-warning {
    border-color: #F0B400 !important;
    color: #F0B400 !important;
}

/* ==========================================
   Nav Tabs Modern (account menu)
   ========================================== */

.nav-tabs-modern .nav-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 6px 6px 0 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-bottom: none;
    transition: color 0.2s, background 0.2s;
    cursor: pointer;
}

.nav-tabs-modern .nav-link:hover {
    color: var(--text-main);
    background: var(--bg-card-hover);
}

.nav-tabs-modern .nav-link.active {
    color: var(--primary);
    background: var(--bg-darker);
    border-bottom: 2px solid var(--primary);
}

/* ==========================================
   Login Form Modern extras
   ========================================== */

.login-footer-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    font-size: 0.82rem;
    flex-wrap: wrap;
    gap: 8px;
}

.login-footer-modern a {
    color: var(--primary);
    text-decoration: none;
}

.login-footer-modern a:hover {
    color: #d4a94e;
    text-decoration: underline;
}

/* ==========================================
   Shop Coin Cards
   ========================================== */

.shop-coin-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

/* ==========================================
   Ranking Tables
   ========================================== */

.ranking-thead {
    background: linear-gradient(135deg, var(--primary), #4b3621);
    color: #fff;
}

.ranking-thead th {
    color: #fff !important;
    border-bottom: none !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.75rem 1rem;
}

.ranking-row.empire-1 {
    background-color: rgba(255, 217, 61, 0.12);
}

.ranking-row.empire-2 {
    background-color: rgba(162, 196, 224, 0.12);
}

.ranking-row.empire-3 {
    background-color: rgba(255, 179, 102, 0.12);
}

.ranking-row.empire-1:hover {
    background-color: rgba(255, 217, 61, 0.22);
}

.ranking-row.empire-2:hover {
    background-color: rgba(162, 196, 224, 0.22);
}

.ranking-row.empire-3:hover {
    background-color: rgba(255, 179, 102, 0.22);
}

/* Ranking responsive hiding */
@media only screen and (max-width: 767px) {
    .ranking-exp, .ranking-guild-points { display: none; }
}

@media only screen and (max-width: 530px) {
    .ranking-guild, .ranking-guild-loss, .ranking-guild-draw { display: none; }
}

@media only screen and (max-width: 450px) {
    .ranking-class, .ranking-empire { display: none; }
}

.ranking-class img { max-width: 32px; }

/* ==========================================
   Player/Ranking icons
   ========================================== */

.player-icon-neu {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    transition: opacity 0.3s ease;
}

.player-icon-wrap {
    display: inline-block;
    position: relative;
    width: 150px;
    height: 150px;
}

.player-icon-wrap .hover {
    position: absolute;
    top: 0; left: 0;
    opacity: 0;
}

.player-icon-wrap:hover .default { opacity: 0; }
.player-icon-wrap:hover .hover { opacity: 1; }

.ranking-class-icon-wrap {
    display: inline-block;
    position: relative;
    width: 40px;
    height: 40px;
}

.ranking-class-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.ranking-class-icon-wrap .hover {
    position: absolute;
    top: 0; left: 0;
    opacity: 0;
}

.ranking-class-icon-wrap:hover .default { opacity: 0; }
.ranking-class-icon-wrap:hover .hover { opacity: 1; }

/* ==========================================
   Alignment Classes
   ========================================== */
.align-chivalric { color: #3399FF; font-size: 15px; }
.align-noble { color: #0066CC; font-size: 15px; }
.align-good { color: #003366; font-size: 15px; }
.align-friendly { color: #336699; font-size: 15px; }
.align-neutral { color: #9ca3af; font-size: 15px; }
.align-aggressive { color: #884444; font-size: 15px; }
.align-fraudulent { color: #aa3333; font-size: 15px; }
.align-malicious { color: #cc3333; font-size: 15px; }
.align-cruel { color: #e74c3c; font-size: 15px; }

/* ==========================================
   Profile
   ========================================== */
.player-profile {
    background-image: url('/images/profile/background.webp');
    background-repeat: no-repeat;
}

.player-profile > table > tbody > tr > td {
    padding: 10px 80px;
}

/* Ability sprites */
.ability-warrior-0 { margin:auto; background-image:url('/images/profile/ability.png'); width:32px; height:32px; background-position:64px 0px; }
.ability-warrior-1 { margin:auto; background-image:url('/images/profile/ability.png'); width:32px; height:32px; background-position:32px 0px; }
.ability-assassin-0 { margin:auto; background-image:url('/images/profile/ability.png'); width:32px; height:32px; background-position:96px 0px; }
.ability-assassin-1 { margin:auto; background-image:url('/images/profile/ability.png'); width:32px; height:32px; background-position:128px 0px; }
.ability-shura-0 { margin:auto; background-image:url('/images/profile/ability.png'); width:32px; height:32px; background-position:160px 0px; }
.ability-shura-1 { margin:auto; background-image:url('/images/profile/ability.png'); width:32px; height:32px; background-position:192px 0px; }
.ability-shaman-0 { margin:auto; background-image:url('/images/profile/ability.png'); width:32px; height:32px; background-position:256px 0px; }
.ability-shaman-1 { margin:auto; background-image:url('/images/profile/ability.png'); width:32px; height:32px; background-position:224px 0px; }
.ability-lycan-0 { margin:auto; background-image:url('/images/profile/ability.png'); width:32px; height:32px; background-position:0px 0px; }

/* ==========================================
   Download page styles (kept from old)
   ========================================== */
.mv-dl-section-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 1.5px;
    margin-bottom: 1.25rem;
}

.mv-dl-section-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    opacity: 0.85;
}

.mv-dl-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.mv-dl-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    text-decoration: none !important;
    transition: border-color 0.25s, background 0.25s, transform 0.15s;
}

.mv-dl-card:hover {
    border-color: var(--primary);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

.mv-dl-card__icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mv-dl-card__icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.mv-dl-card__info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.mv-dl-card__name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 0.5px;
}

.mv-dl-card__status {
    font-size: 0.78rem;
    color: var(--primary);
    font-weight: 600;
}

.mv-dl-card__btn {
    flex-shrink: 0;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 1px;
    padding: 0.45rem 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: transparent;
    transition: background 0.2s, color 0.2s;
}

.mv-dl-card:hover .mv-dl-card__btn {
    background: rgba(166,124,82,0.15);
    border-color: var(--primary);
    color: #fff;
}

.mv-dl-req-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.mv-dl-req-table {
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
}

.mv-dl-req-header {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 0.5px;
    text-align: center;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(166,124,82,0.06);
}

.mv-dl-req-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 1.1rem;
    border-bottom: 1px solid rgba(61,47,37,0.4);
    transition: background 0.15s;
}

.mv-dl-req-row:last-child { border-bottom: none; }

.mv-dl-req-row:hover { background: var(--bg-card-hover); }

.mv-dl-req-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.mv-dl-req-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    text-align: right;
}

@media (max-width: 767px) {
    .mv-dl-grid { grid-template-columns: 1fr; }
    .mv-dl-req-grid { grid-template-columns: 1fr; }
    .mv-dl-card__name { font-size: 0.92rem; }
    .mv-dl-req-label,
    .mv-dl-req-value { font-size: 0.8rem; }
}

/* ==========================================
   Tooltip
   ========================================== */
.tooltip-inner {
    max-width: 350px;
    text-align: start;
}

/* ==========================================
   Flex / body layout
   ========================================== */
html, body { min-height: 100%; }

body {
    display: flex;
    flex-direction: column;
}

.ashika-body {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

/* ==========================================
   Top 3 Players Podium
   ========================================== */

.top3-cards-container {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    margin-bottom: 12px;
}

.top3-card {
    flex: 1;
    text-align: center;
    padding: 12px 6px;
    border-radius: 8px;
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    min-width: 0;
}

.card-rank-1 {
    padding: 20px 6px;
    border-color: var(--primary);
    box-shadow: 0 0 16px rgba(166,124,82,0.2);
}

.rank-num {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: 0.04em;
}

.card-rank-1 .rank-num {
    color: var(--primary);
    font-size: 0.82rem;
}

.top3-name {
    font-size: 0.8rem;
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ==========================================
   Mobile Responsive Fixes
   ========================================== */

/* Prevent horizontal overflow */
html, body {
    overflow-x: hidden;
}

* {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
}

/* Slim header: shrink on mobile */
@media (max-width: 576px) {
    .ashika-header--slim {
        height: 72px !important;
        min-height: 72px !important;
    }
}

/* Inner page container: tighter padding on mobile */
@media (max-width: 768px) {
    .page-container {
        padding: 15px 12px;
    }
}

/* Grid: reduce padding and gap on mobile */
@media (max-width: 640px) {
    .modern-grid {
        padding: 0 10px !important;
        gap: 15px !important;
    }

    .req-page-header {
        padding: 20px 15px !important;
    }

    .padding-container {
        padding: 15px !important;
    }

    /* Top3 cards tighter on small screens */
    .top3-cards-container {
        gap: 4px;
    }

    .top3-card {
        padding: 8px 4px;
    }

    .card-rank-1 {
        padding: 14px 4px;
    }

    .top3-name {
        font-size: 0.7rem;
    }

    /* Scale down class icons inside top3 */
    .top3-card .ranking-class-icon-wrap {
        width: 28px;
        height: 28px;
    }

    .top3-card .ranking-class-icon {
        width: 28px;
        height: 28px;
    }

    /* News pagination scrollable on small screens */
    #newsPagination > div {
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Account tabs wrap on mobile */
    .nav-tabs-modern {
        flex-wrap: wrap;
    }
}
