@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700;900&family=Inter:wght@300;400;600&family=MedievalSharp&display=swap');

/* UO原版比例自适应LOGO */
.site-logo img {
    width: 100%;
    height: auto;
    max-width: 260px; /* 桌面端最大原始宽度，不改就和原版一样 */
    min-width: 140px; /* 最小压缩下限，不会过小 */
    object-fit: contain;
}

:root {
    /* Medieval Forest + Gold Palette */
    --primary: #b8963e;
    --primary-light: #d4b05c;
    --primary-dark: #8a6d2e;
    --gold-gradient: linear-gradient(to right, #b8963e, #d4b05c);
    --bg-dark: #0e1a0e;
    --bg-container: #111e11;
    --bg-card: rgba(20, 35, 20, 0.7);
    --bg-panel: rgba(15, 28, 15, 0.85);
    --text-main: #e8e0d0;
    --text-muted: #8a9a7a;
    --glass-border: rgba(184, 150, 62, 0.2);
    --border-gold: rgba(184, 150, 62, 0.35);
    --green-dark: #0a140a;
    --green-mid: #1a2e1a;
    --green-light: #2a4a2a;
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 12px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    max-width: 100% !important;
    overflow-x: hidden !important;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    background-image:
        radial-gradient(ellipse at 50% 0%, rgba(30, 60, 30, 0.3) 0%, transparent 60%),
        radial-gradient(ellipse at 0% 100%, rgba(20, 40, 20, 0.2) 0%, transparent 50%);
    color: var(--text-main);
    line-height: 1.6;
}

h1,
h2,
h3,
.nav-logo {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--green-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

/* 
   -------------------------------------------------------------------------
   PREMIUM FLOATING NAVBAR (CAPSULE SYSTEM) 
   -------------------------------------------------------------------------
*/

#navbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 1500px;
    height: 64px;
    background: rgba(10, 15, 26, 0.9);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(197, 160, 89, 0.3);
    border-radius: 100px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 25px;
    z-index: 10000;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.7);
    transition: all 0.4s ease;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 10px;
    /* min-width: 140px; */
    /* Slimmer */
    flex-shrink: 0;
}

.nav-left {
    display: flex;
    align-items: center;
    /* min-width: 200px; */
}

.main-nav-logo {
    height: 90px;
    /* 大胆放大，增强气势 */
    width: auto;
    display: block;
    filter: drop-shadow(0 0 12px rgba(197, 160, 89, 0.4));
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-origin: left center;
}

/* .main-nav-logo:hover {
    filter: drop-shadow(0 0 25px rgba(197, 160, 89, 0.7));
    transform: scale(1.1) translateY(-2px);
} */

@media (max-width: 1400px) {

    .nav-links,
    .nav-links-container ul {
        gap: 0.4rem !important;
        font-size: 0.85rem !important;
    }

    .main-nav-logo {
        height: 55px;
    }
}

@media (max-width: 1200px) {
    #navbar {
        padding: 0 10px;
    }

    .nav-left {
        min-width: auto;
    }

    .main-nav-logo {
        height: 45px;
    }

    .nav-links-container {
        overflow-x: auto;
        overflow-y: visible !important;
        /* 关键：允许下拉菜单纵向溢出 */
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        justify-content: flex-start !important;
        margin: 0 10px;
    }

    .nav-links-container::-webkit-scrollbar {
        display: none;
    }

    .nav-links,
    .nav-links-container ul {
        gap: 0 !important;
        padding-bottom: 2px !important;
    }

    .nav-links a {
        padding: 5px 10px !important;
        white-space: nowrap;
        font-size: 0.8rem !important;
    }
}

.nav-left {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    z-index: 10;
}

.nav-right {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 15px;
    z-index: 10;
}

.nav-links-container {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 0 20px;
    height: 100%;
    min-width: 0;
    position: relative;
}

@media (max-width: 850px) {
    .nav-right .nav-icon-link {
        display: none;
    }

    .main-nav-logo {
        height: 40px;
    }
}

/* Hamburger Icon */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 25px;
    height: 18px;
    cursor: pointer;
    margin-left: 15px;
    flex-shrink: 0;
}

.nav-hamburger span {
    width: 100%;
    height: 2px;
    background: #c5a059;
    border-radius: 2px;
    transition: all 0.3s ease;
}

