/*
Theme Name: PlayX Games
Theme URI: https://playxgames.com
Author: PlayX Games
Author URI: https://playxgames.com
Description: Dark modern theme for PlayX Games — Game Publisher for Vietnam & Southeast Asia. Built with Tailwind CSS.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: playx-games
Tags: dark, gaming, one-page, blog, custom-menu, translation-ready
*/

/* ===== BASE ===== */
::selection { background: rgba(52, 211, 153, 0.3); color: white; }

body {
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
    background: hsl(220, 20%, 8%);
    color: white;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== GRADIENT LINE ===== */
.gradient-line {
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(52, 211, 153, 0.4), rgba(56, 189, 248, 0.4), transparent);
}

/* ===== GRADIENT TEXT ===== */
.gradient-text {
    background: linear-gradient(135deg, #34D399, #38BDF8, #22D3EE);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== GLOW ===== */
.glow-green { box-shadow: 0 0 60px -12px rgba(52, 211, 153, 0.25); }
.glow-blue { box-shadow: 0 0 60px -12px rgba(56, 189, 248, 0.25); }

/* ===== SCROLL REVEAL ===== */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ===== NOISE OVERLAY ===== */
.noise::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9999;
}

/* ===== SERVICE CARD ===== */
.service-card {
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, transparent, transparent, transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    transition: background 0.5s ease;
}
.service-card:hover::before {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.3), rgba(56, 189, 248, 0.2), transparent);
}
.service-card:hover {
    transform: translateY(-4px);
    background: hsl(220, 18%, 12%);
}

