/* Base reset */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Noto Sans Thai', sans-serif;
}


/* Custom cursors */
html, body {
    cursor: url('../../images/cursor.png') 6 2, auto;
}

a, button, [role="button"], .btn,
.nav-list a, .social-btn,
input[type="button"], input[type="submit"], input[type="reset"],
label, select, summary {
    cursor: url('../../images/activec.png') 6 2, pointer;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

.loading-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loading-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
}

.loading-logo {
    max-width: 150px;
    height: auto;
}

.loading-text {
    font-size: 16px;
    color: #333;
    text-align: center;
}

.progress-bar-container {
    width: 300px;
    height: 5px;
    background-color: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #2196F3, #1976D2);
    width: 0%;
    border-radius: 10px;
    transition: width 0.3s ease;
}

.loading-message {
    font-size: 14px;
    color: #666;
    text-align: center;
    margin: 0;
    font-weight: 500;
}

.container {
    width: 1300px;
    margin: 0 auto;
}

/* Custom Container */
.container-custom {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Section 1 - Navbar */
.hero-1 {
    width: 100%;
    min-width: 1300px;
    height: 70px;
    background-image: url("../../images/bg_main_01.png");
    background-repeat: no-repeat;
    background-position: center top;
    position: relative;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    padding: 0 20px;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 35px;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    font-size: 18px;
    line-height: 1.3;
    text-align: center;
    transition: opacity 0.3s;
}

.nav-link:hover {
    color: #fdff00;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-btn {
    display: block;
    line-height: 0;
    transition: opacity 0.3s;
}

.nav-btn:hover {
    opacity: 0.8;
}

.nav-btn img {
    height: auto;
    display: block;
}

.hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: #fff;
    margin: 3px 0;
    transition: 0.3s;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 70px;
    right: 0;
    width: 280px;
    background-color: rgba(20, 20, 40, 0.95);
    z-index: 999;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu-content {
    display: flex;
    flex-direction: column;
    padding: 30px 20px;
    gap: 15px;
}

.mobile-nav-link {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.3s;
}

.mobile-nav-link:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.mobile-nav-link span {
    font-size: 11px;
    opacity: 0.8;
}

.mobile-nav-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav-btn {
    display: flex;
    justify-content: center;
    align-items: center;
}

.mobile-nav-btn img {
    max-width: 100%;
    height: auto;
}

/* Responsive */
@media (max-width: 1300px) {
    .navbar-left,
    .navbar-right {
        display: none;
    }
    
    .hamburger {
        display: flex;
        margin-left: auto;
    }
    
    .mobile-menu {
        display: block;
    }
    
    .hero-5 {
       top: -3px;
    }
}

/* Section 2 */
.hero-2 {
    width: 100%;
    min-width: 1300px;
    height: 820px;
    background-image: url("../../images/bg_main_02.png");
    background-repeat: no-repeat;
    background-position: center top;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.particles-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.logo-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    top:220px;
}

.floating-logo {
    max-width: 40%;
    height: auto;
    animation: floatingAnimation 5s ease-in-out infinite, glowingAnimation 2s ease-in-out infinite;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
}

/* Animation: ขยับขึ้นลงแค่แกน Y */
@keyframes floatingAnimation {
    0% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-40px) scale(1);
    }
    100% {
        transform: translateY(0) scale(1);
    }
}

/* Animation: วิบๆ วับๆ */
@keyframes glowingAnimation {
    0%, 100% {
        opacity: 1;
        filter: drop-shadow(0 10px 20px rgba(255, 255, 255, 0.3));
    }
    25% {
        opacity: 0.9;
        filter: drop-shadow(0 10px 20px rgba(255, 255, 255, 0.5));
    }
    50% {
        opacity: 1;
        filter: drop-shadow(0 15px 30px rgba(255, 255, 255, 0.7));
    }
    75% {
        opacity: 0.9;
        filter: drop-shadow(0 10px 20px rgba(255, 255, 255, 0.4));
    }
}

