/* --- CSS Variables & Reset --- */
:root {
    --primary-color: #ff5722; /* Cam lửa */
    --primary-hover: #e64a19;
    --secondary-color: #ffc107; /* Vàng rực */
    --bg-color: #050505; /* Đen tuyền */
    --card-bg: rgba(20, 20, 20, 0.9);
    --text-color: #ffffff;
    --text-muted: #aaaaaa;
    --border-color: #ff572255;
    --neon-glow: 0 0 15px rgba(255, 87, 34, 0.6), 0 0 30px rgba(255, 87, 34, 0.4);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Oswald', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

.teko-font {
    font-family: 'Chakra Petch', sans-serif;
    letter-spacing: 1px;
}

/* --- Animated Background Particles (Fire effect) --- */
.fire-particles {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
    background: radial-gradient(circle at center, #1a0a00 0%, #050505 100%);
}
.fire-particles span {
    position: absolute;
    bottom: -50px;
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color), 0 0 20px var(--secondary-color);
    border-radius: 50%;
    animation: rise 5s infinite ease-in;
    opacity: 0;
}
.fire-particles span:nth-child(1) { left: 10%; animation-duration: 4s; animation-delay: 0s; }
.fire-particles span:nth-child(2) { left: 25%; animation-duration: 6s; animation-delay: 2s; width: 12px; height: 12px; }
.fire-particles span:nth-child(3) { left: 40%; animation-duration: 3s; animation-delay: 1s; }
.fire-particles span:nth-child(4) { left: 55%; animation-duration: 5s; animation-delay: 3s; }
.fire-particles span:nth-child(5) { left: 70%; animation-duration: 7s; animation-delay: 0s; width: 15px; height: 15px;}
.fire-particles span:nth-child(6) { left: 85%; animation-duration: 4.5s; animation-delay: 1.5s; }
.fire-particles span:nth-child(7) { left: 15%; animation-duration: 5.5s; animation-delay: 4s; }
.fire-particles span:nth-child(8) { left: 90%; animation-duration: 3.5s; animation-delay: 2.5s; }

@keyframes rise {
    0% { transform: translateY(0) scale(1); opacity: 0.8; }
    50% { opacity: 1; }
    100% { transform: translateY(-1000px) scale(0.2); opacity: 0; }
}

/* --- Animations --- */
@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(3deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}
.animate-float {
    animation: float 4s ease-in-out infinite;
}

@keyframes pulse-glow {
    0% { box-shadow: 0 0 5px var(--primary-color); }
    50% { box-shadow: 0 0 25px var(--primary-color), 0 0 15px var(--secondary-color); }
    100% { box-shadow: 0 0 5px var(--primary-color); }
}
.pulse-glow {
    animation: pulse-glow 2s infinite;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-3px); }
    20%, 40%, 60%, 80% { transform: translateX(3px); }
}
.animate-shake:hover {
    animation: shake 0.5s;
}

@keyframes flame {
    0%, 100% { transform: scale(1); color: var(--primary-color); filter: drop-shadow(0 0 10px var(--primary-color));}
    50% { transform: scale(1.1); color: var(--secondary-color); filter: drop-shadow(0 0 20px var(--secondary-color));}
}
.flame-anim {
    animation: flame 1.5s infinite alternate;
}

/* Glitch Effect */
.glitch-text {
    position: relative;
    display: inline-block;
}
.glitch-text::before, .glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.8;
}
.glitch-text::before {
    left: 2px;
    text-shadow: -2px 0 red;
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim 3s infinite linear alternate-reverse;
}
.glitch-text::after {
    left: -2px;
    text-shadow: -2px 0 blue;
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2.5s infinite linear alternate-reverse;
}
@keyframes glitch-anim {
    0% { clip: rect(10px, 9999px, 44px, 0); transform: skew(0.2deg); }
    20% { clip: rect(65px, 9999px, 99px, 0); transform: skew(0.5deg); }
    40% { clip: rect(20px, 9999px, 12px, 0); transform: skew(0.1deg); }
    60% { clip: rect(80px, 9999px, 85px, 0); transform: skew(0.8deg); }
    80% { clip: rect(40px, 9999px, 33px, 0); transform: skew(0.2deg); }
    100% { clip: rect(90px, 9999px, 10px, 0); transform: skew(0.5deg); }
}

