/* ============================================
   BladeMasters - PSD Exact Match CSS
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg-dark: #0a0f1a;
    --bg-card: #1a2535;
    --bg-card-dark: #141c28;
    --bg-input: #0d1219;
    --border-color: rgba(74, 144, 217, 0.2);
    --border-light: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #7a8a9a;
    --text-muted: #5a6a7a;
    --accent-blue: #4a90d9;
    --accent-gold: #f4cc6a;
    --accent-green: #22c55e;
    --accent-red: #ef4444;
    --border-radius: 8px;
    --border-radius-lg: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #0a0f1a;
    color: #fff;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ============================================
   Page Background
   ============================================ */
.page-wrapper {
    width: 100%;
    min-height: 100vh;
    background: url('../images/psd/bg.png') top center no-repeat;
    background-size: 150% auto;
    background-color: #0a0f1a;
	overflow-x: hidden;
}

/* ============================================
   Header Bar (Navbar)
   ============================================ */
.header-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 90px;
    background: url('../images/psd/bg-header.png') center -15px/120% auto no-repeat;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 15px;
}

.header-inner {
    width: 100%;
    max-width: 1200px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    position: relative;
}

/* Navigation Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 50px;
    position: relative;
}

.nav-link {
    font-size: 13px;
    font-weight: 500;
    color: #7a8a9a;
    transition: color 0.3s;
    position: relative;
    padding: 5px 0;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
}

/* Active indicator using layer-1.png */
.nav-link.active::before {
    content: '';
    position: absolute;
    top: -15px;
    left: -15px;
    right: -15px;
    height: 120px;
    background: url('../images/psd/layer-1.png') top center/100% auto no-repeat;
    pointer-events: none;
    -webkit-mask-image: url('../images/psd/bg-header.png');
    mask-image: url('../images/psd/bg-header.png');
    -webkit-mask-size: 2000px auto;
    mask-size: 2000px auto;
    -webkit-mask-position: center top;
    mask-position: center top;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

/* Header Right */
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    position: absolute;
    right: 20px;
}

/* Language Button */
.lang-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    padding: 8px 15px;
    cursor: pointer;
    position: relative;
    border: none;
}

.lang-btn .lang-text {
    font-size: 14px;
    color: #fff;
    font-weight: 500;
}

.lang-btn .lang-flag {
    width: 22px;
    height: 16px;
    object-fit: cover;
    border-radius: 2px;
}

.lang-btn .arrow {
    margin-left: 5px;
    font-size: 10px;
    color: #fff;
    transition: transform 0.3s;
}

.lang-btn:hover .arrow {
    transform: rotate(180deg);
}

/* Language Dropdown */
.lang-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1a2535;
    border-radius: 5px;
    margin-top: 5px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.lang-btn:hover .lang-dropdown {
    opacity: 1;
    visibility: visible;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    font-size: 12px;
    transition: background 0.2s;
}

.lang-option:hover {
    background: rgba(74, 144, 217, 0.2);
}

/* Register Button */
.register-btn {
    background: url('../images/psd/bttn-registration.png') center/contain no-repeat;
    width: 100px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
}

/* ============================================
   Hero Section (Header Image + Video)
   ============================================ */
.hero-section {
    width: 100%;
    padding-top: 0;
    position: relative;
    overflow: hidden;
}

.hero-video-container {
    position: relative;
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;
    height: 800px;
    overflow: visible;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/psd/head.png') top center/100% auto no-repeat;
    z-index: 1;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 2;
}

.hero-overlay {
    display: none;
}

/* ============================================
   Stats Bar (Download, Online, 24h)
   ============================================ */
.stats-section {
    display: flex;
    justify-content: center;
    margin-top: -60px;
    position: relative;
    z-index: 10;
}

.stats-bar {
    background: url('../images/psd/bg-online.png') center/100% 100% no-repeat;
    width: 1261px;
    height: 121px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 25px;
    position: relative;
    height: 100%;
}

.stat-item:not(.download):not(:last-child)::after {
    content: '';
    position: absolute;
    right: -80px;
    top: 50%;
    transform: translateY(-50%);
    width: 9px;
    height: 85px;
    background: url('../images/psd/separate-online.png') center/contain no-repeat;
}

.stat-icon {
    width: 73px;
    height: 72px;
    background: url('../images/psd/Ebene-1990.png') center/contain no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon img {
    max-width: 40px;
    max-height: 40px;
}

.stat-info {
    text-align: center;
}

.stat-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 3px;
    white-space: nowrap;
}