/* Section 3 */
.hero-3 {
    width: 100%;
    min-width: 1300px;
    height: 680px;
    background-image: url("../../images/bg_main_03.png");
    background-repeat: no-repeat;
    background-position: center top;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Carousel Custom */
.carousel-custom {
    width: 760px;
    height: 400px;
    overflow: hidden;
    border-radius: 8px;
}

.carousel-custom .carousel-inner {
    width: 100%;
    height: 100%;
}

.carousel-custom .carousel-item {
    width: 100%;
    height: 100%;
}

.carousel-custom img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ปรับกรอบ Carousel ขึ้นลง ซ้ายขวา */
.carousel-custom {
    margin-top: -110px;
    margin-left: -25px;
    margin-bottom: 0;
    margin-right: 0;
}

/* Section 4 - News */
.hero-4 {
    width: 100%;
    min-width: 1300px;
    height: 1185px;
    background-image: url("../../images/bg_main_04.png");
    background-repeat: no-repeat;
    background-position: center top;
    position: relative;
}

.hero-4 .container-custom {
    display: flex;
    flex-direction: column;
}

/* News Buttons - ซ้ายสุด */
.news-buttons-wrapper {
    display: flex;
    justify-content: flex-start;
    gap: 15px;
    margin-bottom: 50px;
    flex-wrap: wrap;
    align-self: flex-start;
}

.news-btn {
    padding: 15px 45px;
    background-color: rgba(100, 150, 200, 0.7);
    color: #fff;
    border: 1px solid rgba(200, 200, 200, 0.3);
    border-radius: 50px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s;
}

.news-btn:hover,
.news-btn.active {
    background-color: rgba(50, 120, 180, 1);
    border-color: rgba(255, 255, 255, 0.6);
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: grid;
}

/* News Grid - ตรงกลาง */
.news-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
}

.news-card {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.news-card-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
}

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

.news-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.news-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.news-badge {
    padding: 8px 12px;
    border-radius: 25px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
}

.badge-news { background-color: #2196F3; }
.badge-activities { background-color: #FF9800; }
.badge-update { background-color: #4CAF50; }
.badge-patch { background-color: #9C27B0; }
.badge-promotion { background-color: #F44336; }
.badge-gameguide { background-color: #607D8B; }

.news-card-content h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #333;
    line-height: 1.4;
}

.news-date {
    font-size: 12px;
    color: #666;
    margin: 0 0 15px 0;
}

.news-card-btn {
    background-color: #333;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s;
}

.news-card-btn:hover {
    background-color: #555;
}
/* Section 5 - Guild List */
.hero-5 {
    width: 100%;
    min-width: 1300px;
    height: 660px;
    background-image: url("../../images/bg_main_05.png");
    background-repeat: no-repeat;
    background-position: center top;
    position: relative;
}

#particlesCanvas5 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.hero-5 .container-custom {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 50px;
    padding-top: 140px;
}

.guild-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
    width: 100%;
    max-width: 550px;
}

.guild-item {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 0px 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.guild-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.guild-icon {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    background-color: #f0f0f0;
}

.guild-info {
    flex: 1;
    color: #333;
}

.guild-name {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #1a1a1a;
}

.guild-castle,
.guild-master {
    font-size: 12px;
    color: #555;
    margin-bottom: 2px;
}

/* Section 6 - Footer */
.hero-6 {
    width: 100%;
    min-width: 1300px;
    height: 134px;
    background-image: url("../../images/bg_main_06.png");
    background-repeat: no-repeat;
    background-position: center top;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-6 .container-custom {
    width: 100%;
    max-width: 1300px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
}

.footer-content {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 50px;
}

.footer-logo {
    flex-shrink: 0;
}

.footer-logo-img {
    max-width: 120px;
    height: auto;
}

.footer-credits {
    flex: 1;
    text-align: right;
    color: #000;
}

.footer-credits h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.footer-credits p {
    font-size: 12px;
    margin: 3px 0;
    opacity: 0.95;
}

.footer-link {
    color: #ff1100;
    text-decoration: none;
    transition: color 0.3s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.footer-link:hover {
    color: #ff1e00;
    border-bottom-color: #b3d9ff;
}