/* --- Typography & Utils --- */
.highlight {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: var(--neon-glow);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(45deg, var(--primary-color), #d84315);
    color: white;
    padding: 0.75rem 2rem;
    font-family: 'Chakra Petch', sans-serif;
    font-size: 1.5rem;
    text-decoration: none;
    text-transform: uppercase;
    clip-path: polygon(10% 0, 100% 0, 90% 100%, 0% 100%);
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-weight: 600;
}
.btn-primary:hover {
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
    color: #000;
    box-shadow: var(--neon-glow);
    transform: scale(1.05);
}

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    background: rgba(5, 5, 5, 0.95);
    border-bottom: 2px solid var(--primary-color);
    box-shadow: 0 2px 20px rgba(255, 87, 34, 0.2);
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
}
.logo span {
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    text-transform: uppercase;
    position: relative;
    padding: 5px 0;
    transition: var(--transition);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: var(--transition);
    box-shadow: 0 0 8px var(--primary-color);
}
.nav-links a:hover {
    color: var(--primary-color);
}
.nav-links a:hover::after {
    width: 100%;
}

.cart-btn {
    position: relative;
    cursor: pointer;
    font-size: 1.2rem;
    background: var(--card-bg);
    padding: 0.5rem 1rem;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    clip-path: polygon(15% 0, 100% 0, 85% 100%, 0 100%);
    transition: var(--transition);
}

.cart-btn:hover {
    background: var(--primary-color);
    color: #fff;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--secondary-color);
    color: #000;
    font-size: 0.8rem;
    font-weight: bold;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 5px var(--secondary-color);
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 8rem 2rem 2rem;
    gap: 4rem;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 50vw; height: 50vw;
    background: radial-gradient(circle, rgba(255,87,34,0.1) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    z-index: -1;
}

.hero-content {
    flex: 1;
}

.hero-content h1 {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 6rem;
    line-height: 0.9;
    margin-bottom: 0;
    text-transform: uppercase;
}
.hero-content .sub-hero {
    font-size: 3.5rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.hero-content p {
    font-size: 1.2rem;
    color: #ddd;
    margin-bottom: 2.5rem;
    max-width: 500px;
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
    background: linear-gradient(90deg, rgba(255,87,34,0.2) 0%, transparent 100%);
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.hex-card {
    background: var(--card-bg);
    border: 2px solid var(--primary-color);
    padding: 4rem;
    text-align: center;
    box-shadow: inset 0 0 20px rgba(255,87,34,0.3), var(--neon-glow);
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    transition: var(--transition);
}
.hex-card:hover {
    transform: scale(1.05) rotate(5deg);
    background: rgba(255, 87, 34, 0.1);
}

.icon-large {
    font-size: 5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}
.hex-card h3 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-top: 1rem;
}

/* --- Products Section --- */
.products-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 6rem 2rem;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2.5rem;
}

.product-card {
    background: #111;
    border: 1px solid #333;
    padding: 0;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    clip-path: polygon(0 0, 100% 0, 100% 90%, 90% 100%, 0 100%);
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,87,34,0.3), transparent);
    transform: skewX(-20deg);
    transition: 0.5s;
}

.product-card:hover::before {
    left: 150%;
}

.product-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 20px rgba(0,0,0,0.8), var(--neon-glow);
}

.product-img-wrapper {
    height: 180px;
    background: #1a1a1a;
    border-bottom: 2px solid #333;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}
.product-card:hover .product-img-wrapper {
    border-color: var(--primary-color);
}

.product-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
    opacity: 0.8;
}

.product-card:hover .product-img-wrapper img {
    transform: scale(1.15) rotate(2deg);
    opacity: 1;
}

.rank-badge {
    position: absolute;
    top: 10px; right: 10px;
    background: var(--primary-color);
    color: white;
    padding: 2px 10px;
    font-family: 'Chakra Petch', sans-serif;
    font-size: 1.2rem;
    transform: skewX(-10deg);
}

.product-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #fff;
    text-transform: uppercase;
}
.product-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    flex: 1;
}

.product-price {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    text-shadow: 0 0 5px rgba(255,193,7,0.3);
}

.btn-add-cart {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.75rem;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    clip-path: polygon(5% 0, 100% 0, 95% 100%, 0 100%);
}

.btn-add-cart:hover {
    background: var(--primary-color);
    color: #000;
    box-shadow: 0 0 10px var(--primary-color);
}

/* --- Footer --- */
footer {
    border-top: 2px solid #333;
    padding: 4rem 2rem 2rem;
    background: #0a0a0a;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    margin-bottom: 3rem;
}

.footer-brand h3 {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}
.footer-brand span {
    color: var(--primary-color);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}
.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    color: #555;
    font-size: 0.9rem;
    border-top: 1px solid #222;
    padding-top: 1.5rem;
}

/* --- Topup Section --- */
.topup-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 6rem 2rem;
    position: relative;
}

