* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', system-ui, sans-serif; background: #FAFAFA; color: #1a1a1a; }
a { text-decoration: none; color: inherit; }

.navbar { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid #eee;
  display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; }
.navbar .logo { font-size: 22px; font-weight: 700; color: #FF6B35; }
.navbar .logo span { color: #1a1a1a; }
.navbar .nav-actions { display: flex; align-items: center; gap: 16px; }
.btn-post { background: #FF6B35; color: #fff; padding: 8px 16px; border-radius: 20px; font-size: 14px; font-weight: 600; }

.hero { background: linear-gradient(135deg, #FF6B35, #E8551F); color: #fff; text-align: center; padding: 32px 16px; }
.hero h1 { font-size: 24px; margin-bottom: 6px; }

.container { max-width: 1100px; margin: 0 auto; padding: 16px; }

.categories { display: flex; gap: 8px; overflow-x: auto; padding: 16px; }
.categories button { white-space: nowrap; padding: 8px 16px; border-radius: 20px; border: 1px solid #ddd; background: #fff; cursor: pointer; font-size: 14px; }
.categories button.active { background: #FF6B35; color: #fff; border-color: #FF6B35; }

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (min-width: 768px) { .grid { grid-template-columns: repeat(4, 1fr); } }

.card video, .card img { width: 100%; aspect-ratio: 9/16; object-fit: cover; border-radius: 12px; background: #eee; }
.card { cursor: pointer; }
.card .title { font-weight: 600; margin-top: 8px; font-size: 14px; }
.card .price { color: #FF6B35; font-weight: 700; font-size: 16px; }
.card .location { color: #888; font-size: 12px; margin-top: 2px; }

.form-box { max-width: 480px; margin: 40px auto; background: #fff; padding: 24px; border-radius: 16px; box-shadow: 0 2px 10px rgba(0,0,0,0.06); }
.form-box h1 { text-align: center; color: #FF6B35; font-size: 22px; margin-bottom: 4px; }
.form-box p.sub { text-align: center; color: #888; font-size: 13px; margin-bottom: 20px; }

input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 8px; margin-bottom: 12px; font-size: 14px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: #FF6B35; }
label { font-size: 13px; color: #555; display: block; margin-bottom: 4px; }
.btn { width: 100%; background: #FF6B35; color: #fff; padding: 12px; border: none; border-radius: 8px; font-weight: 600; cursor: pointer; font-size: 15px; }
.btn:disabled { opacity: 0.5; }
.btn-outline { background: #fff; border: 1px solid #ddd; color: #333; }
.error-msg { color: #e53e3e; font-size: 13px; text-align: center; margin-bottom: 12px; }

.upload-box { border: 2px dashed #ddd; border-radius: 12px; padding: 24px; text-align: center; cursor: pointer; margin-bottom: 12px; }
.upload-box:hover { border-color: #FF6B35; }
.progress-bar { height: 6px; background: #eee; border-radius: 3px; overflow: hidden; margin-top: 8px; }
.progress-bar .fill { height: 100%; background: #FF6B35; width: 0%; transition: width 0.2s; }

.listing-detail { display: grid; gap: 24px; }
@media (min-width: 768px) { .listing-detail { grid-template-columns: 1fr 1fr; } }
.listing-detail video { width: 100%; border-radius: 12px; background: #000; aspect-ratio: 9/16; }
.badge { display: inline-block; background: #FFE8DE; color: #E8551F; padding: 4px 10px; border-radius: 20px; font-size: 12px; }
.price-big { font-size: 28px; font-weight: 700; color: #FF6B35; margin: 8px 0; }
.action-row { display: flex; gap: 10px; margin: 16px 0; }
.action-row .btn { flex: 1; }

.chat-list-item { display: flex; gap: 12px; padding: 12px; background: #fff; border-radius: 12px; border: 1px solid #eee; margin-bottom: 8px; align-items: center; }
.chat-list-item img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; background: #eee; }
.chat-list-item .info { flex: 1; min-width: 0; }
.chat-list-item .name { font-weight: 600; font-size: 14px; }
.chat-list-item .preview { color: #888; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.unread-badge { background: #FF6B35; color: #fff; font-size: 11px; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }

.chat-room { display: flex; flex-direction: column; height: calc(100vh - 60px); }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px; }
.msg { max-width: 70%; padding: 8px 14px; border-radius: 16px; margin-bottom: 8px; font-size: 14px; }
.msg.mine { background: #FF6B35; color: #fff; margin-left: auto; }
.msg.theirs { background: #eee; color: #1a1a1a; }
.chat-input-row { display: flex; gap: 8px; padding: 12px; border-top: 1px solid #eee; }
.chat-input-row input { flex: 1; margin-bottom: 0; border-radius: 20px; }
.chat-input-row button { width: 44px; height: 44px; border-radius: 50%; background: #FF6B35; color: #fff; border: none; cursor: pointer; }

.empty-state { text-align: center; color: #888; padding: 40px; }