.stat-info span {
    font-size: 12px;
    color: #7a8a9a;
    display: block;
}

/* Download box */
.stat-item.download {
    background: url('../images/psd/bg-daownload.png') center/contain no-repeat;
    width: 435px;
    height: 210px;
    padding-left: 120px;
    position: absolute;
    left: -10px;
    top: 51%;
    transform: translateY(-50%);
    -webkit-mask-image: url('../images/psd/bg-online.png');
    mask-image: url('../images/psd/bg-online.png');
    -webkit-mask-size: 1261px 121px;
    mask-size: 1261px 121px;
    -webkit-mask-position: left center;
    mask-position: left center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

.stat-item.download::after {
    display: none;
}

/* Online Now */
.stat-item.online-now {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

/* Online 24h */
.stat-item.online-24h {
    position: absolute;
    right: 80px;
}

/* ============================================
   Main Content Area
   ============================================ */
.main-content {
    max-width: 1261px;
    margin: 40px auto;
    padding: 0;
}

/* Shadow between sections */
.section-shadow {
    width: 100%;
    height: 93px;
    background: url('../images/psd/shadow.png') center/contain no-repeat;
    margin: 20px 0;
    margin-bottom: -30px;
    position: relative;
    z-index: 1;
}

/* ============================================
   Top Row: User Panel + News
   ============================================ */
.top-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    width: 100%;
    align-items: stretch;
}

/* User Panel */
.user-panel {
    width: 397px;
    flex-shrink: 0;
}

.panel-card {
    background: url('../images/psd/bg-userpanel1.png') top center/100% auto no-repeat;
    border-radius: 0;
    overflow: hidden;
    width: 397px;
    height: 100%;
    position: relative;
}

.panel-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/psd/bg-userpanel.png') top center/cover no-repeat;
    pointer-events: none;
    z-index: 0;
    -webkit-mask-image: url('../images/psd/bg-userpanel1.png');
    mask-image: url('../images/psd/bg-userpanel1.png');
    -webkit-mask-size: 100% auto;
    mask-size: 100% auto;
    -webkit-mask-position: top center;
    mask-position: top center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

.panel-header {
    background: url('../images/psd/header.png') top center/100% auto no-repeat;
    height: 76px;
    position: relative;
    overflow: hidden;
    z-index: 1;
    width: 100%;
}

.panel-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/psd/Ebene-517.png') -60px -215px/130% auto no-repeat;
    pointer-events: none;
    -webkit-mask-image: url('../images/psd/header.png');
    mask-image: url('../images/psd/header.png');
    -webkit-mask-size: 100% auto;
    mask-size: 100% auto;
    -webkit-mask-position: top center;
    mask-position: top center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

.panel-title {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 16px;
    font-weight: 600;
}

.panel-body {
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Login Form */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.input-group {
    display: flex;
    align-items: center;
    background: url('../images/psd/bg-password.png') center/cover no-repeat;
    height: 57px;
    padding: 0 15px;
    border-radius: 0;
}

.input-group .icon {
    width: 20px;
    display: flex;
    justify-content: center;
}

.input-group .separator {
    width: 10px;
    height: 24px;
    background: url('../images/psd/separate.png') center/contain no-repeat;
    margin: 0 10px;
}

.input-group input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 13px;
}

.input-group input::placeholder {
    color: #5a6a7a;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #7a8a9a;
}

.checkbox-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #4a90d9;
}

.checkbox-row a {
    color: #4a90d9;
}

.btn-signin {
    background: url('../images/psd/bttn.png') center/contain no-repeat;
    width: 100px;
    height: 34px;
    border: none;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
}

.login-divider {
    font-size: 12px;
    color: #5a6a7a;
}

.create-link {
    font-size: 13px;
    color: #4a90d9;
}

.login-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

/* ============================================
   News Section
   ============================================ */
.news-section {
    flex: 1;
    min-width: 0;
}

.news-card {
    background: url('../images/psd/bg-update.png') top center/cover no-repeat;
    border-radius: 0;
    overflow: hidden;
    height: 100%;
}

.news-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: url('../images/psd/Rechteck-728.png') center/cover no-repeat;
    height: 50px;
}

.news-title {
    font-size: 15px;
    font-weight: 600;
}

