/* style.css - JJ DOREMON POKET - PREMIUM DARK BLUE COMPLETE */
/* ============================================================ */

/* ===== CSS RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #0a0e1a !important;
    background: radial-gradient(circle at top, #0a0e1a 0%, #070b14 100%) !important;
    color: #ffffff !important;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== HEADER STYLES ===== */
header {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    padding: 15px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    border-bottom: 1px solid rgba(52, 152, 219, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-icon {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 0 20px rgba(52, 152, 219, 0.5);
}

.logo h1 {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(45deg, #fff, #3498db);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin: 0;
    letter-spacing: 0.5px;
}

/* Auth Icons */
.auth-icons {
    display: flex;
    gap: 12px;
    align-items: center;
}

.auth-icon {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 16px;
}

.auth-icon:hover {
    background: rgba(52, 152, 219, 0.3);
    color: #5dade2;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

/* ===== NAVIGATION - SINGLE LINE FIX ===== */
nav {
    display: block;
    width: auto;
    min-width: 100%;
}

nav ul {
    display: flex !important;
    list-style: none !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    gap: 8px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    min-width: max-content !important;
}

nav ul::-webkit-scrollbar {
    display: none !important;
    height: 0 !important;
}

nav ul li {
    display: inline-block !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
}

nav ul li a {
    color: #b0bec5 !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    padding: 10px 16px !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    font-size: 15px !important;
    border: 1px solid transparent !important;
    white-space: nowrap !important;
    display: inline-block !important;
    line-height: 1.2 !important;
    background: rgba(255, 255, 255, 0.05) !important;
    word-break: keep-all !important;
    overflow-wrap: normal !important;
    hyphens: none !important;
    min-width: max-content !important;
}

nav ul li a:hover {
    color: #ffffff !important;
    background: rgba(52, 152, 219, 0.15) !important;
    border-color: rgba(52, 152, 219, 0.3) !important;
    transform: translateY(-2px) !important;
}

/* ===== MAIN CONTENT ===== */
main {
    flex: 1;
    padding: 30px 0 50px;
    background: transparent !important;
}

/* Button Styles */
.btn-primary {
    display: inline-block;
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white !important;
    padding: 14px 32px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    font-size: 16px;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(52, 152, 219, 0.5);
    background: linear-gradient(45deg, #2980b9, #3498db);
}

.btn-secondary {
    display: inline-block;
    background: linear-gradient(45deg, #2ecc71, #27ae60);
    color: white !important;
    padding: 14px 32px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    font-size: 16px;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(46, 204, 113, 0.5);
    background: linear-gradient(45deg, #27ae60, #2ecc71);
}

/* ===== HERO SECTION ===== */
.hero {
    padding: 70px 0;
    text-align: center;
    background: linear-gradient(135deg, #1a1a2e, #0f3460) !important;
    border-radius: 16px;
    margin: 30px 0 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(52, 152, 219, 0.2);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,0 L100,0 L100,100 Z" fill="rgba(52,152,219,0.05)"/></svg>');
    background-size: cover;
    pointer-events: none;
}

.hero h2 {
    font-size: 44px;
    margin-bottom: 20px;
    color: #ffffff;
    font-weight: 800;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 20px;
    max-width: 700px;
    margin: 0 auto 35px;
    color: #b0bec5;
    line-height: 1.6;
}

/* ===== USER WELCOME ===== */
.user-welcome {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.9), rgba(22, 33, 62, 0.9));
    padding: 20px 30px;
    border-radius: 12px;
    margin: 20px 0 30px;
    border: 1px solid rgba(52, 152, 219, 0.4);
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.user-welcome p {
    color: #3498db;
    font-weight: 700;
    margin: 0;
    font-size: 18px;
    text-align: center;
}

.user-welcome a {
    color: #2ecc71 !important;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 5px 10px;
    border-radius: 6px;
    background: rgba(46, 204, 113, 0.1);
}

.user-welcome a:hover {
    background: rgba(46, 204, 113, 0.2);
    text-decoration: none !important;
}

/* ===== STATS SECTION ===== */
.stats-section {
    padding: 60px 0;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.9), rgba(15, 52, 96, 0.9)) !important;
    border-radius: 16px;
    margin: 50px 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    text-align: center;
}

.stat-item {
    padding: 25px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    border-color: rgba(52, 152, 219, 0.3);
    background: rgba(255, 255, 255, 0.05);
}

.stat-number {
    font-size: 48px;
    font-weight: 800;
    color: #3498db;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(52, 152, 219, 0.3);
}

.stat-label {
    color: #b0bec5;
    font-size: 18px;
    font-weight: 600;
}

/* ===== CATEGORIES SECTION ===== */
.categories {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 40px;
    margin-bottom: 15px;
    color: #ffffff;
    font-weight: 800;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, #3498db, #2ecc71);
    border-radius: 2px;
}

.section-title p {
    color: #b0bec5;
    font-size: 18px;
    max-width: 600px;
    margin: 25px auto 0;
    line-height: 1.6;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.category-card {
    background: linear-gradient(145deg, #1e272e, #0f3460);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-decoration: none;
    position: relative;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(52, 152, 219, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.category-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    border-color: #3498db;
}

.category-card:hover::before {
    opacity: 1;
}

.category-img {
    height: 220px;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.category-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.category-card:hover .category-img img {
    transform: scale(1.1);
}

.category-content {
    padding: 28px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.category-content h3 {
    font-size: 26px;
    margin-bottom: 15px;
    color: #ffffff;
    font-weight: 700;
}

.category-content p {
    color: #b0bec5;
    margin-bottom: 25px;
    flex-grow: 1;
    line-height: 1.6;
    font-size: 15px;
}

.category-link {
    display: inline-flex;
    align-items: center;
    color: #3498db !important;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
    font-size: 16px;
    margin-top: auto;
}

.category-link:hover {
    color: #5dade2 !important;
    border-bottom-color: #3498db;
    transform: translateX(5px);
}

.category-link i {
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.category-link:hover i {
    transform: translateX(8px);
}

/* ===== CTA SECTION ===== */
.cta-section {
    text-align: center;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.9), rgba(15, 52, 96, 0.7));
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: -1;
}

.cta-buttons {
    display: flex;
    gap: 25px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 40px;
}

.cta-buttons .btn-primary,
.cta-buttons .btn-secondary {
    min-width: 200px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

/* ===== FOOTER ===== */
footer {
    background: linear-gradient(135deg, #1a1a2e, #16213e) !important;
    padding: 60px 0 25px;
    margin-top: 60px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, #3498db, transparent);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h3 {
    color: #3498db;
    margin-bottom: 25px;
    font-size: 20px;
    font-weight: 700;
    position: relative;
    padding-bottom: 10px;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(to right, #3498db, #2ecc71);
    border-radius: 2px;
}

.footer-column p {
    color: #b0bec5;
    line-height: 1.7;
    font-size: 15px;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 15px;
}

.footer-column ul li a {
    color: #b0bec5;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-column ul li a:hover {
    color: #3498db;
    transform: translateX(5px);
}

.footer-column ul li i {
    color: #3498db;
    width: 20px;
    font-size: 16px;
}

.copyright {
    text-align: center;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #b0bec5;
    font-size: 14px;
    font-weight: 500;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablet */
@media (max-width: 1024px) {
    .container {
        padding: 0 25px;
    }
    
    .hero h2 {
        font-size: 36px;
    }
    
    .hero p {
        font-size: 18px;
    }
    
    .section-title h2 {
        font-size: 36px;
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 768px) {
    /* Header Mobile */
    .header-content {
        flex-direction: column;
        padding: 15px;
        gap: 15px;
    }
    
    .header-left {
        width: 100%;
        justify-content: space-between;
    }
    
    .logo h1 {
        font-size: 22px;
    }
    
    /* Navigation Mobile - SINGLE LINE SCROLL */
    nav {
        width: 100%;
        margin: 10px 0 0 0;
    }
    
    nav ul {
        display: flex !important;
        flex-wrap: nowrap !important;
        white-space: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        gap: 6px !important;
        padding-bottom: 10px !important;
        margin-bottom: -10px !important;
        justify-content: flex-start !important;
    }
    
    nav ul li a {
        padding: 10px 14px !important;
        font-size: 14px !important;
        min-width: max-content !important;
        word-break: keep-all !important;
        overflow-wrap: normal !important;
    }
    
    /* Hero Mobile */
    .hero {
        padding: 50px 20px;
        margin: 15px 0 30px;
        border-radius: 12px;
    }
    
    .hero h2 {
        font-size: 30px;
        margin-bottom: 15px;
    }
    
    .hero p {
        font-size: 16px;
        margin-bottom: 25px;
        padding: 0 10px;
    }
    
    /* Sections Mobile */
    .categories,
    .stats-section,
    .cta-section {
        padding: 40px 0;
    }
    
    .section-title {
        margin-bottom: 40px;
    }
    
    .section-title h2 {
        font-size: 30px;
    }
    
    .section-title p {
        font-size: 16px;
        padding: 0 15px;
    }
    
    /* Grids Mobile */
    .category-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .stat-number {
        font-size: 36px;
    }
    
    .stat-label {
        font-size: 16px;
    }
    
    /* Buttons Mobile */
    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        max-width: 300px;
        padding: 16px 24px;
    }
    
    /* Footer Mobile */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 35px;
    }
    
    .footer-column h3 {
        font-size: 18px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .logo h1 {
        font-size: 20px;
    }
    
    .logo-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .hero h2 {
        font-size: 28px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .category-content {
        padding: 20px;
    }
    
    .category-content h3 {
        font-size: 22px;
    }
    
    .auth-icons {
        gap: 8px;
    }
    
    .auth-icon {
        width: 38px;
        height: 38px;
        font-size: 15px;
    }
    
    /* Navigation Extra Small */
    nav ul {
        gap: 4px !important;
    }
    
    nav ul li a {
        padding: 8px 12px !important;
        font-size: 13px !important;
        word-break: keep-all !important;
        overflow-wrap: normal !important;
        hyphens: none !important;
        white-space: nowrap !important;
    }
}

/* ===== BROWSER SPECIFIC FIXES ===== */

/* Microsoft Edge */
@supports (-ms-ime-align: auto) {
    body {
        background: #0a0e1a;
    }
    
    .category-grid {
        display: flex;
        flex-wrap: wrap;
    }
    
    .category-card {
        flex: 1 1 280px;
        margin: 15px;
    }
    
    /* Edge navigation fix */
    nav ul {
        display: -ms-flexbox !important;
        -ms-flex-wrap: nowrap !important;
    }
}

/* Safari */
@media not all and (min-resolution:.001dpcm) { 
    @supports (-webkit-appearance:none) {
        body {
            -webkit-font-smoothing: antialiased;
        }
        
        .category-card {
            -webkit-backface-visibility: hidden;
            -webkit-transform: translateZ(0);
        }
        
        /* Safari navigation fix */
        nav ul li a {
            -webkit-hyphens: none !important;
        }
    }
}

/* Firefox */
@-moz-document url-prefix() {
    .category-card {
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    }
    
    /* Firefox navigation fix */
    nav ul {
        scrollbar-width: none !important;
    }
}

/* ===== UTILITY CLASSES ===== */
.text-center {
    text-align: center !important;
}

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

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

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

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

.d-none {
    display: none !important;
}

.d-block {
    display: block !important;
}

.w-100 {
    width: 100% !important;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* ===== FIX WHITE SPACES ===== */
*[style*="background: white"],
*[style*="background-color: white"],
*[style*="background: #fff"],
*[style*="background-color: #fff"],
*[style*="background: rgb(255,255,255)"],
*[style*="background-color: rgb(255,255,255)"] {
    background: #0a0e1a !important;
    background-color: #0a0e1a !important;
}

/* Ensure all sections have dark background */
main, 
section, 
div[class*="section"], 
div[class*="container"],
div[class*="content"] {
    background-color: transparent !important;
}

/* Remove any default white backgrounds */
body > *:not(script):not(style) {
    background-color: transparent !important;
}

/* ===== FORCE DARK SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #0a0e1a;
}

::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}

/* ===== NAVIGATION TEXT NO WRAP - FINAL FIX ===== */
nav ul li a {
    white-space: nowrap !important;
    word-break: keep-all !important;
    overflow-wrap: normal !important;
    hyphens: none !important;
    -webkit-hyphens: none !important;
    -moz-hyphens: none !important;
    -ms-hyphens: none !important;
    min-width: max-content !important;
    display: inline-block !important;
    text-align: center !important;
}

/* Specific fixes for long text links */
a[href*="mobile-legends"],
a[href*="grow-a-garden"],
a[href*="gadget-buy"],
a[href*="resale-items"] {
    white-space: nowrap !important;
    word-break: keep-all !important;
    overflow-wrap: normal !important;
    display: inline-block !important;
    min-width: max-content !important;
}

/* Force no text wrapping in navigation container */
nav, nav ul, nav ul li {
    white-space: nowrap !important;
}

/* Media query for very small screens - shorten text */
@media (max-width: 400px) {
    nav ul li a {
        font-size: 12px !important;
        padding: 6px 8px !important;
    }
    
    /* Shorten specific long texts */
    a[href*="mobile-legends"]::after {
        content: "ML" !important;
    }
    
    a[href*="mobile-legends"] .full-text {
        display: none !important;
    }
    
    a[href*="grow-a-garden"]::after {
        content: "Garden" !important;
    }
    
    a[href*="grow-a-garden"] .full-text {
        display: none !important;
    }
    
    a[href*="gadget-buy"]::after {
        content: "Gadgets" !important;
    }
    
    a[href*="gadget-buy"] .full-text {
        display: none !important;
    }
    
    a[href*="resale-items"]::after {
        content: "Resale" !important;
    }
    
    a[href*="resale-items"] .full-text {
        display: none !important;
    }
}

/* Desktop - ensure full text is shown */
@media (min-width: 769px) {
    nav ul {
        justify-content: flex-start !important;
        flex-wrap: nowrap !important;
    }
    
    nav ul li a {
        font-size: 15px !important;
        padding: 10px 16px !important;
    }
}