/**
 * ============================================================
 * CSS TRANG PUBLIC - DARK MODE PREMIUM
 * ============================================================
 * Theme: Dark mode với gradient tím-xanh
 * Font: Inter (Google Fonts)
 * Responsive: Mobile-first (320px → 1280px+)
 * ============================================================
 */

/* ====== CSS RESET & VARIABLES ====== */
:root {
    --primary: #7C3AED;
    --primary-light: #8B5CF6;
    --primary-dark: #6D28D9;
    --secondary: #2563EB;
    --secondary-light: #3B82F6;
    --accent: #06B6D4;
    --accent-green: #10B981;

    --bg-primary: #0B0F1A;
    --bg-secondary: #111827;
    --bg-card: #1F2937;
    --bg-card-hover: #263244;
    --bg-glass: rgba(255, 255, 255, 0.03);
    --bg-glass-hover: rgba(255, 255, 255, 0.06);

    --text-primary: #F9FAFB;
    --text-secondary: #D1D5DB;
    --text-muted: #9CA3AF;
    --text-dim: #6B7280;

    --border-color: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.12);

    --gradient-primary: linear-gradient(135deg, #7C3AED 0%, #2563EB 100%);
    --gradient-accent: linear-gradient(135deg, #06B6D4 0%, #8B5CF6 100%);
    --gradient-warm: linear-gradient(135deg, #F59E0B 0%, #EF4444 100%);
    --gradient-bg: linear-gradient(180deg, #0B0F1A 0%, #111827 50%, #0B0F1A 100%);

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(124, 58, 237, 0.15);
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
    --transition-bounce: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);

    --container-max: 1200px;
    --header-height: 72px;
}

/* ====== RESET ====== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    font-family: inherit;
}

ul {
    list-style: none;
}

/* ====== CONTAINER ====== */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
}

/* ====== HEADER ====== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(11, 15, 26, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: var(--transition);
}

.header.scrolled {
    background: rgba(11, 15, 26, 0.95);
    box-shadow: var(--shadow-md);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

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

.logo-icon {
    width: 42px;
    height: 42px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.logo-icon.small {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
}

.logo-text h1 {
    font-size: 1.3rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.logo-tagline {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 500;
}

.rate-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.rate-badge:hover {
    background: rgba(124, 58, 237, 0.2);
    border-color: rgba(124, 58, 237, 0.4);
}

.rate-badge i {
    color: var(--accent-green);
}

.rate-badge strong {
    color: var(--accent-green);
    font-weight: 700;
}

.header-glow {
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-primary);
    opacity: 0.5;
}

/* ====== HERO SECTION ====== */
.hero {
    position: relative;
    padding: 120px 0 60px;
    overflow: hidden;
    background: radial-gradient(ellipse at top, rgba(124, 58, 237, 0.08) 0%, transparent 60%);
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 36px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

/* ====== PRODUCTS SECTION ====== */
.products-section {
    padding: 40px 0 80px;
    position: relative;
}

/* ====== TABS NAVIGATION ====== */
.tabs-wrapper {
    margin-bottom: 40px;
}

.tabs-nav {
    display: flex;
    gap: 8px;
    padding: 6px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tabs-nav::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: transparent;
    color: var(--text-muted);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    transition: var(--transition);
    position: relative;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    color: white;
    background: var(--gradient-primary);
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.tab-btn i {
    font-size: 0.85rem;
}

.tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.tab-btn.active .tab-count {
    background: rgba(255, 255, 255, 0.25);
}

/* ====== TAB CONTENT ====== */
.tab-pane {
    display: none;
    animation: fadeInUp 0.4s ease;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ====== EMPTY STATE ====== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-dim);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 1rem;
}

/* ====== CARD LAYOUT ====== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    transform: translateY(-6px);
    border-color: rgba(124, 58, 237, 0.3);
    box-shadow: var(--shadow-card), 0 0 30px rgba(124, 58, 237, 0.1);
}

.card-image {
    position: relative;
    width: 100%;
    padding-top: 75%; /* Tỷ lệ 4:3 */
    overflow: hidden;
    background: var(--bg-secondary);
}

.card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .card-image img {
    transform: scale(1.08);
}

.card-image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-card));
    color: var(--text-dim);
    font-size: 2.5rem;
}

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(31, 41, 55, 0.9), transparent);
    pointer-events: none;
}