@media (max-width: 950px) {
    .nav-hamburger {
        display: flex;
    }

    /* Hamburger to X Animation */
    .nav-hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .nav-links-container {
        position: fixed !important;
        top: 80px;
        left: 46% !important;
        transform: translateX(-50%) translateY(-20px) !important;
        width: 90% !important;
        height: auto !important;
        background: rgba(10, 15, 26, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column !important;
        border-radius: 20px;
        border: 1px solid rgba(197, 160, 89, 0.3);
        padding: 20px !important;
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        z-index: 1000;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9);
    }

    .nav-links-container.mobile-active {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0) !important;
    }

    .nav-links,
    .nav-links-container ul {
        flex-direction: column !important;
        width: 100% !important;
        height: auto !important;
        gap: 10px !important;
    }

    #navbar li {
        flex-direction: column !important;
        align-items: flex-start !important;
        height: auto !important;
        width: 100% !important;
        padding: 0 !important;
    }

    .nav-links a,
    .nav-links-container ul a,
    .nav-links-container .menu a {
        font-size: 1.1rem !important;
        width: 100% !important;
        text-align: left !important;
        padding: 12px 15px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        display: block !important;
    }

    /* Mobile Submenu overrides to stack them vertically and make them visible */
    #navbar li ul {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        box-shadow: none !important;
        background: rgba(255, 255, 255, 0.02) !important;
        border: none !important;
        border-left: 2px solid rgba(197, 160, 89, 0.3) !important;
        /* Elegant vertical gold indicator line */
        padding: 5px 0 5px 15px !important;
        margin: 5px 0 5px 15px !important;
        display: flex !important;
        flex-direction: column !important;
        width: calc(100% - 30px) !important;
        height: auto !important;
    }

    #navbar li ul li {
        width: 100% !important;
        height: auto !important;
        display: block !important;
        padding: 0 !important;
        border-bottom: none !important;
    }

    #navbar li ul li a {
        padding: 8px 10px !important;
        text-align: left !important;
        justify-content: flex-start !important;
        border-bottom: none !important;
        font-size: 0.95rem !important;
        color: rgba(255, 255, 255, 0.7) !important;
        display: block !important;
        width: 100% !important;
    }

    #navbar li ul li a:hover {
        background: rgba(197, 160, 89, 0.1) !important;
        color: var(--primary-light) !important;
        padding-left: 15px !important;
    }

    #navbar {
        width: 96% !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        padding: 0 15px !important;
        height: 55px !important;
    }

    .main-nav-logo {
        height: 35px !important;
    }
}

.nav-links,
.nav-links-container ul,
.nav-links-container .menu {
    display: flex !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: clamp(0.4rem, 1vw, 1rem);
    /* 动态间距 */
    align-items: center;
    height: 100%;
    white-space: nowrap;
    /* 强制不换行，配合父级滑动 */
}

.nav-links a,
.nav-links-container ul a,
.nav-links-container .menu a {
    color: #fff;
    text-decoration: none;
    font-size: clamp(0.8rem, 0.9vw, 1rem);
    /* 动态字号 */
    font-weight: 500;
    transition: var(--transition);
    opacity: 0.8;
}

#navbar li {
    position: relative !important;
    display: flex !important;
    align-items: center;
    list-style: none !important;
    height: 100%;
}

#navbar a {
    color: #e09000;
    text-decoration: none;
    font-size: 0.8rem;
    /* Slightly smaller to fit more items */
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
    padding: 8px 12px !important;
    /* Optimized padding to prevent overflow */
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    margin: 0 !important;
}

#navbar a:hover {
    color: #c5a059;
    text-shadow: 0 0 15px rgba(197, 160, 89, 0.6);
}

/* Gold Underline - Centered */
#navbar a::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #c5a059, transparent);
    transition: all 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

#navbar a:hover::after,
#navbar li.active>a::after {
    opacity: 1;
}

/* 排除 Logo 链接的底线效果 */
.nav-logo-link::after,
.nav-logo-link:hover::after {
    display: none !important;
}

/* Dropdown Arrow - Fixed Positioning */
#navbar li:has(ul)>a::before {
    content: '▾';
    position: absolute;
    right: 2px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    opacity: 0.4;
    transition: all 0.3s ease;
}

#navbar li:hover:has(ul)>a::before {
    transform: translateY(-50%) rotate(180deg);
    opacity: 1;
    color: #c5a059;
}

/* 
   -------------------------------------------------------------------------
   DROPDOWN MENU SYSTEM - WRAPPER FIX
   -------------------------------------------------------------------------
*/

#navbar li ul {
    position: absolute !important;
    top: 100% !important;
    left: 50% !important;
    transform: translateX(-50%) translateY(10px) !important;
    width: max-content !important;
    min-width: 150px !important;
    height: auto !important;
    max-height: none !important;
    background: rgba(10, 15, 10, 0.98) !important;
    backdrop-filter: blur(30px) !important;
    -webkit-backdrop-filter: blur(30px) !important;
    border: 1px solid rgba(197, 160, 89, 0.4) !important;
    border-radius: 12px !important;
    padding: 8px !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9) !important;
    z-index: 99999 !important;
    overflow: visible !important;
}

/* Show dropdown on hover */
#navbar li:hover>ul {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(-50%) translateY(5px) !important;
}

#navbar li ul li {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 0 !important;
    padding: 1px 0 !important;
    float: none !important;
}

#navbar li ul li a {
    width: 100% !important;
    padding: 10px 15px !important;
    justify-content: center !important;
    /* CENTERED in dropdown */
    text-align: center !important;
    border-bottom: 1px solid rgba(197, 160, 89, 0.1) !important;
    font-size: 0.82rem !important;
}

#navbar li ul li a:hover {
    background: rgba(197, 160, 89, 0.15) !important;
    color: #f0d090 !important;
    padding-left: 20px !important;
    /* Subtle slide effect */
}

/* Clear old duplicate rules */

.nav-right {
    min-width: 140px;
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
}

