* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', Tahoma, sans-serif; background: #0a1929; color: white; }

body.light-theme { background: #f5f5f5; color: #333; }
body.light-theme header { background: #fff; }
body.light-theme .product-card,
body.light-theme .published-account-card,
body.light-theme .publish-form,
body.light-theme .modal-content { background: #fff; color: #333; }

#loadingScreen { position: fixed; inset: 0; background: #0a1929; display: flex; flex-direction: column; justify-content: center; align-items: center; z-index: 9999; }
.loader { width: 80px; height: 80px; border: 8px solid #1a3a5c; border-top: 8px solid #ff6b35; border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.logo-text { font-size: 36px; font-weight: bold; color: #ff6b35; margin-top: 20px; }
.loading-text { margin-top: 10px; font-size: 16px; color: #3498db; }

.logo { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.logo-icon { width: 50px; height: 50px; background: linear-gradient(135deg, #ff6b35, #e55a2b); border-radius: 15px; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: bold; }
.logo-main { font-size: 22px; font-weight: bold; color: #ff6b35; }
.logo-sub { font-size: 12px; color: #3498db; }

header { background: #0d2137; padding: 15px 0; }
.container { max-width: 1200px; margin: auto; padding: 0 20px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; }
nav { display: flex; gap: 8px; flex-wrap: wrap; }
.nav-link { color: #3498db; padding: 10px 15px; border-radius: 25px; cursor: pointer; background: #0d2137; border: 1px solid #1a3a5c; text-decoration: none; font-size: 14px; }
.header-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.theme-btn { background: #1a3a5c; color: white; border: none; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.online-users { display: flex; gap: 8px; background: #0d2137; border: 1px solid #1a3a5c; padding: 10px 15px; border-radius: 25px; font-size: 14px; }
.online-dot { width: 10px; height: 10px; background: #27ae60; border-radius: 50%; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: 0.3; } }
#usersCount { color: #ff6b35; font-weight: bold; }
.action-btn { background: #ff6b35; color: white; border: none; padding: 10px 20px; border-radius: 25px; cursor: pointer; font-size: 14px; }

.admin-panel { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 90%; max-width: 600px; max-height: 80vh; overflow-y: auto; background: #0d2137; border: 2px solid #ff6b35; border-radius: 20px; z-index: 2000; padding: 30px; }
.admin-header { display: flex; justify-content: space-between; margin-bottom: 20px; }
.close-admin { background: #e74c3c; color: white; border: none; padding: 8px 15px; border-radius: 50%; cursor: pointer; }
.admin-stats { display: flex; gap: 15px; margin-bottom: 20px; flex-wrap: wrap; }
.admin-stat-box { background: #1a3a5c; padding: 20px; border-radius: 15px; text-align: center; flex: 1; }
.admin-likes-section { background: #1a3a5c; padding: 20px; border-radius: 15px; margin-bottom: 20px; }
.admin-likes-section select, .admin-likes-section input { width: 100%; padding: 10px; margin-bottom: 10px; background: #0d2137; border: 1px solid #2c5f8a; border-radius: 5px; color: white; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.admin-btn { padding: 12px; border: none; border-radius: 10px; cursor: pointer; color: white; font-weight: bold; }
.admin-btn.danger { background: #e74c3c; }
.admin-btn.warning { background: #f39c12; }
.admin-btn.success { background: #27ae60; }

.profile-section { padding: 20px; max-width: 800px; margin: auto; }
.profile-container { background: #0d2137; border-radius: 20px; overflow: hidden; }
.profile-header { text-align: center; padding: 30px; background: linear-gradient(135deg, #0d2137, #1a3a5c); }
.profile-avatar { width: 120px; height: 120px; border-radius: 50%; background: #1a3a5c; margin: 0 auto 15px; cursor: pointer; overflow: hidden; border: 3px solid #ff6b35; display: flex; align-items: center; justify-content: center; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-id { color: #f39c12; }
.edit-profile-btn { background: #3498db; color: white; border: none; padding: 10px 25px; border-radius: 25px; cursor: pointer; }
.profile-stats { display: flex; justify-content: center; gap: 30px; margin-top: 20px; }
.stat-box { background: #0a1929; padding: 15px 25px; border-radius: 15px; }
.stat-number { font-size: 24px; font-weight: bold; color: #ff6b35; display: block; }

.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; padding: 20px; max-width: 1200px; margin: auto; }
.product-card { background: #0d2137; border: 1px solid #1a3a5c; border-radius: 15px; overflow: hidden; }
.product-image { width: 100%; height: 200px; background: #1a3a5c; display: flex; align-items: center; justify-content: center; font-size: 60px; overflow: hidden; }
.product-image img { width: 100%; height: 100%; object-fit: cover; }
.product-info { padding: 15px; }
.product-name { color: #3498db; font-weight: bold; margin-bottom: 10px; }
.product-price { color: #ff6b35; font-size: 22px; font-weight: bold; }

.like-btn { background: transparent; color: white; border: 2px solid #e74c3c; padding: 8px 15px; border-radius: 25px; cursor: pointer; display: flex; align-items: center; gap: 5px; font-size: 14px; transition: all 0.3s; }
.like-btn:hover { background: rgba(231, 76, 60, 0.3); }
.like-btn.liked { background: #e74c3c; }

.contact-btn { background: #27ae60; color: white; border: none; padding: 8px 15px; border-radius: 25px; cursor: pointer; font-size: 14px; }

.published-account-card { background: #0d2137; border: 1px solid #1a3a5c; border-radius: 15px; padding: 20px; margin-bottom: 15px; display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
.published-account-card img { width: 100px; height: 100px; object-fit: cover; border-radius: 10px; }
.published-account-info { flex: 1; }
.account-actions { display: flex; gap: 10px; align-items: center; }

.tabs { display: flex; justify-content: center; gap: 10px; margin: 20px 0; }
.tab-btn { background: #0d2137; color: white; border: 2px solid #1a3a5c; padding: 10px 25px; border-radius: 25px; cursor: pointer; }
.tab-btn.active { background: #3498db; }

.modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.8); z-index: 1000; overflow-y: auto; }
.modal-content { background: #0d2137; margin: 5% auto; padding: 30px; width: 90%; max-width: 500px; border-radius: 15px; position: relative; }
.close { position: absolute; left: 20px; top: 15px; font-size: 30px; cursor: pointer; color: #ff6b35; }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; color: #3498db; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 10px; background: #1a3a5c; border: 1px solid #2c5f8a; border-radius: 5px; color: white; }
.submit-btn, .publish-btn { background: #ff6b35; color: white; border: none; padding: 12px; width: 100%; border-radius: 5px; cursor: pointer; font-size: 18px; }

.chat-container { display: flex; flex-direction: column; height: 400px; }
.chat-messages { flex: 1; overflow-y: auto; padding: 20px; background: #0a1929; border-radius: 10px; margin-bottom: 10px; }
.chat-message { padding: 10px; border-radius: 10px; margin-bottom: 10px; max-width: 70%; }
.chat-message.sent { background: #3498db; margin-left: auto; }
.chat-message.received { background: #1a3a5c; }
.chat-input { display: flex; gap: 10px; }
.chat-input input { flex: 1; padding: 12px; border-radius: 25px; border: 1px solid #2c5f8a; background: #1a3a5c; color: white; }
.chat-input button { background: #3498db; color: white; border: none; padding: 12px 25px; border-radius: 25px; cursor: pointer; }

@media (max-width: 768px) {
    .container { flex-direction: column; }
    .products-grid { grid-template-columns: 1fr; }
}