.news-tabs {
    display: flex;
    gap: 20px;
}

.news-tab {
    background: none;
    border: none;
    font-size: 12px;
    color: #5a6a7a;
    cursor: pointer;
    padding: 8px 15px;
    position: relative;
    transition: all 0.3s;
}

.news-tab:hover,
.news-tab.active {
    color: #fff;
}

.news-tab.active::before {
    content: '';
    position: absolute;
    top: -11px;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/psd/hovr.png') top center/100% auto no-repeat;
    pointer-events: none;
}

.news-body {
    padding: 20px;
}

/* News Slider */
.news-slider {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
}

.news-slide {
    width: 100%;
    height: 200px;
    background: url('../images/psd/Kurven-5.png') center/cover no-repeat;
    position: relative;
}

.news-slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}

.news-slide-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Slider Arrows */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 49px;
    cursor: pointer;
    z-index: 5;
}

.slider-arrow.left {
    left: 10px;
    background: url('../images/psd/Ebene-1947-Kopie.png') center/contain no-repeat;
}

.slider-arrow.right {
    right: 10px;
    background: url('../images/psd/Ebene-1947.png') center/contain no-repeat;
}

/* Slider Dots */
.slider-dots {
    position: absolute;
    bottom: 15px;
    right: 15px;
    display: flex;
    gap: 6px;
}

.slider-dot {
    width: 9px;
    height: 8px;
    background: url('../images/psd/dot.png') center/contain no-repeat;
    cursor: pointer;
}

.slider-dot.active {
    background: url('../images/psd/dot-2.png') center/contain no-repeat;
}

.news-text {
    font-size: 12px;
    line-height: 1.7;
    color: #8a9aaa;
}

/* ============================================
   Bottom Row: Rankings + Trailer
   ============================================ */
.bottom-row {
    display: flex;
    gap: 20px;
    position: relative;
    z-index: 2;
    flex-wrap: nowrap;
}

/* Rankings Card */
.rankings-card {
    width: 324px;
    min-width: 324px;
    flex: 0 0 324px;
    background: url('../images/psd/bg-player.png') top center/cover no-repeat;
    border-radius: 0;
    overflow: hidden;
}

.rankings-header {
    background: url('../images/psd/header.png') top center/100% auto no-repeat;
    height: 76px;
    position: relative;
    padding: 15px;
    overflow: hidden;
}

.rankings-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/psd/Ebene-517.png') -60px -215px/130% auto no-repeat;
    pointer-events: none;
    -webkit-mask-image: url('../images/psd/header.png');
    mask-image: url('../images/psd/header.png');
    -webkit-mask-size: 100% auto;
    mask-size: 100% auto;
    -webkit-mask-position: top center;
    mask-position: top center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

.rankings-title-row {
    position: relative;
    z-index: 1;
}

.rankings-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rankings-title {
    font-size: 14px;
    font-weight: 600;
}

.more-link {
    font-size: 11px;
    color: #4a90d9;
    display: flex;
    align-items: center;
    gap: 5px;
}

.more-link img {
    width: 22px;
    height: 22px;
}

/* Rankings Table */
.rankings-table {
    padding: 10px 15px;
}

.rankings-table-header {
    display: grid;
    grid-template-columns: 30px 1fr 85px 50px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 10px;
    color: #5a6a7a;
    text-transform: uppercase;
}

.rankings-row {
    display: grid;
    grid-template-columns: 30px 1fr 85px 50px;
    padding: 8px 5px;
    font-size: 12px;
    align-items: center;
    position: relative;
}

/* خلفية Guilds (الكارد الأخير) - بدون عكس */
.bottom-row > .rankings-card:last-child .rankings-row:nth-child(even) {
    background: url('../images/psd/Rechtech-1.png') center/100% 100% no-repeat;
}

/* خلفية Players (الكارد الأول) - معكوسة */
.bottom-row > .rankings-card:first-child .rankings-row:nth-child(even)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/psd/Rechtech-1.png') center/100% 100% no-repeat;
    transform: scaleX(-1);
    z-index: 0;
}

.bottom-row > .rankings-card:first-child .rankings-row > * {
    position: relative;
    z-index: 1;
}

.rank-num {
    color: #5a6a7a;
}

.player-cell {
    display: flex;
    align-items: center;
    gap: 5px;
}

.player-cell img {
    width: 15px;
    height: 17px;
}