/* ========== 修复完成：清晰不模糊 账号注册按钮 ========== */
.btn-login-modern {
    background: linear-gradient(to bottom, #d4af37 0%, #aa8a2e 100%);
    color: #000 !important;
    padding: 10px 24px !important;
    border-radius: 30px;
    font-size: 0.95rem !important;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #c5a059;
    box-shadow: 0 0 15px rgba(197, 160, 89, 0.2);
    white-space: nowrap;
    font-family: Inter, "Microsoft YaHei", Arial, sans-serif !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    text-shadow: none !important;
}

.btn-login-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(197, 160, 89, 0.4);
    filter: brightness(1.1);
}

/* Hide redundant registration link in navbar */
#navbar a[href*="uo_register.php"]:not(.btn-login-modern) {
    display: none !important;
}

/* Correct the giant logo position */
.giant-protruding-logo {
    position: absolute;
    top: 130px !important;
    left: 50%;
    transform: translateX(-50%);
    z-index: 11;
    text-align: center;
    pointer-events: none;
    width: 100%;
    max-width: 100%;
}

.btn-login:hover {
    background: rgba(197, 160, 89, 0.15);
    border-color: var(--primary-light);
    box-shadow: 0 0 20px rgba(197, 160, 89, 0.3);
}

/* Hero Section */
.hero {
    height: 90vh;
    /* Slightly less than full screen to encourage scrolling */
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: url('../images/hero_banner.png') center top/cover no-repeat;
    background-attachment: fixed;
}

/* Main Content Wrapper - Consolidated & Overlapping */
.main-wrapper {
    background: var(--bg-container);
    border: 1px solid var(--border-gold);
    max-width: 1400px;
    padding: 40px 30px;
    position: relative;
    z-index: 10;
    display: grid;
    gap: 30px;
    min-height: 600px;
}

.is-home .main-wrapper {
    margin: -180px auto 40px;
    /* Heavy overlap for home */
    border-radius: 12px 12px 0 0;
}

.is-subpage .main-wrapper {
    margin: 140px auto 60px;
    /* Increased space to clear the navbar island */
    border-radius: 12px;
    /* Added slight rounding for subpages too */
}

.hero-ornament-top {
    color: var(--primary);
    font-size: 0.7rem;
    letter-spacing: 12px;
    margin-bottom: 5px;
    opacity: 0.5;
}

/* ========== 核心修复：首页LOGO 不放大、只随窗口缩小 ========== */
.hero-rendered-logo {
    max-width: 90% !important;
    width: 700px !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
    object-fit: contain !important;
    mix-blend-mode: screen;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.8));
    animation: logo-glow 4s ease-in-out infinite;
}

@keyframes logo-glow {

    0%,
    100% {
        filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.8));
        opacity: 0.95;
    }

    50% {
        filter: drop-shadow(0 15px 45px rgba(197, 160, 89, 0.2));
        opacity: 1;
    }
}

.hero-game-subtitle {
    font-family: 'Cinzel', serif;
    color: #c5a059;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 15px;
    margin-top: -10px;
    /* 拉近与 Logo 图片的距离 */
    text-shadow: 0 0 15px rgba(197, 160, 89, 0.4);
    opacity: 0.7;
    text-align: center;
}

.hero-game-title:hover {
    transform: perspective(1000px) rotateX(5deg) scale(1.02);
}

.hero-ornament-line {
    width: 180px;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--primary-light), transparent);
    margin: 12px auto 8px;
}

.hero-game-subtitle {
    font-family: 'MedievalSharp', serif;
    color: var(--primary-light);
    font-size: 1.3rem;
    letter-spacing: 15px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
    opacity: 0.85;
}

.btn-download i {
    font-size: 1.2rem;
}

/* Retro Content Box Style */
.main-wrapper {
    position: relative;
    background: rgba(10, 15, 10, 0.9);
    border: 1px solid #c5a059;
    box-shadow:
        inset 0 0 40px rgba(0, 0, 0, 1),
        0 20px 50px rgba(0, 0, 0, 0.8);
    padding: 40px;
    margin-top: 40px;
    margin-bottom: 60px;
    border-radius: 4px;
}

/* Corner Ornaments */
.main-wrapper::before,
.main-wrapper::after {
    content: "";
    position: absolute;
    width: 30px;
    height: 30px;
    pointer-events: none;
    z-index: 10;
}

/* Top Left */
.main-wrapper::before {
    top: -5px;
    left: -5px;
    border-top: 3px solid #c5a059;
    border-left: 3px solid #c5a059;
}

/* Bottom Right */
.main-wrapper::after {
    bottom: -5px;
    right: -5px;
    border-bottom: 3px solid #c5a059;
    border-right: 3px solid #c5a059;
}

/* Inner Decorative Frame */
.main-wrapper .content-inner-frame {
    border: 1px solid rgba(197, 160, 89, 0.15);
    padding: 20px;
    height: 100%;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background-color: var(--primary);
    color: #000;
    border: none;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.5);
}

/* ============================================
   SHOWCASE SECTION (Reference Image Layout)
   ============================================ */
.showcase-section {
    margin-bottom: 0px;
}

.showcase-header {
    text-align: center;
    margin-bottom: 20px;
}