.card-body {
    padding: 16px 20px 20px;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-price {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card-price i {
    -webkit-text-fill-color: initial;
    color: #F59E0B;
    font-size: 0.9rem;
}

.card-robux-original {
    margin-top: 4px;
}

.card-robux-original small {
    color: var(--text-dim);
    font-size: 0.8rem;
}

/* ====== LIST LAYOUT ====== */
.products-list {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.list-header {
    display: flex;
    justify-content: space-between;
    padding: 16px 24px;
    background: rgba(124, 58, 237, 0.08);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.list-item:last-child {
    border-bottom: none;
}

.list-item:hover {
    background: var(--bg-glass-hover);
}

.list-item.even {
    background: rgba(255, 255, 255, 0.01);
}

.list-item.even:hover {
    background: var(--bg-glass-hover);
}

.list-item-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.list-item-name i {
    color: var(--primary-light);
    font-size: 0.7rem;
    transition: var(--transition);
}

.list-item:hover .list-item-name i {
    transform: translateX(3px);
    color: var(--accent);
}

.list-item-price {
    font-weight: 700;
    font-size: 0.95rem;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
}

/* ====== FOOTER ====== */
.footer {
    padding: 60px 0 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 12px;
    max-width: 300px;
}

.footer-links h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-links li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 10px;
    transition: var(--transition);
}

.footer-links li:hover {
    color: var(--primary-light);
}

.footer-links li i {
    width: 16px;
    text-align: center;
    color: var(--primary-light);
}

.footer-bottom {
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-bottom p {
    color: var(--text-dim);
    font-size: 0.8rem;
}

/* ====== LOADING SKELETON ====== */
.skeleton {
    position: relative;
    overflow: hidden;
    background: var(--bg-card);
    border-radius: var(--radius-md);
}

.skeleton::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.04),
        transparent
    );
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    100% {
        left: 100%;
    }
}

.skeleton-card {
    height: 300px;
}

.skeleton-list {
    height: 56px;
    margin-bottom: 2px;
}

/* ====== CUSTOM SCROLLBAR ====== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-card);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-dim);
}

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

/* Tablet (768px) */
@media (max-width: 768px) {
    :root {
        --header-height: 64px;
    }

    .header-content {
        flex-direction: row;
    }

    .rate-badge {
        padding: 6px 12px;
    }

    .rate-badge span {
        font-size: 0.8rem;
    }

    .hero {
        padding: 100px 0 40px;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-stats {
        gap: 24px;
    }

    .stat-number {
        font-size: 1.4rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 16px;
    }

    .tab-btn {
        padding: 10px 16px;
        font-size: 0.85rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .list-item {
        padding: 12px 16px;
    }

    .list-header {
        padding: 12px 16px;
    }
}

/* Mobile (320px-480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .logo-text h1 {
        font-size: 1.1rem;
    }

    .logo-tagline {
        display: none;
    }

    .hero {
        padding: 90px 0 30px;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-desc {
        font-size: 0.9rem;
    }

    .hero-stats {
        gap: 20px;
    }

    .stat-number {
        font-size: 1.2rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }

    .card-body {
        padding: 12px 14px 16px;
    }

    .card-title {
        font-size: 0.9rem;
    }

    .card-price {
        font-size: 0.95rem;
    }

    .tabs-nav {
        gap: 4px;
        padding: 4px;
    }

    .tab-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }

    .tab-btn i {
        display: none;
    }

    .list-item-name {
        font-size: 0.85rem;
    }

    .list-item-price {
        font-size: 0.85rem;
    }
}

/* Large screens (1280px+) */
@media (min-width: 1280px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ====== ANIMATIONS ====== */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(124, 58, 237, 0.1);
    }
    50% {
        box-shadow: 0 0 40px rgba(124, 58, 237, 0.2);
    }
}

/* ====== SELECTION ====== */
::selection {
    background: rgba(124, 58, 237, 0.3);
    color: white;
}