.player-cell .sep {
    width: 10px;
    height: 24px;
    background: url('../images/psd/separate.png') center/contain no-repeat;
}

.kingdom-jinno { color: #3b82f6; }
.kingdom-shinsoo { color: #ef4444; }
.kingdom-chunjo { color: #eab308; }

/* Kingdom Separators */
.rankings-row span:nth-child(3) {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rankings-row span:nth-child(3)::before,
.rankings-row span:nth-child(3)::after {
    content: '';
    width: 9px;
    height: 18px;
    background: url('../images/psd/separate-1.png') center/contain no-repeat;
    flex-shrink: 0;
}

.btn-load-more {
    background: url('../images/psd/bttn-more-player.png') center/100% 100% no-repeat;
    width: 110px;
    height: 30px;
    border: none;
    cursor: pointer;
    margin: 15px auto;
    display: block;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.trailer-card {
    flex: 1 1 0;
    min-width: 0;
    background: url('../images/psd/Traller.png') center/cover no-repeat;
    border-radius: 0;
    position: relative;
    overflow: hidden;
}

/* Trailer Card */
.trailer-card {
    flex: 1 1 auto;
    min-width: 0;
    background: url('../images/psd/Traller.png') center/cover no-repeat;
    border-radius: 0;
    position: relative;
    overflow: hidden;
}

.trailer-header {
    padding: 15px 20px;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.trailer-header-content {
    flex: 1;
}

.trailer-nav {
    display: flex;
    gap: 2px;
}

.trailer-nav-btn {
    width: 32px;
    height: 32px;
    background: url('../images/psd/bg-right.png') center/cover no-repeat;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.trailer-nav-btn img {
    width: 8px;
    height: auto;
}

.trailer-title {
    font-size: 14px;
    font-weight: 600;
}

.trailer-subtitle {
    font-size: 11px;
    color: #7a8a9a;
}

.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(74, 144, 217, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.play-btn:hover {
    transform: translate(-50%, -50%) scale(1.1);
    background: #4a90d9;
}

.play-btn img {
    width: 11px;
    height: 12px;
    margin-left: 3px;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: url('../images/psd/Ebene-746-Footer.png') center/cover no-repeat;
    height: 79px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 50px;
}

.footer p {
    font-size: 12px;
    color: #5a6a7a;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1200px) {
    .stats-bar {
        width: 100%;
        max-width: 900px;
    }
}

@media (max-width: 992px) {
    .top-row,
    .bottom-row {
        flex-direction: column;
    }
    
    .user-panel,
    .rankings-card {
        width: 100%;
    }
    
    .nav-links {
        display: none;
    }
    
    .stats-bar {
        flex-direction: column;
        height: auto;
        padding: 20px;
    }
    
    .stat-item:not(:last-child)::after {
        display: none;
    }
}
/* User Panel - Logged In */
.logged-in-info {
    text-align: center;
    padding: 10px 0;
}

.logged-in-info .welcome-text {
    font-size: 14px;
    color: #fff;
    margin-bottom: 15px;
}

.logged-in-info .welcome-text strong {
    color: #4a90d9;
}

.user-coins {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.user-coins .coin-item {
    flex: 1;
    background: rgba(74, 144, 217, 0.1);
    border: 1px solid rgba(74, 144, 217, 0.2);
    border-radius: 8px;
    padding: 10px 5px;
    text-align: center;
}

.user-coins .coin-value {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #f4cc6a;
}

.user-coins .coin-label {
    font-size: 11px;
    color: #7a8a9a;
}

.user-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.user-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #9ca3af;
}

.user-stats .stat-item svg {
    color: #4a90d9;
}

.user-stats .stat-item strong {
    color: #fff;
}

.btn-account {
    display: block;
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #4a90d9, #3a7bc8);
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.btn-account:hover {
    background: linear-gradient(135deg, #5a9fe9, #4a8bd8);
    transform: translateY(-2px);
}

.logout-link {
    display: block;
    font-size: 12px;
    color: #ef4444;
    text-decoration: none;
    transition: color 0.3s ease;
}

.logout-link:hover {
    color: #f87171;
}

/* RTL for User Panel */
html[dir="rtl"] .logged-in-info {
    direction: rtl;
}

html[dir="rtl"] .user-stats .stat-item {
    flex-direction: row;
    justify-content: flex-start;
}