/* ===== TABS ===== */
.tab-btn { position: relative; transition: all 0.3s ease; }
.tab-btn::after {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 0; height: 60%;
    border-radius: 999px;
    background: linear-gradient(to bottom, #34D399, #38BDF8);
    transition: width 0.3s ease;
}
.tab-btn.active::after { width: 3px; }
.tab-btn.active { color: white; padding-left: 1.25rem; }

.tab-panel { display: none; }
.tab-panel.active {
    display: block;
    animation: panelIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes panelIn {
    from { opacity: 0; transform: translateX(16px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ===== GRID PATTERN ===== */
.grid-pattern {
    background-image:
        linear-gradient(rgba(52, 211, 153, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(52, 211, 153, 0.03) 1px, transparent 1px);
    background-size: 64px 64px;
}

/* ===== RADIAL GLOW ===== */
.radial-glow {
    background: radial-gradient(ellipse 50% 60% at 50% 0%, rgba(52, 211, 153, 0.08), transparent);
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: hsl(220, 20%, 8%); }
::-webkit-scrollbar-thumb { background: hsl(220, 15%, 25%); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: hsl(220, 15%, 35%); }

/* ===== LANGUAGE DROPDOWN ===== */
.lang-dropdown {
    opacity: 0; visibility: hidden;
    transform: translateY(6px) scale(0.96);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}
.lang-trigger.open .lang-dropdown {
    opacity: 1; visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}
.lang-option { position: relative; transition: all 0.15s ease; }
.lang-option:hover { background: rgba(255,255,255,0.06); }
.lang-option.active { color: #34D399; }
.lang-option.active::after {
    content: '';
    position: absolute;
    right: 12px; top: 50%;
    transform: translateY(-50%);
    width: 5px; height: 5px;
    border-radius: 50%;
    background: #34D399;
}

/* ===== NAV ===== */
.nav-link { position: relative; }
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 50%;
    transform: translateX(-50%);
    width: 0; height: 2px;
    border-radius: 1px;
    background: linear-gradient(to right, #34D399, #38BDF8);
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-link:hover::after { width: 16px; }

/* ===== HEADER GLASS ===== */
.header-scrolled {
    background: rgba(13, 15, 20, 0.75) !important;
    backdrop-filter: blur(24px) saturate(1.4) !important;
    -webkit-backdrop-filter: blur(24px) saturate(1.4) !important;
}
.header-scrolled::after {
    content: '';
    position: absolute;
    bottom: 0; left: 5%; right: 5%;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(52, 211, 153, 0.12), rgba(56, 189, 248, 0.12), transparent);
}

/* ===== LANG BTN ===== */
.lang-btn { transition: all 0.2s ease; }
.lang-btn.active { color: #34D399; }

/* ===== FLOATING KEYWORDS ===== */
.keywords-field { position: relative; min-height: 420px; }
.kw-tag {
    position: absolute; white-space: nowrap;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    animation: kwFloat 6s ease-in-out infinite;
}
.kw-tag:hover { color: white !important; transform: scale(1.08); }
.kw-tag.kw-highlight {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.15), rgba(56, 189, 248, 0.15));
    border: 1px solid rgba(52, 211, 153, 0.25);
    padding: 0.5rem 1.25rem;
    border-radius: 0.75rem;
    backdrop-filter: blur(8px);
}
.kw-tag.kw-highlight:hover {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.25), rgba(56, 189, 248, 0.25));
    border-color: rgba(52, 211, 153, 0.5);
    box-shadow: 0 0 30px -5px rgba(52, 211, 153, 0.2);
}
@keyframes kwFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
.kw-d1 { animation-delay: 0s; }
.kw-d2 { animation-delay: -0.8s; }
.kw-d3 { animation-delay: -1.6s; }
.kw-d4 { animation-delay: -2.4s; }
.kw-d5 { animation-delay: -3.2s; }
.kw-d6 { animation-delay: -4.0s; }
.kw-d7 { animation-delay: -4.8s; }
.kw-d8 { animation-delay: -5.6s; }

.kw-center-text {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    text-align: center; z-index: 10;
}

/* ===== ORB ===== */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.6;
    pointer-events: none;
}

/* ===== FORM ===== */
.form-field {
    border: 1px solid hsl(220, 15%, 18%);
    transition: all 0.3s ease;
    background: hsl(220, 20%, 8%);
}
.form-field:focus {
    border-color: #34D399;
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.15), 0 0 20px -5px rgba(52, 211, 153, 0.2);
    outline: none;
}

/* ===== PARTNER LOGOS ===== */
.partner-logo {
    filter: brightness(0) invert(1);
    transition: all 0.3s ease;
}
.partner-item:hover .partner-logo { filter: none; }

/* ===== MARQUEE ===== */
@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
.marquee-track { animation: marquee 30s linear infinite; }
.marquee-track:hover { animation-play-state: paused; }

/* ===== STATS ===== */
.stat-number {
    background: linear-gradient(to bottom, white, rgba(255,255,255,0.6));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== MOBILE MENU ===== */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.mobile-menu.open { transform: translateX(0); }

/* ===== HERO CURSOR ===== */
.cursor-blink::after {
    content: '|';
    animation: blink 1s step-end infinite;
    color: #34D399;
}
@keyframes blink { 50% { opacity: 0; } }

/* ============================================================
   BLOG-SPECIFIC STYLES
   ============================================================ */

/* Blog post card */
.blog-card {
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid hsl(220, 15%, 18%);
}
.blog-card:hover {
    transform: translateY(-4px);
    border-color: rgba(52, 211, 153, 0.3);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.4);
}
.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}
.blog-card-image img {
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Blog prose content */
.blog-content {
    color: #a1a1aa;
    line-height: 1.8;
}
.blog-content h2 {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}
.blog-content h3 {
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}
.blog-content p {
    margin-bottom: 1.25rem;
}
.blog-content a {
    color: #34D399;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.blog-content a:hover {
    color: #6ee7b7;
}
.blog-content img {
    border-radius: 1rem;
    margin: 2rem 0;
    max-width: 100%;
    height: auto;
}
.blog-content blockquote {
    border-left: 3px solid #34D399;
    padding-left: 1.5rem;
    margin: 2rem 0;
    color: #d4d4d8;
    font-style: italic;
}
.blog-content ul, .blog-content ol {
    margin: 1rem 0 1.5rem 1.5rem;
}
.blog-content li {
    margin-bottom: 0.5rem;
}
.blog-content ul li::marker { color: #34D399; }
.blog-content code {
    background: hsl(220, 18%, 14%);
    padding: 0.15rem 0.4rem;
    border-radius: 0.3rem;
    font-size: 0.875em;
    color: #38BDF8;
}
.blog-content pre {
    background: hsl(220, 18%, 11%);
    border: 1px solid hsl(220, 15%, 18%);
    border-radius: 0.75rem;
    padding: 1.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}
.blog-content pre code {
    background: transparent;
    padding: 0;
    color: #d4d4d8;
}

/* Pagination */
.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #a1a1aa;
    border: 1px solid hsl(220, 15%, 18%);
    transition: all 0.2s ease;
}
.page-numbers:hover, .page-numbers.current {
    border-color: #34D399;
    color: #34D399;
    background: rgba(52, 211, 153, 0.1);
}

/* WP default classes */
.alignleft { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { display: block; margin: 1.5rem auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.875rem; color: #71717a; margin-top: 0.5rem; }