.topup-container {
    padding: 3rem;
    text-align: left;
    background: #0f0f0f;
    border: 1px solid #333;
    border-top: 3px solid var(--primary-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    clip-path: polygon(0 0, 100% 0, 100% 95%, 98% 100%, 0 100%);
    position: relative;
}

.topup-container::before {
    content: '';
    position: absolute;
    top: 0; right: 0; width: 100px; height: 100px;
    background: radial-gradient(circle, rgba(255,87,34,0.1) 0%, transparent 70%);
}

/* --- Diamond Packages Grid --- */
.diamond-packages {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.diamond-pack {
    background: #0a0a0a;
    border: 2px solid #333;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    clip-path: polygon(10% 0, 100% 0, 90% 100%, 0 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.diamond-pack:hover {
    background: #151515;
    border-color: var(--secondary-color);
    transform: scale(1.05);
}

.diamond-pack.selected {
    background: rgba(255, 87, 34, 0.1);
    border-color: var(--primary-color);
    box-shadow: inset 0 0 15px rgba(255, 87, 34, 0.3), var(--neon-glow);
}

.diamond-icon {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 0 5px var(--secondary-color));
}

.diamond-pack.selected .diamond-icon {
    color: #fff;
    filter: drop-shadow(0 0 10px #fff);
}

.pack-amount {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: #fff;
    line-height: 1;
}

.pack-price {
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: bold;
}

.topup-container form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 1.5rem;
    color: var(--secondary-color);
    letter-spacing: 1px;
}

.form-group input, .form-group select {
    background: #0f0f0f;
    border: 1px solid #333;
    color: #fff;
    padding: 1rem;
    font-family: 'Oswald', sans-serif;
    font-size: 1.1rem;
    transition: var(--transition);
    outline: none;
    clip-path: polygon(2% 0, 100% 0, 98% 100%, 0 100%);
}

.form-group input:focus, .form-group select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(255, 87, 34, 0.3);
    background: #151515;
}

.form-group select option {
    background: #000;
    color: #fff;
}

.btn-submit-topup {
    margin-top: 1.5rem;
    justify-content: center;
    font-size: 2.2rem;
    width: 100%;
}

/* --- Cart Sidebar --- */
.cart-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}
.cart-overlay.active {
    opacity: 1; visibility: visible;
}

.cart-sidebar {
    position: fixed;
    top: 0; right: -450px;
    width: 450px; max-width: 100vw; height: 100vh;
    background: #0f0f0f;
    border-left: 3px solid var(--primary-color);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: right 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: -10px 0 30px rgba(255, 87, 34, 0.2);
}
.cart-sidebar.active { right: 0; }

.cart-header {
    padding: 1.5rem;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #151515;
}
.cart-header h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin: 0;
}
.close-btn {
    background: none; border: none;
    color: var(--text-color);
    font-size: 1.5rem; cursor: pointer;
    transition: var(--transition);
}
.close-btn:hover {
    color: var(--primary-color);
    transform: rotate(90deg);
}

.cart-items {
    flex: 1; padding: 1.5rem;
    overflow-y: auto; display: flex; flex-direction: column; gap: 1rem;
}
.empty-cart-message {
    text-align: center; color: #555; margin-top: 2rem; font-size: 1.2rem;
}

.cart-item {
    display: flex; gap: 1rem;
    background: #1a1a1a; padding: 1rem;
    border-left: 3px solid var(--secondary-color);
    transition: var(--transition);
}
.cart-item:hover {
    background: #222;
}

.cart-item-img {
    width: 60px; height: 60px;
    background: #000;
    display: flex; justify-content: center; align-items: center;
    overflow: hidden;
}

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

.cart-item-details { flex: 1; }
.cart-item-title {
    font-weight: 600; font-size: 1rem; margin-bottom: 0.25rem; color: #fff;
}
.cart-item-price {
    font-family: 'Teko', sans-serif;
    color: var(--primary-color); font-size: 1.5rem;
}

.remove-item {
    background: none; border: none; color: #555; cursor: pointer; transition: var(--transition);
}
.remove-item:hover { color: #f44336; transform: scale(1.2); }

.cart-footer {
    padding: 1.5rem; border-top: 1px solid #333; background: #151515;
}

.cart-total {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 2rem; margin-bottom: 1.5rem;
}

.btn-checkout {
    width: 100%;
    background: var(--primary-color);
    color: #000;
    border: none;
    padding: 1rem;
    font-family: 'Teko', sans-serif;
    font-weight: 600; font-size: 1.8rem;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
}
.btn-checkout:hover {
    background: var(--secondary-color);
    box-shadow: 0 0 20px var(--secondary-color);
    letter-spacing: 2px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .hero {
        flex-direction: column; text-align: center; padding-top: 8rem; gap: 2rem;
    }
    .hero-content h1 { font-size: 4rem; }
    .hero-content .sub-hero { font-size: 2.5rem; }
    .hero-content p { margin: 0 auto 2rem; border-left: none; border-top: 4px solid var(--primary-color); padding: 1rem 0 0;}
    .nav-links { display: none; }
}
