* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
body { background: #f0f2f5; padding-bottom: 75px; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; transition: background 0.5s ease; }
img { -webkit-user-drag: none; }
.header { background: white; padding: 14px 40px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 10px rgba(0,0,0,0.05); position: fixed; top: 0; left: 0; right: 0; z-index: 100; transition: background 0.3s ease; }
.site-name { font-size: 26px; font-weight: 800; background: linear-gradient(135deg, #667eea, #764ba2); -webkit-background-clip: text; background-clip: text; color: transparent; }
.user-area { display: flex; align-items: center; gap: 15px; }
.user-balance { background: #f59e0b; color: white; padding: 8px 18px; border-radius: 30px; font-weight: 700; font-size: 13px; }
.profile-icon { background: linear-gradient(135deg, #667eea, #764ba2); width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 18px; cursor: pointer; }
.auth-buttons { display: flex; gap: 12px; }
.auth-buttons a { padding: 8px 24px; border-radius: 30px; text-decoration: none; font-size: 14px; font-weight: 600; }
.btn-login { background: linear-gradient(135deg, #667eea, #764ba2); color: white; }
.btn-register { border: 2px solid #667eea; color: #667eea; background: white; }
.main-content { margin-top: 68px; padding: 0; }
.notice-area { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: white; padding: 12px 20px; display: flex; justify-content: space-between; align-items: center; font-size: 14px; font-weight: 600; margin-top: 10px; margin-bottom: 10px; margin-left: 20px; margin-right: 20px; box-sizing: border-box; }
.close-notice { cursor: pointer; font-size: 16px; }
.slider-area { margin-top: 10px; margin-bottom: 30px; margin-left: 20px; margin-right: 20px; box-sizing: border-box; }
.slider-box { position: relative; height: 320px; overflow: hidden; border-radius: 8px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.slider-images { display: flex; width: 300%; transition: 0.5s; }
.slider-item { width: 33.33%; height: 320px; }
.slider-item a { display: block; width: 100%; height: 100%; }
.slider-item img { width: 100%; height: 100%; object-fit: cover; }
.slider-prev, .slider-next { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.5); color: white; width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 18px; z-index: 10; }
.slider-prev { left: 15px; } .slider-next { right: 15px; }
.slider-dots { position: absolute; bottom: 15px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 10; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.5); cursor: pointer; }
.dot.active { background: white; width: 25px; border-radius: 10px; }

.category-filter { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 30px; margin-top: 20px; padding: 0 20px; position: relative; }
.category-btn { flex: 0 0 calc(25% - 6px); box-sizing: border-box; text-align: center; padding: 8.5px 4px; background: #ffffff; border: 1px solid #e2e8f0; border-radius: 30px; font-size: 11.5px; font-weight: 600; color: #475569; cursor: pointer; transition: all 0.25s ease; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; user-select: none; -webkit-tap-highlight-color: transparent; text-decoration: none; display: inline-block; }
.category-btn.active { background: linear-gradient(135deg, #667eea, #764ba2); color: #ffffff; border-color: transparent; box-shadow: 0 6px 14px rgba(102, 126, 234, 0.35); animation: smoothPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.category-btn:hover:not(.active) { box-shadow: 0 4px 10px rgba(0,0,0,0.04); transform: translateY(-1px); }
.category-btn:active { transform: scale(0.95); }
@keyframes smoothPop { 0% { transform: scale(0.95); opacity: 0.8; } 50% { transform: scale(1.02); } 100% { transform: scale(1); opacity: 1; } }
.more-content { display: none; width: 100%; justify-content: center; flex-wrap: wrap; gap: 8px; }
.more-content.show { display: flex; }
.more-btn { cursor: pointer; }

.products-container { display: grid; grid-template-columns: repeat(2, 1fr); gap: 25px; max-width: 1100px; margin: 0 auto 50px; padding: 0 20px; }
.product-card { background: #ffffff; border-radius: 20px; overflow: hidden; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05); transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); border: 1px solid rgba(0, 0, 0, 0.03); display: flex; flex-direction: column; width: 100%; cursor: pointer; }
.product-card:hover { transform: translateY(-8px); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12); }
.product-title { font-size: 18px; font-weight: 800; color: #1e293b; text-align: center; letter-spacing: 0.3px; padding: 20px 15px 15px 15px; background: #ffffff; }
.product-img-box { position: relative; width: 100%; height: 200px; overflow: hidden; }
.product-img-box img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; display: block; }
.product-card:hover .product-img-box img { transform: scale(1.08); }
.product-info { padding: 20px; display: flex; flex-direction: column; gap: 20px; flex-grow: 1; }
.product-tags { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.tag { background: transparent; color: #475569; font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 4px; white-space: nowrap; }
.product-actions { display: flex; gap: 12px; margin-top: auto; }
.setup-btn { flex: 1; background: #f1f5f9; color: #475569; text-decoration: none; padding: 12px 0; border-radius: 12px; font-size: 14px; font-weight: 700; text-align: center; transition: 0.3s; display: flex; align-items: center; justify-content: center; }
.setup-btn:hover { background: #e2e8f0; color: #1e293b; }
.setup-btn.disabled-btn { background: #f1f5f9; color: #94a3b8; border: 1px solid #e2e8f0; cursor: not-allowed; pointer-events: none; }
.buy-btn { flex: 1; background: linear-gradient(135deg, #6366f1, #4f46e5); color: #ffffff; text-decoration: none; padding: 12px 0; border-radius: 12px; font-size: 14px; font-weight: 700; text-align: center; box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3); transition: 0.3s; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.buy-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4); background: linear-gradient(135deg, #4f46e5, #4338ca); }

.no-product { text-align: center; padding: 50px; color: #999; font-size: 16px; grid-column: span 2; }

.stats-section { margin: 30px 20px; padding: 0; background: white; border-radius: 12px; box-shadow: 0 5px 20px rgba(0,0,0,0.06); overflow: hidden; max-width: 1100px; margin-left: auto; margin-right: auto; transition: background 0.3s ease; }
.tab-buttons { display: flex; background: transparent; border-bottom: 1px solid #f0f0f0; }
.tab-btn { flex: 1; padding: 18px 0; background: transparent; border: none; cursor: pointer; font-size: 15px; font-weight: 700; color: #667eea; transition: 0.3s; border-radius: 0; }
.tab-btn.active { background: linear-gradient(135deg, #667eea, #764ba2); color: white; }
.tab-content { display: none; }
.tab-content.active { display: block; }
.stats-card { padding: 20px; }
.list-card-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 15px; border: 1px solid #f0f2f5; border-radius: 12px; margin-bottom: 12px; transition: 0.2s; }
.list-card-item:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.03); border-color: #e2e8f0; }
.item-left { display: flex; align-items: center; gap: 12px; }
.rank-avatar, .initials-avatar { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 800; }
.rank-1 { background: #fef9c3; } .rank-2 { background: #f1f5f9; } .rank-3 { background: #fefce8; }
.initials-avatar { background: linear-gradient(135deg, #667eea, #764ba2); color: white; }
.buyer-info, .order-info { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.buyer-name, .order-user { font-weight: 800; color: #1e293b; font-size: 15px; }
.order-package { color: #64748b; font-size: 13px; font-weight: 500; }
.top-member-badge { background: #e0e7ff; color: #4338ca; padding: 3px 12px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.amount-blue { color: #667eea; font-weight: 800; font-size: 16px; }
.order-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.status-completed { font-size: 11px; color: #000; font-weight: 600; }
.footer-bottom { background: #667eea; color: #ffffff; text-align: center; padding: 15px 5px; margin-top: 30px; font-size: 14px; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; background: white; display: flex; justify-content: space-around; align-items: center; padding: 10px 15px; box-shadow: 0 -2px 10px rgba(0,0,0,0.1); z-index: 100; transition: background 0.3s ease; }
.nav-item { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: #666; font-size: 11px; flex: 1; text-align: center; padding: 5px 0; }
.nav-item i { font-size: 20px; margin-bottom: 4px; }
.nav-item:hover, .nav-item.active { color: #667eea; }
.loading-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255,255,255,0.95); display: none; justify-content: center; align-items: center; z-index: 999; }
.loading-spinner { width: 50px; height: 50px; border: 4px solid #ddd; border-top: 4px solid #667eea; border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.dark-mode-btn { position: fixed; bottom: 155px; right: 25px; background: #ffffff; color: #f59e0b; width: 50px; height: 50px; border-radius: 50%; border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 10px 25px rgba(0,0,0,0.15); z-index: 99; transition: transform 0.3s ease, box-shadow 0.3s ease; font-size: 22px; }
.dark-mode-btn:hover { transform: scale(1.1); }
.theme-icon { transition: transform 0.5s ease; }

.support-btn { position: fixed; bottom: 80px; right: 20px; width: 60px; height: 60px; background: linear-gradient(135deg, #6b46c1, #5b21b6); border-radius: 50%; display: flex; justify-content: center; align-items: center; color: white; font-size: 26px; box-shadow: 0 10px 25px rgba(107, 70, 193, 0.4); cursor: pointer; z-index: 99; animation: floatUpDown 2.5s ease-in-out infinite; transition: all 0.3s ease; }
.support-btn:hover { transform: scale(1.1); animation-play-state: paused; box-shadow: 0 15px 35px rgba(107, 70, 193, 0.6); }
@keyframes floatUpDown { 0% { transform: translateY(0); } 50% { transform: translateY(-12px); } 100% { transform: translateY(0); } }

.support-modal-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0, 0, 0, 0.4); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: flex; justify-content: center; align-items: center; z-index: 9999; opacity: 0; visibility: hidden; transition: 0.3s ease; }
.support-modal-overlay.show { opacity: 1; visibility: visible; }

.support-modal-box { background: #ffffff; width: 85%; max-width: 280px; border-radius: 30px; overflow: hidden; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); transform: scale(0.9); transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); display: flex; flex-direction: column; }
.support-modal-overlay.show .support-modal-box { transform: scale(1); }

.support-modal-header { background: linear-gradient(135deg, #6366f1, #4f46e5); padding: 30px 20px; text-align: center; color: white; }
.support-modal-header i { font-size: 32px; margin-bottom: 10px; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1)); display: inline-block; }
.support-modal-header h3 { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase; }

.support-modal-body { padding: 20px; background: #ffffff; display: flex; flex-direction: column; }

.support-btn-link { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 15px; border-radius: 25px; text-decoration: none; margin-bottom: 15px; transition: 0.3s; border: 1px solid rgba(0,0,0,0.05); }
.btn-owner { background: #1e1b4b; color: #ffffff; box-shadow: 0 8px 15px rgba(30, 27, 75, 0.2); }
.btn-owner:hover { transform: translateY(-2px); background: #131131; }
.btn-admin { background: #3b0764; color: #ffffff; box-shadow: 0 8px 15px rgba(59, 7, 100, 0.2); }
.btn-admin:hover { transform: translateY(-2px); background: #2a0548; }

.support-btn-link i { font-size: 24px; margin-bottom: 4px; display: block; }
.support-btn-link .btn-title { font-size: 14px; font-weight: 800; letter-spacing: 0.3px; }
.support-btn-link .btn-time { font-size: 10px; font-weight: 500; opacity: 0.7; margin-top: 2px; }

.close-support-modal { display: block; width: 100%; background: #f1f5f9; color: #64748b; border: none; padding: 12px; border-radius: 20px; font-size: 13px; font-weight: 700; cursor: pointer; transition: 0.2s; margin-top: 5px; }
.close-support-modal:hover { background: #e2e8f0; color: #1e293b; }

.popup-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.7); display: flex; justify-content: center; align-items: center; z-index: 9999; padding: 20px; box-sizing: border-box; }
.popup-content { background: #ffffff; border-radius: 16px; width: 100%; max-width: 360px; display: flex; flex-direction: column; overflow: hidden; animation: popIn 0.3s ease-out forwards; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.popup-image { width: 100%; height: auto; display: block; border-top-left-radius: 16px; border-top-right-radius: 16px; margin: 0; padding: 0; }
.popup-body { padding: 20px 20px 25px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; background: #ffffff; }
.popup-text { font-size: 13px; color: #333333; line-height: 1.5; margin: 0 0 20px 0; font-weight: 600; padding: 0 10px; }
.popup-action-btn { background: #e91e63; color: #ffffff; border: none; padding: 10px 30px; border-radius: 8px; font-size: 14px; font-weight: bold; cursor: pointer; text-decoration: none; display: inline-block; margin-bottom: 15px; }
.btn-close-popup { background: #e91e63; color: #ffffff; border: none; padding: 12px; border-radius: 50px; font-size: 14px; font-weight: bold; cursor: pointer; width: 100%; display: flex; justify-content: center; align-items: center; gap: 6px; }
@keyframes popIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }

body.dark-mode { background: #0f172a; color: #e2e8f0; }
body.dark-mode .header { background: rgba(15, 23, 42, 0.85); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(168, 85, 247, 0.2); box-shadow: 0 4px 20px rgba(0,0,0,0.5); }
body.dark-mode .site-name { background: linear-gradient(135deg, #d8b4fe, #a855f7); -webkit-background-clip: text; color: transparent; }
body.dark-mode .category-btn { background: rgba(255,255,255,0.03); border: 1px solid rgba(168, 85, 247, 0.3); color: #cbd5e1; }
body.dark-mode .category-btn.active { background: linear-gradient(135deg, #a855f7, #7e22ce); border-color: transparent; color: white; box-shadow: 0 6px 14px rgba(168, 85, 247, 0.35); }

body.dark-mode .product-card { background: #1e293b; border-color: rgba(255, 255, 255, 0.05); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); }
body.dark-mode .product-title { color: #f8fafc; background: #1e293b; }
body.dark-mode .tag { color: #cbd5e1; }
body.dark-mode .setup-btn { background: rgba(255, 255, 255, 0.05); color: #cbd5e1; }
body.dark-mode .setup-btn:hover { background: rgba(255, 255, 255, 0.1); color: #ffffff; }
body.dark-mode .setup-btn.disabled-btn { background: rgba(255,255,255,0.02); color: rgba(255,255,255,0.3); border-color: rgba(255,255,255,0.05); }

body.dark-mode .stats-section { background: rgba(30, 41, 59, 0.7); border: 1px solid rgba(168, 85, 247, 0.25); box-shadow: 0 0 20px rgba(0,0,0,0.5); }
body.dark-mode .tab-buttons { border-bottom: 1px solid rgba(168, 85, 247, 0.2); }
body.dark-mode .tab-btn { color: #a855f7; }
body.dark-mode .tab-btn.active { background: linear-gradient(135deg, #a855f7, #7e22ce); color: white; }
body.dark-mode .list-card-item { border-color: rgba(168, 85, 247, 0.2); background: rgba(255,255,255,0.02); }
body.dark-mode .list-card-item:hover { border-color: rgba(168, 85, 247, 0.6); background: rgba(168, 85, 247, 0.05); }
body.dark-mode .buyer-name, body.dark-mode .order-user { color: #f8fafc; }
body.dark-mode .amount-blue { color: #d8b4fe; }
body.dark-mode .status-completed { color: #10b981; }
body.dark-mode .bottom-nav { background: rgba(15, 23, 42, 0.9); backdrop-filter: blur(15px); border-top: 1px solid rgba(168, 85, 247, 0.2); box-shadow: 0 -5px 20px rgba(0,0,0,0.5); }
body.dark-mode .nav-item { color: #94a3b8; }
body.dark-mode .nav-item.active, body.dark-mode .nav-item:hover { color: #d8b4fe; }

body.dark-mode .dark-mode-btn { background: #1e293b; color: #38bdf8; box-shadow: 0 10px 25px rgba(0,0,0,0.4); }
body.dark-mode .theme-icon { transform: rotate(360deg); }

body.dark-mode .support-modal-box { background: #0f172a; border: 1px solid rgba(168, 85, 247, 0.4); box-shadow: 0 0 30px rgba(168, 85, 247, 0.2); }
body.dark-mode .support-modal-header { background: linear-gradient(135deg, #4c1d95, #3b0764); }
body.dark-mode .support-modal-body { background: #0f172a; }
body.dark-mode .support-btn-link { border-color: rgba(255,255,255,0.05); }
body.dark-mode .close-support-modal { background: rgba(255,255,255,0.05); color: #e2e8f0; border: 1px solid rgba(255,255,255,0.1); }
body.dark-mode .close-support-modal:hover { background: rgba(255,255,255,0.15); }

body.dark-mode .popup-content { background: #1e293b; border: 1px solid rgba(168, 85, 247, 0.3); }
body.dark-mode .popup-body { background: #1e293b; }
body.dark-mode .popup-text { color: #e2e8f0; }

@media (max-width: 768px) {
    .header { padding: 12px 20px; } .site-name { font-size: 20px; }
    .user-balance { padding: 5px 12px; font-size: 11px; } .profile-icon { width: 34px; height: 34px; font-size: 16px; }
    .auth-buttons a { padding: 5px 16px; font-size: 12px; } .main-content { margin-top: 65px; }
    .notice-area { margin-left: 15px; margin-right: 15px; padding: 8px 16px; font-size: 11px; border-radius: 0 !important; }
    .slider-area { margin-left: 15px; margin-right: 15px; } .slider-box { height: 180px; border-radius: 6px; } .slider-item { height: 180px; }
    .category-filter { padding: 0 15px; gap: 8px; } .category-btn { flex: 0 0 calc(25% - 6px); padding: 8px 4px; font-size: 11.5px; }
    .products-container { padding: 0 15px; gap: 15px; grid-template-columns: 1fr 1fr; } 
    .product-title { font-size: 15px; padding: 15px 10px 10px 10px; }
    .product-img-box { height: 150px; }
    .product-info { padding: 12px; gap: 14px; }
    .product-tags { gap: 6px; }
    .tag { font-size: 9.5px; gap: 3px; }
    .setup-btn, .buy-btn { font-size: 12px; padding: 10px 0; }
    .stats-section { margin: 30px 15px; } .tab-btn { font-size: 14px; padding: 15px 0; }
    .support-btn { width: 60px; height: 60px; bottom: 75px; right: 20px; font-size: 26px; }
    .dark-mode-btn { width: 50px; height: 50px; bottom: 150px; right: 25px; font-size: 22px; }
    .more-content { width: 100%; gap: 8px; } .footer-bottom { font-size: 11px; padding: 12px 2px; }
}
@media (min-width: 992px) {
    .products-container { grid-template-columns: repeat(4, 1fr); gap: 20px; }
}
@media (min-width: 1400px) { .slider-box { height: 380px; } .slider-item { height: 380px; } .product-img-box { height: 280px; } }