.showcase-title {
    font-family: 'MedievalSharp', 'Cinzel', serif;
    font-size: 2rem;
    color: var(--primary-light);
    letter-spacing: 6px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* Three Column Layout */
.showcase-three-col {
    display: grid;
    grid-template-columns: 200px 1fr 200px;
    gap: 15px;
}

/* Side Menus */
.showcase-menu {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.showcase-menu-search {
    margin-bottom: 8px;
}

.showcase-search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-gold);
    border-radius: 4px;
    padding: 8px 12px;
    color: var(--text-main);
    font-size: 0.8rem;
}

.showcase-search-input::placeholder {
    color: var(--text-muted);
}

.showcase-menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(184, 150, 62, 0.1);
    border-bottom: none;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition);
}

.showcase-menu-item:last-child {
    border-bottom: 1px solid rgba(184, 150, 62, 0.1);
}

.showcase-menu-item:hover,
.showcase-menu-item.active {
    background: rgba(184, 150, 62, 0.12);
    color: var(--primary-light);
}

/* Center Cards */
.showcase-cards {
    display: flex;
    align-items: flex-start;
    /* Do NOT stretch to sidebar height */
    gap: 15px;
}

.cards-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    width: 100%;
}

.game-card-link {
    display: block !important;
    text-decoration: none !important;
    width: 100% !important;
}

.game-card {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-gold);
    background: var(--bg-card);
    transition: var(--transition);
    cursor: pointer;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(184, 150, 62, 0.2);
    border-color: var(--primary);
}

.game-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.card-caption {
    padding: 10px 12px;
    background: rgba(10, 20, 10, 0.9);
    text-align: center;
}

.card-caption strong {
    display: inline-block;
    color: var(--primary-light);
    font-size: 0.85rem;
    margin-bottom: 3px;
    padding: 4px 15px;
    border: 1px solid var(--primary);
    border-radius: 4px;
    background: rgba(184, 150, 62, 0.05);
    transition: var(--transition);
}

.game-card:hover .card-caption strong {
    background: rgba(184, 150, 62, 0.15);
    box-shadow: 0 0 10px rgba(184, 150, 62, 0.3);
    border-color: var(--primary-light);
}

.card-caption p {
    color: var(--text-muted);
    font-size: 0.7rem;
    margin: 0;
    line-height: 1.4;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.column-center {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.user-modules-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--glass-border);
}

.breadcrumb-nav {
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Component Content Fixes */
.column-center {
    width: 100%;
    min-height: 400px;
}

/* Ensure Joomla Wrapper (iframe) is visible and has height */
iframe#blockrandom,
.contentpaneopen iframe,
article iframe {
    width: 100% !important;
    min-height: 600px !important;
    border: none !important;
    background: transparent !important;
    /* Invert colors for simple text pages to match dark theme */
    filter: invert(0.9) hue-rotate(180deg) brightness(1.2);
    border-radius: 12px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05) !important;
}

.is-subpage .column-center {
    background: rgba(0, 0, 0, 0.2);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

/* ============================================
   LOGIN - PREMIUM CARD DESIGN
   ============================================ */

.login-premium-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 40px 20px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: linear-gradient(145deg, rgba(20, 35, 20, 0.95), rgba(12, 22, 12, 0.98));
    border: 1px solid var(--border-gold);
    border-radius: 16px;
    padding: 45px 40px;
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.6),
        0 0 80px rgba(184, 150, 62, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* Logo Area */
.nav-right {
    flex-shrink: 0;
    margin-left: 20px;
    padding-left: 20px;
    border-left: 1px solid rgba(197, 160, 89, 0.2);
    /* 垂直分割线 */
    display: flex;
    align-items: center;
}

.login-logo-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    filter: grayscale(0.3);
}

.login-logo h2 {
    font-family: 'Cinzel', serif;
    color: #c5a059;
    font-size: 1.6rem;
    letter-spacing: 5px;
    margin: 0 0 6px 0;
}

.login-subtitle {
    color: #666;
    font-size: 0.75rem;
    letter-spacing: 2px;
    margin: 0;
}

/* Divider */
.login-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(197, 160, 89, 0.3), transparent);
    margin: 25px 0;
}

/* Field Group */
.login-field {
    margin-bottom: 22px;
}

.login-field label {
    display: block;
    color: #888;
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

/* Input Wrapper with Icon */
.login-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.login-input-icon {
    position: absolute;
    left: 14px;
    font-size: 0.9rem;
    opacity: 0.5;
    pointer-events: none;
    z-index: 1;
}

.login-input-wrap input.inputbox {
    width: 100% !important;
    box-sizing: border-box !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 10px !important;
    padding: 14px 16px 14px 42px !important;
    color: #fff !important;
    font-size: 0.95rem !important;
    transition: all 0.3s ease !important;
}

.login-input-wrap input.inputbox:focus {
    border-color: rgba(197, 160, 89, 0.6) !important;
    background: rgba(255, 255, 255, 0.07) !important;
    outline: none !important;
    box-shadow: 0 0 20px rgba(197, 160, 89, 0.12) !important;
}

.login-input-wrap input.inputbox::placeholder {
    color: #555;
    font-size: 0.85rem;
}

/* Remember Me */
.login-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 25px;
}

