/*
Theme Name: Premium Esports Market
Description: Light/Dark Mode, Support Bot, Mobile Responsive Grid
Version: Pro Build
*/

:root {
    --bg-dark: #090a0f;
    --card-bg: #13151f;
    --text-main: #f8fafc;
    --text-sec: #94a3b8;
    --gold: #fbbf24;
    --orange: #f97316;
    --blue: #3b82f6;
}

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

body { background-color: var(--bg-dark); color: var(--text-main); font-family: 'Segoe UI', system-ui, sans-serif; overflow-x: hidden; transition: background-color 0.3s, color 0.3s; }
a { text-decoration: none; color: inherit; }

/* ================= 1. LIGHT MODE LOGIC ================= */
body.light-mode { --bg-dark: #f1f5f9; --card-bg: #ffffff; --text-main: #0f172a; --text-sec: #475569; }
body.light-mode .item-card, body.light-mode .detail-card, body.light-mode .modal-box, body.light-mode .support-panel { border: 1px solid rgba(0,0,0,0.1); box-shadow: 0 8px 25px rgba(0,0,0,0.08); }
body.light-mode .highlight-box { background: #f8fafc; border: 1px solid rgba(0,0,0,0.1); }
body.light-mode .header-section h1 { background: linear-gradient(to right, #0f172a, #3b82f6); -webkit-background-clip: text; }
body.light-mode .filter-btn { color: var(--text-sec); border-color: #cbd5e1; }
body.light-mode .filter-btn.active { color: #fff; border-color: var(--blue); }

/* THEME TOGGLE BUTTON */
.theme-toggle-btn { position: absolute; top: 20px; right: 20px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: var(--text-main); padding: 8px 16px; border-radius: 20px; cursor: pointer; font-weight: bold; font-size: 0.85rem; transition: all 0.3s; z-index: 100; }
body.light-mode .theme-toggle-btn { background: #fff; border: 1px solid #ccc; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
.theme-toggle-btn:hover { transform: translateY(-2px); background: var(--blue); color: #fff; border-color: var(--blue); }

/* ================= 2. MAIN LAYOUT ================= */
.marketplace-container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 20px; }
.single-container { max-width: 850px; margin: 0 auto; padding: 20px 20px 60px 20px; }

.header-section { text-align: center; margin-bottom: 30px; padding-top: 20px; }
.header-section h1 { font-size: 2rem; letter-spacing: 2px; text-transform: uppercase; background: linear-gradient(to right, #fff, #94a3b8); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.header-section p { color: var(--gold); font-size: 0.9rem; font-weight: bold; letter-spacing: 1px; margin-top: 5px; }

.filter-controls { display: flex; justify-content: center; gap: 15px; margin-bottom: 30px; }
.filter-btn { background: transparent; border: 2px solid #2a2d3e; color: var(--text-sec); padding: 10px 20px; border-radius: 30px; font-weight: bold; font-size: 0.9rem; cursor: pointer; transition: all 0.3s ease; }
.filter-btn.active { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 0 15px rgba(59, 130, 246, 0.4); }

.grid-layout { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; align-items: stretch; }

/* CARDS */
.item-card { background: var(--card-bg); border-radius: 14px; overflow: hidden; border: 1px solid rgba(255,255,255,0.03); box-shadow: 0 8px 25px rgba(0,0,0,0.5); display: none; flex-direction: column; position: relative; z-index: 1; transition: transform 0.2s, z-index 0.2s; height: 100%; }
.item-card:hover { transform: translateY(-5px); border-color: rgba(255,255,255,0.1); z-index: 10; }
.item-image-box { position: relative; width: 100%; }
.item-image-box img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.game-tag { position: absolute; top: 10px; left: 10px; padding: 4px 10px; border-radius: 6px; font-size: 0.7rem; font-weight: bold; color: #fff; z-index: 2; }
.badge-gold, .bg-gold { background: rgba(251, 191, 36, 0.9); backdrop-filter: blur(4px); }
.badge-orange, .bg-orange { background: rgba(249, 115, 22, 0.9); backdrop-filter: blur(4px); }
.price-tag { position: absolute; bottom: 10px; right: 10px; background: rgba(0,0,0,0.8); color: #22c55e; padding: 5px 12px; border-radius: 8px; font-weight: bold; font-size: 0.85rem; border: 1px solid #22c55e; z-index: 2; }
.item-details { padding: 15px; flex-grow: 1; display: flex; flex-direction: column; justify-content: flex-start; }
.item-details h2 { font-size: 1.1rem; margin-bottom: 8px; line-height: 1.4; }
.rank-info { font-size: 0.85rem; color: var(--text-sec); margin-top: auto; }

/* SINGLE PAGE DETAILS */
.back-btn { display: inline-flex; align-items: center; color: var(--text-sec); margin-bottom: 25px; font-weight: bold; font-size: 0.95rem; transition: color 0.3s; }
.back-btn:hover { color: var(--text-main); }
.detail-card { background: var(--card-bg); border-radius: 16px; border: 1px solid rgba(255,255,255,0.05); overflow: hidden; }
.cover-img { width: 100%; max-height: 450px; object-fit: cover; display: block; }
.info-section { padding: 30px; }
.game-badge-large { display: inline-block; padding: 6px 15px; border-radius: 8px; font-size: 0.85rem; font-weight: bold; color: #fff; margin-bottom: 15px; }
.account-title { font-size: 2rem; color: var(--text-main); margin: 0 0 20px 0; line-height: 1.3; }
.highlight-box { display: flex; gap: 20px; background: rgba(0,0,0,0.3); padding: 15px 20px; border-radius: 12px; margin-bottom: 25px; border: 1px solid rgba(255,255,255,0.03); }
.highlight-item { flex: 1; }
.highlight-label { font-size: 0.8rem; color: var(--text-sec); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 5px; display: block; }
.highlight-value { font-size: 1.3rem; font-weight: bold; color: var(--text-main); }
.text-green { color: #22c55e; }
.post-content { color: var(--text-sec); line-height: 1.8; font-size: 1.05rem; }
.post-content p { margin-bottom: 15px; }
.post-content img { max-width: 100%; height: auto; border-radius: 8px; margin: 15px 0; }
.cta-section { text-align: center; margin-top: 40px; padding-top: 30px; border-top: 1px solid rgba(255,255,255,0.05); }
.buy-now-btn { background: linear-gradient(145deg, var(--blue), #1d4ed8); color: #fff; border: none; padding: 16px 40px; border-radius: 12px; font-size: 1.1rem; font-weight: bold; cursor: pointer; box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4); transition: transform 0.2s; }
.buy-now-btn:hover { transform: translateY(-3px); }

/* ================= 3. FLOATING SUPPORT WIDGET ================= */
.floating-support-btn { position: fixed; bottom: 25px; right: 25px; width: 60px; height: 60px; border-radius: 50%; background: linear-gradient(145deg, var(--blue), #1d4ed8); color: #fff; font-size: 1.8rem; border: none; cursor: pointer; box-shadow: 0 10px 25px rgba(59, 130, 246, 0.5); z-index: 9999; transition: transform 0.3s; display: flex; justify-content: center; align-items: center; animation: pulseGlow 2s infinite; }
.floating-support-btn:hover { transform: scale(1.1); }
@keyframes pulseGlow { 0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7); } 70% { box-shadow: 0 0 0 15px rgba(59, 130, 246, 0); } 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); } }

.support-panel { position: fixed; bottom: 95px; right: 25px; width: 340px; max-width: calc(100vw - 40px); background: var(--card-bg); border-radius: 16px; border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 15px 40px rgba(0,0,0,0.6); z-index: 9998; transform: translateY(20px); opacity: 0; visibility: hidden; transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); display: flex; flex-direction: column; overflow: hidden; }
.support-panel.active { transform: translateY(0); opacity: 1; visibility: visible; }
.support-header { background: linear-gradient(145deg, var(--blue), #1d4ed8); color: #fff; padding: 15px 20px; font-weight: bold; display: flex; justify-content: space-between; align-items: center; }
.support-header-close { cursor: pointer; font-size: 1.2rem; transition: transform 0.2s; }
.support-header-close:hover { transform: rotate(90deg); }
.support-body { padding: 15px; max-height: 350px; overflow-y: auto; }
.support-body p { font-size: 0.9rem; color: var(--text-sec); margin-bottom: 15px; }

/* FAQ Accordion */
.faq-item { margin-bottom: 10px; border: 1px solid rgba(255,255,255,0.05); border-radius: 8px; overflow: hidden; }
body.light-mode .faq-item { border-color: rgba(0,0,0,0.1); }
.faq-question { width: 100%; text-align: left; padding: 12px 15px; background: rgba(0,0,0,0.2); border: none; color: var(--text-main); font-size: 0.9rem; font-weight: bold; cursor: pointer; transition: background 0.2s; }
body.light-mode .faq-question { background: rgba(0,0,0,0.03); }
.faq-answer { padding: 0 15px; max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease; color: var(--text-sec); font-size: 0.85rem; line-height: 1.5; background: rgba(0,0,0,0.1); }
body.light-mode .faq-answer { background: #fff; }
.faq-answer.show { padding: 12px 15px; max-height: 200px; }
.direct-talk-btn { display: block; width: 100%; text-align: center; background: var(--orange); color: #fff; padding: 14px 0; font-weight: bold; text-decoration: none; transition: background 0.3s; }
.direct-talk-btn:hover { background: #ea580c; }

/* MODALS */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(8px); z-index: 9999; justify-content: center; align-items: center; }
body.light-mode .modal-overlay { background: rgba(255, 255, 255, 0.85); }
.modal-box { background: var(--card-bg); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 16px; padding: 30px; width: 90%; max-width: 400px; text-align: center; position: relative; transform: scale(0.9); opacity: 0; transition: all 0.3s ease; }
.modal-overlay.active { display: flex; }
.modal-overlay.active .modal-box { transform: scale(1); opacity: 1; }
.close-modal { position: absolute; top: 15px; right: 20px; font-size: 1.8rem; color: var(--text-sec); cursor: pointer; transition: 0.2s; }
.close-modal:hover { color: var(--text-main); }
.social-link-btn { display: block; width: 100%; padding: 14px 0; margin-bottom: 12px; border-radius: 10px; font-weight: bold; color: #fff; text-decoration: none; transition: transform 0.2s; }
.social-link-btn:hover { transform: translateY(-2px); }
.btn-tg { background: #2481cc; } .btn-ms { background: linear-gradient(45deg, #00c6ff, #0072ff); } .btn-vb { background: #7360f2; }

@keyframes popIn { 0% { opacity: 0; transform: scale(0.95); } 100% { opacity: 1; transform: scale(1); } }

/* ================= MOBILE RESPONSIVE ================= */
@media (max-width: 768px) {
    .marketplace-container, .single-container { padding: 15px; }
    .grid-layout { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .filter-btn { padding: 8px 12px; font-size: 0.8rem; }
    .item-details { padding: 10px; }
    .item-details h2 { font-size: 0.9rem; }
    .price-tag { font-size: 0.75rem; padding: 4px 8px; }
    .game-tag { font-size: 0.6rem; padding: 3px 6px; }
    .account-title { font-size: 1.5rem; }
    .highlight-box { flex-direction: column; gap: 15px; }
    .buy-now-btn { width: 100%; }
}