.login-remember input[type="checkbox"] {
    width: 16px !important;
    height: 16px;
    accent-color: #c5a059;
    cursor: pointer;
}

.login-remember label {
    color: #777;
    font-size: 0.8rem;
    cursor: pointer;
}

/* Submit Button */
.login-btn-submit,
button.login-btn-submit {
    display: block !important;
    width: 100% !important;
    padding: 15px !important;
    background: linear-gradient(135deg, #c5a059 0%, #a07c3a 50%, #c5a059 100%) !important;
    background-size: 200% auto !important;
    border: none !important;
    border-radius: 10px !important;
    color: #000 !important;
    font-weight: 800 !important;
    font-size: 1rem !important;
    letter-spacing: 8px !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    transition: all 0.4s ease !important;
    box-shadow: 0 4px 15px rgba(197, 160, 89, 0.3) !important;
}

.login-btn-submit:hover,
button.login-btn-submit:hover {
    background-position: right center !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(197, 160, 89, 0.45) !important;
}

/* Links */
.login-links {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.login-links a {
    color: #888 !important;
    text-decoration: none !important;
    font-size: 0.8rem !important;
    transition: color 0.3s !important;
}

.login-links a:hover {
    color: #c5a059 !important;
}

.login-link-sep {
    color: #333;
    margin: 0 10px;
    font-size: 0.7rem;
}

.login-link-register {
    color: #c5a059 !important;
    font-weight: 600 !important;
}

/* Hide old Joomla form structure if still showing */
form#com-form-login table.contentpane {
    display: none !important;
}

.column-title h2 {
    font-family: 'Cinzel', serif;
    font-size: 1.6rem;
    color: var(--primary-light);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 10px;
}

.column-title p {
    font-size: 0.85rem;
    color: #555;
    margin-bottom: 30px;
}

/* Features Grid */
.features-grid-mini {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    margin-bottom: 60px;
}

.feature-mini-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 15px 5px;
    text-align: center;
    border-radius: 6px;
    transition: var(--transition);
}

.feature-mini-card:hover {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
}

.feature-mini-card i,
.feature-svg-icon {
    font-size: 1.2rem;
    color: var(--primary-light);
    margin-bottom: 8px;
    display: block;
    font-style: normal;
}

.feature-svg-icon svg {
    display: block;
    margin: 0 auto;
}

.feature-mini-card span {
    font-size: 0.65rem;
    color: var(--text-muted);
    display: block;
}

/* News List */
.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.news-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 12px;
    display: flex;
    position: relative;
}

.news-icon {
    width: 30px;
    color: var(--primary);
    font-size: 1.1rem;
    margin-top: 5px;
}

.news-content {
    flex: 1;
}

.news-content h4 {
    font-size: 0.95rem;
    color: #fff;
    margin-bottom: 4px;
}

.news-content p {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.news-date {
    font-size: 0.7rem;
    color: #555;
    position: absolute;
    top: 15px;
    right: 80px;
}

.news-thumb {
    width: 60px;
    height: 40px;
    border-radius: 4px;
    overflow: hidden;
    margin-left: 15px;
    align-self: flex-end;
}

.news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.gallery-item {
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    aspect-ratio: 16/10;
}

.gallery-item.large {
    grid-column: span 1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Home Layout Styles */
.home-layout {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.home-two-columns {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 25px;
}

/* Features Section */
.features-section {
    padding-bottom: 40px;
    border-bottom: 1px solid var(--glass-border);
}

.column-title h2 span {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 3px;
    margin-top: 5px;
}

.features-grid-mini {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.feature-mini-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    padding: 30px 15px;
    text-align: center;
    border-radius: 12px;
    transition: var(--transition);
}

.feature-mini-card:hover {
    background: rgba(197, 160, 89, 0.05);
    border-color: var(--primary);
    transform: translateY(-5px);
}

.feature-mini-card i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 15px;
    display: block;
}

.feature-mini-card span {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: 1px;
}

/* News Section */
.more-link {
    font-size: 0.8rem;
    color: var(--primary-light);
    text-decoration: none;
    opacity: 0.7;
}

.more-link:hover {
    opacity: 1;
}

/* Portal Grid */
.portal-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.portal-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px;
    border-radius: 8px;
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid var(--border-gold);
}

.portal-item.download {
    background: linear-gradient(135deg, rgba(184, 150, 62, 0.15) 0%, rgba(14, 26, 14, 0.8) 100%);
    border-color: var(--border-gold);
}

.portal-item.bbs {
    background: rgba(255, 255, 255, 0.03);
}

.portal-item:hover {
    transform: scale(1.02);
    border-color: var(--primary);
}

.portal-item i {
    font-size: 1.8rem;
    color: var(--primary-light);
}

.portal-item strong {
    display: block;
    color: #fff;
    font-size: 1rem;
}

.portal-item span {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Server Status Card */
.server-status-card {
    background: rgba(10, 20, 10, 0.6);
    border: 1px solid var(--border-gold);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 5px;
}

.status-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 2px;
}

.status-dot.online {
    background: #4caf50;
    box-shadow: 0 0 10px #4caf50;
}

.status-dot.offline {
    background: #f44336;
    box-shadow: 0 0 10px #f44336;
}

.pulse {
    animation: pulse-animation 2s infinite;
}

@keyframes pulse-animation {
    0% {
        transform: scale(0.95);
        opacity: 1;
    }

    50% {
        transform: scale(1);
        opacity: 0.7;
    }

    100% {
        transform: scale(0.95);
        opacity: 1;
    }
}

.status-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.status-row span {
    color: var(--text-muted);
}

.status-row strong {
    color: var(--primary-light);
}

/* Footer */
footer {
    padding: 40px 8%;
    border-top: 1px solid var(--border-gold);
    text-align: center;
    color: var(--text-muted);
    background: linear-gradient(to bottom, var(--green-dark), #060d06);
    font-size: 0.85rem;
}

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

/* Mobile Responsive */
@media (max-width: 1024px) {
    .showcase-three-col {
        grid-template-columns: 1fr;
    }

    .showcase-menu {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 5px;
    }

    .showcase-menu-item {
        flex: 1 1 45%;
    }

    .cards-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .home-two-columns {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 0 5%;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {

    /* Reset navbar min-widths on mobile to prevent stretching the capsule */
    .nav-left,
    .nav-right {
        min-width: auto !important;
    }

    .cards-row {
        grid-template-columns: 1fr 1fr;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero {
        height: 300px !important;
    }

    /* Giant logo positioning and scaling on mobile */
    .giant-protruding-logo {
        top: 75px !important;
        z-index: 20 !important;
        /* Ensure it stays on top of any overlapping wrapper */
    }

    .hero-rendered-logo {
        max-width: 55% !important;
        /* Scale down the giant stacked logo so it fits above the card */
    }

    /* Floating Card Layout for the main content on mobile */
    .main-wrapper {
        padding: 20px 15px !important;
    }

    .is-home .main-wrapper {
        margin: -60px auto 30px !important;
        width: 94% !important;
        max-width: calc(100% - 24px) !important;
        border-radius: 12px !important;
    }

    /* Hide corner ornaments on mobile to prevent subpixel layout overflow */
    .main-wrapper::before,
    .main-wrapper::after {
        display: none !important;
    }

    /* Stack showcasing menu items vertically on mobile to prevent overflow */
    .showcase-menu {
        flex-direction: column !important;
        gap: 8px !important;
    }

    .showcase-menu-item {
        width: 100% !important;
        flex: none !important;
        /* Reset flex-basis to prevent collapsing to 0 height in column layout */
        margin-bottom: 0 !important;
    }

    .showcase-menu-search {
        width: 100% !important;
        margin-bottom: 8px !important;
    }

    .server-status-card {
        width: 100% !important;
        flex: none !important;
        margin-bottom: 0 !important;
    }

    /* Responsive grid for portal icons */
    .portal-section.full-width .portal-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
}

/* --- SIDEBAR ENHANCEMENTS --- */
.showcase-search-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(197, 160, 89, 0.2) !important;
    border-radius: 6px;
    padding: 10px 15px;
    color: #fff;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.showcase-search-input:focus {
    outline: none;
    border-color: #c5a059 !important;
    box-shadow: 0 0 15px rgba(197, 160, 89, 0.3);
    background: rgba(0, 0, 0, 0.6) !important;
}

.showcase-menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(197, 160, 89, 0.05);
    margin-bottom: 2px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: all 0.3s ease;
}

.showcase-menu-item:hover {
    background: rgba(197, 160, 89, 0.08);
    color: #c5a059;
    transform: translateX(5px);
    border-left: 3px solid #c5a059;
}

.sidebar-module {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(197, 160, 89, 0.1);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
}

.status-dot {
    width: 10px;
    height: 10px;
    background: #44ff44;
    border-radius: 50%;
    box-shadow: 0 0 10px #44ff44;
    animation: status-breath 2s infinite;
}

@keyframes status-breath {
    0% {
        opacity: 0.4;
        transform: scale(0.9);
    }

    50% {
        opacity: 1;
        transform: scale(1.1);
        box-shadow: 0 0 12px #44ff44;
    }

    100% {
        opacity: 0.4;
        transform: scale(0.9);
    }
}

/* --- SEARCH PAGE BEAUTIFICATION --- */
.search {
    padding: 20px 0;
}

#searchForm fieldset {
    border: 1px solid rgba(197, 160, 89, 0.2);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

#searchForm legend {
    color: #c5a059;
    font-weight: 700;
    padding: 0 15px;
    font-size: 1.1rem;
}

.search .inputbox {
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(197, 160, 89, 0.3) !important;
    border-radius: 6px;
    padding: 8px 12px;
    color: #fff;
    margin: 5px 0;
}

.search button.button {
    background: linear-gradient(135deg, #c5a059, #8a6d29) !important;
    color: #000 !important;
    border: none !important;
    border-radius: 20px;
    padding: 8px 25px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search button.button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(197, 160, 89, 0.5);
}

.search-results {
    list-style: none;
    padding: 0;
}

.search-results dt {
    margin-top: 25px;
    border-left: 3px solid #c5a059;
    padding-left: 15px;
}

.search-results dt.result-title a {
    color: #c5a059 !important;
    font-size: 1.2rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.search-results dt.result-title a:hover {
    text-shadow: 0 0 10px rgba(197, 160, 89, 0.4);
}

.search-results dd.result-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 10px 0 20px 18px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.highlight {
    background: rgba(197, 160, 89, 0.2);
    color: #c5a059;
    padding: 0 3px;
    border-radius: 2px;
}

/* --- SEARCH PAGE FINAL BEAUTIFICATION --- */
#search_searchword.inputbox {
    background: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid #c5a059 !important;
    border-radius: 6px;
    padding: 10px 15px;
    color: #fff;
    width: 300px;
}

button.button {
    background: linear-gradient(135deg, #c5a059, #8a6d29) !important;
    color: #000 !important;
    border: none !important;
    border-radius: 20px;
    padding: 10px 25px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 10px;
}

button.button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(197, 160, 89, 0.5);
}

/* Fix for the radio buttons and labels */
#searchForm label {
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 0.9rem;
    margin-right: 15px;
    cursor: pointer;
}

#searchForm input[type="radio"],
#searchForm input[type="checkbox"] {
    accent-color: #c5a059;
    margin-right: 5px;
    cursor: pointer;
}

select#ordering {
    background: rgba(0, 0, 0, 0.6) !important;
    border: 1px solid rgba(197, 160, 89, 0.3) !important;
    color: #fff !important;
    padding: 5px 12px;
    border-radius: 6px;
}

/* Targeting the specific legacy table/fieldset structure */
table.contentpaneopen fieldset {
    border: 1px solid rgba(197, 160, 89, 0.2) !important;
    background: rgba(0, 0, 0, 0.3) !important;
    border-radius: 12px;
    padding: 25px !important;
    margin-bottom: 25px !important;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.4);
}

table.contentpaneopen fieldset a {
    color: #c5a059 !important;
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    text-decoration: none !important;
}

table.contentpaneopen fieldset span.small {
    color: rgba(197, 160, 89, 0.6) !important;
}

table.contentpaneopen fieldset div {
    color: rgba(255, 255, 255, 0.8) !important;
    line-height: 1.8 !important;
    margin-top: 10px;
}

/* --- SEARCH PAGE MISC TEXT POLISH --- */
.search h1,
.search .componentheading {
    color: #c5a059 !important;
    font-family: Cinzel, serif;
    font-size: 1.8rem !important;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(197, 160, 89, 0.3);
}

.search p,
.search b {
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 0.9rem;
}

.search .display-limit label {
    color: rgba(197, 160, 89, 0.7) !important;
    font-weight: 600;
    margin-right: 8px;
}

.search .display-limit select {
    background: rgba(0, 0, 0, 0.6) !important;
    border: 1px solid rgba(197, 160, 89, 0.3) !important;
    color: #fff !important;
    border-radius: 4px;
    padding: 2px 8px;
}

.search-results-total {
    color: #c5a059 !important;
    font-weight: 700;
    margin: 20px 0;
    border-bottom: 1px solid rgba(197, 160, 89, 0.1);
    padding-bottom: 10px;
}

/* --- SEARCH PAGINATION BEAUTIFICATION --- */
.pagination {
    margin: 30px 0;
    text-align: center;
}

.pagination ul {
    display: inline-flex;
    list-style: none;
    padding: 0;
    gap: 8px;
}

.pagination li {
    display: inline-block;
}

.pagination li a,
.pagination li span {
    display: block;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(197, 160, 89, 0.2);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.pagination li a:hover {
    background: rgba(197, 160, 89, 0.15);
    border-color: #c5a059;
    color: #fff;
    box-shadow: 0 0 10px rgba(197, 160, 89, 0.2);
    transform: translateY(-2px);
}

.pagination li span {
    background: #c5a059;
    color: #000;
    font-weight: 700;
    border-color: #c5a059;
}

/* Modern Modal for Account Hub */
.modern-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
    width: 95%;
    max-width: 800px;
    height: 85vh;
    background: #111;
    border: 1px solid #c5a059;
    box-shadow: 0 0 50px rgba(197, 160, 89, 0.3);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    transform: translateY(30px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

@media (max-width: 768px) {
    .modal-content {
        height: 95vh;
        width: 100%;
        border: none;
    }
}

.modern-modal.active .modal-content {
    transform: translateY(0) scale(1);
}

.modal-header {
    background: #1a1a1a;
    border-bottom: 1px solid #c5a059;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header span {
    font-family: 'Cinzel', serif;
    color: #c5a059;
    letter-spacing: 2px;
    font-size: 1.1rem;
}

.modal-close {
    background: none;
    border: none;
    color: #666;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #c5a059;
}

.modal-body {
    flex: 1;
    background: #0a0a0a;
}

#accountFrame {
    width: 100%;
    height: 100%;
    border: none;
}

/* --- News Modal & Home Portal Styles --- */
.news-modal-container {
    max-width: 800px;
    background: linear-gradient(145deg, #0d130d, #080a08);
    border: 2px solid #c5a059;
    box-shadow: 0 0 50px rgba(197, 160, 89, 0.2);
    padding: 0;
    overflow: hidden;
    position: relative;
    border-radius: 8px;
}

.news-modal-header {
    background: linear-gradient(to bottom, #1a1a1a, #0a0a0a);
    border-bottom: 2px solid #c5a059;
    padding: 20px 30px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.news-modal-header h2 {
    margin: 0;
    color: #c5a059;
    font-family: 'MedievalSharp', cursive;
    font-size: 1.6rem;
    letter-spacing: 2px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.news-modal-header h2 span {
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    color: rgba(197, 160, 89, 0.6);
    letter-spacing: 1px;
}

.news-modal-body {
    padding: 30px;
    max-height: 65vh;
    overflow-y: auto;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.8;
}

.news-modal-body::-webkit-scrollbar {
    width: 6px;
}

.news-modal-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

.news-modal-body::-webkit-scrollbar-thumb {
    background: #c5a059;
    border-radius: 10px;
}

.news-modal-footer {
    padding: 20px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-close-news {
    background: #c5a059;
    color: #000;
    border: none;
    padding: 10px 40px;
    font-weight: 700;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.btn-close-news:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(197, 160, 89, 0.4);
}

.home-centered-portal {
    margin-top: 5px;
    display: flex;
    justify-content: center;
    padding: 0 5%;
}

.portal-section.full-width {
    width: 100%;
    max-width: 1200px;
}

.portal-section.full-width .portal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 30px;
}

.nav-icon-link {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.3rem;
    margin-right: 25px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.nav-icon-link:hover {
    color: #c5a059;
    transform: translateY(-2px);
}

/* --- Global Modern Modal System --- */
.hub-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #000;
    display: block;
}

/* --- Premium Server Status Card --- */
.server-status-card {
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none !important;
    padding: 20px 15px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(197, 160, 89, 0.15);
    border-radius: 8px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    margin-bottom: 15px;
}

.status-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.status-dot {
    width: 10px;
    height: 10px;
    background-color: #2ecc71;
    border-radius: 50%;
    box-shadow: 0 0 12px #2ecc71;
    display: inline-block;
}

.status-dot.pulse {
    animation: status-pulse 1.5s infinite;
}

@keyframes status-pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(46, 204, 113, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0);
    }
}

#js-status-text {
    color: #c5a059;
    font-family: 'MedievalSharp', cursive;
    font-size: 1rem;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    transition: all 0.3s ease;
}

.server-status-card:hover {
    transform: translateY(-3px) scale(1.02);
    background: rgba(197, 160, 89, 0.05);
    border-color: #c5a059;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5), 0 0 15px rgba(197, 160, 89, 0.2);
}

.server-status-card:hover #js-status-text {
    color: #fff;
    text-shadow: 0 0 10px rgba(197, 160, 89, 0.8);
}

/* --- Content List & Category Table Beautification --- */
.category,
.sectiontableheader,
.contentpaneopen {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 8px !important;
    background: transparent !important;
}

.sectiontableheader {
    background: rgba(197, 160, 89, 0.1) !important;
    color: #c5a059 !important;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 2px;
    padding: 12px !important;
    border-bottom: 2px solid #c5a059 !important;
}

.sectiontableentry1,
.sectiontableentry2,
tr[class^="sectiontableentry"] {
    background: rgba(255, 255, 255, 0.02) !important;
    transition: all 0.3s ease;
}

.sectiontableentry1 td,
.sectiontableentry2 td,
tr[class^="sectiontableentry"] td {
    padding: 15px 12px !important;
    border-bottom: 1px solid rgba(197, 160, 89, 0.1) !important;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* Row Hover Effect */
.sectiontableentry1:hover,
.sectiontableentry2:hover,
tr[class^="sectiontableentry"]:hover {
    background: rgba(197, 160, 89, 0.08) !important;
    transform: translateX(5px);
}

/* Link Styling */
.sectiontableentry1 a,
.sectiontableentry2 a,
tr[class^="sectiontableentry"] a {
    color: #e5c07b !important;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.3s;
}

.sectiontableentry1 a:hover,
.sectiontableentry2 a:hover,
tr[class^="sectiontableentry"] a:hover {
    color: #fff !important;
    text-shadow: 0 0 8px rgba(229, 192, 123, 0.6);
}

/* Index / Number Column */
tr[class^="sectiontableentry"] td:first-child {
    color: #c5a059;
    font-family: "MedievalSharp", serif;
    font-weight: bold;
    font-size: 1.1rem;
    width: 40px;
}

/* Hits / Date Columns */
.sectiontableentry1 td:last-child,
.sectiontableentry2 td:last-child {
    font-family: monospace;
    color: rgba(197, 160, 89, 0.5);
}

/* --- Pagination Beautification --- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    padding: 20px 0;
}

.pagination a,
.pagination span {
    padding: 8px 16px;
    background: rgba(197, 160, 89, 0.1);
    border: 1px solid rgba(197, 160, 89, 0.3);
    color: #c5a059;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
}

.pagination a:hover {
    background: #c5a059;
    color: #000;
    box-shadow: 0 0 15px rgba(197, 160, 89, 0.4);
}

.pagination .active,
.pagination .pagenav {
    font-weight: bold;
}

.counter {
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
    margin-top: 10px;
}

/* --- RESPONSIVE MOBILE FIXES OVERRIDES --- */
@media (max-width: 768px) {
    .portal-section.full-width .portal-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
}