:root {
  --bg: #0b0f14;
  --text: #e6eef6;
  --muted: #a5b2bf;
  --primary: #6cb8ff;
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-bd: rgba(255, 255, 255, 0.15);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  --radius: 16px;
  --radius-sm: 12px;
  --blur: 14px;
  --gap: 12px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(1200px 800px at 80% -10%, #14324b 0%, transparent 60%),
              radial-gradient(1000px 700px at -10% 10%, #2a1557 0%, transparent 50%),
              var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variant-numeric: normal;
  font-feature-settings: normal;
  font-variant-ligatures: normal;
}

#app { max-width: 100%; margin: 0; padding: 0; min-height: 100vh; display: flex; flex-direction: column; }

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur)) saturate(120%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(120%);
  border: 1px solid var(--glass-bd);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

.app-header { display: none; }
.top-header { position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding: 16px 20px; background: rgba(11, 15, 20, 0.7); backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%); border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.top-header-content { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; }
.logo { display: none; }
.title { font-weight: 700; letter-spacing: -0.3px; font-size: 18px; color: var(--text); }
.lang-toggle { border: 1px solid rgba(255, 255, 255, 0.15); background: rgba(255, 255, 255, 0.06); color: var(--text); border-radius: 8px; padding: 6px 12px; font-weight: 500; font-size: 13px; cursor: pointer; transition: all 0.2s ease; }
.lang-toggle:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.2); }
.lang-toggle:disabled { opacity: 0.6; cursor: not-allowed; }
.lang-toggle:disabled:hover { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.15); }
.chip { border: 1px solid var(--glass-bd); background: transparent; color: var(--text); border-radius: 999px; padding: 6px 10px; font-weight: 600; }

.filters { padding: 12px; display: flex; flex-direction: column; gap: var(--gap); }
.filter-row { display: flex; flex-direction: column; gap: 8px; }
.label { font-size: 12px; color: var(--muted); }
.range-inputs { display: flex; align-items: center; gap: 10px; }
.range-inputs input { flex: 1; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--glass-bd); background: rgba(255,255,255,0.04); color: var(--text); }
.dash { color: var(--muted); }
.select-wrap { position: relative; }
.select-wrap select { width: 100%; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--glass-bd); background: rgba(255,255,255,0.04); color: var(--text); appearance: none; }

.filter-actions { display: flex; gap: 10px; }
.btn { flex: 1; padding: 10px 14px; border-radius: var(--radius-sm); border: 1px solid var(--glass-bd); background: rgba(255,255,255,0.06); color: var(--text); font-weight: 600; }
.btn.primary { background: linear-gradient(180deg, rgba(108,184,255,0.9), rgba(108,184,255,0.6)); color: #00121e; border: none; }
.btn:active { transform: translateY(1px); }

.results { display: grid; gap: 12px; margin-top: 16px; }
.card { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 12px; border-radius: var(--radius); background: var(--glass-bg); border: 1px solid var(--glass-bd); box-shadow: var(--shadow); text-decoration: none; color: var(--text); cursor: pointer; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.card:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5); border-color: rgba(108, 184, 255, 0.3); }
.card:active { transform: translateY(0); }
.thumb { width: 96px; height: 96px; border-radius: 12px; object-fit: cover; background: rgba(255,255,255,0.08); }
.meta { display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.price { 
  font-weight: 700; 
  font-variant-numeric: normal; 
  font-feature-settings: normal;
  font-variant-ligatures: normal;
  font-kerning: normal;
  font-variation-settings: normal;
}
.muted { color: var(--muted); font-size: 12px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { padding: 4px 8px; border-radius: 999px; border: 1px solid var(--glass-bd); background: rgba(255,255,255,0.05); font-size: 11px; color: var(--muted); }

.empty { text-align: center; color: var(--muted); padding: 24px 8px; }

.fab { position: fixed; right: 16px; bottom: 16px; width: 56px; height: 56px; border-radius: 50%; border: none; background: linear-gradient(180deg, rgba(108,184,255,1), rgba(108,184,255,0.7)); color: #00121e; font-size: 22px; box-shadow: 0 12px 30px rgba(108,184,255,0.45); }

.chat-panel { position: fixed; inset: auto 8px 8px 8px; display: grid; grid-template-rows: auto 1fr auto; max-height: 76vh; transform: translateY(16px); opacity: 0; pointer-events: none; transition: transform .2s ease, opacity .2s ease; background: transparent; border: none; box-shadow: none; }
.chat-panel.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.chat-panel.standalone { position: static; inset: auto; max-height: none; height: 100vh; width: 100%; margin: 0 auto; padding: 0; padding-top: 70px; background: transparent; border: none; box-shadow: none; display: flex; flex-direction: column; justify-content: space-between; align-items: center; }
.chat-panel.standalone .chat-messages { padding: 20px; flex: 1; display: flex; align-items: flex-start; justify-content: flex-start; width: 100%; max-width: 100%; min-height: 0; overflow-y: auto; overflow-x: hidden; }
.chat-panel.standalone .chat-messages.empty { align-items: center; justify-content: center; }
.chat-hint { text-align: center; padding: 8px 20px 12px; color: var(--muted); font-size: 13px; opacity: 0.85; width: 100%; max-width: 680px; margin: 0 auto; }
.chat-panel.fullscreen { inset: 0; max-height: none; height: 100vh; border-radius: 0; }
.chat-panel.fullscreen .chat-messages { padding-bottom: 16px; }

body.chat-active #app > .filters,
body.chat-active #app > .results,
body.chat-active #chat-fab { filter: blur(2px); pointer-events: none; user-select: none; }
.chat-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid var(--glass-bd); }
.chat-title { display: flex; flex-direction: column; }
.chat-title .sub { color: var(--muted); font-size: 12px; }
.icon-btn { background: transparent; border: 1px solid var(--glass-bd); color: var(--text); border-radius: 10px; padding: 6px 8px; }
.chat-messages { padding: 24px 20px; display: flex; flex-direction: column; gap: 20px; overflow-y: auto; overflow-x: hidden; width: 100%; max-width: 900px; margin: 0 auto; scroll-behavior: smooth; min-height: 0; }
.chat-messages.empty { align-items: center; justify-content: center; text-align: center; padding: 0; }
.chat-messages .hero { margin: 0 auto; font-size: 42px; line-height: 1.2; font-weight: 600; color: var(--text); opacity: 0.9; letter-spacing: -0.8px; text-align: center; max-width: 680px; }
.bubble { padding: 14px 18px; border-radius: 14px; line-height: 1.6; word-wrap: break-word; }
.bubble.user { align-self: flex-end; background: rgba(108,184,255,0.2); border: 1px solid rgba(108,184,255,0.4); max-width: 85%; text-align: left; }
.bubble.bot { align-self: flex-start; background: rgba(255,255,255,0.06); border: 1px solid var(--glass-bd); max-width: 90%; text-align: left; }
.chat-input { position: relative; bottom: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 32px 20px; border: none; background: transparent; flex-shrink: 0; width: 100%; max-width: 800px; margin: 0 auto; }
.chat-input input { width: 100%; max-width: 680px; padding: 14px 20px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.18); background: rgba(255,255,255,0.09); color: var(--text); font-size: 15px; box-shadow: 0 2px 16px rgba(0, 0, 0, 0.25); outline: none; transition: all 0.2s ease; margin: 0 auto; }
.chat-input input:focus { box-shadow: 0 4px 20px rgba(108,184,255,0.25), 0 2px 12px rgba(0, 0, 0, 0.3); border-color: rgba(108,184,255,0.4); }
.chat-input input::placeholder { color: var(--muted); opacity: 0.7; }

@media (min-width: 640px) {
  .chat-messages { max-width: 900px; }
  .chat-messages .hero { font-size: 48px; max-width: 720px; }
  .chat-input { max-width: 900px; }
  .chat-input input { max-width: 720px; }
  .bubble.user { max-width: 80%; }
  .bubble.bot { max-width: 95%; }
}

/* Emoji styling - better rendering */
body { 
  font-feature-settings: "liga" 1, "kern" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
.emoji, [class*="emoji"] { 
  font-size: 1.2em; 
  line-height: 1; 
  vertical-align: -0.15em; 
  display: inline-block; 
  font-style: normal; 
  font-variant-emoji: emoji;
  font-variation-settings: normal;
  text-rendering: optimizeLegibility;
}
.bubble .emoji, .roma-message .emoji { 
  font-size: 1.15em; 
  vertical-align: -0.12em;
}
.bubble, .roma-message {
  font-variant-emoji: emoji;
}

/* Roma AI Chat Widget */
.roma-widget { position: fixed; bottom: 24px; right: 24px; z-index: 1000; }
.roma-toggle { 
  width: 64px; 
  height: 64px; 
  border-radius: 20px; 
  background: rgba(255, 255, 255, 0.08); 
  backdrop-filter: blur(20px) saturate(180%); 
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.15); 
  color: var(--text); 
  cursor: pointer; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 
              0 0 0 0 rgba(108, 184, 255, 0),
              inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.roma-toggle::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(108, 184, 255, 0.1), rgba(108, 184, 255, 0.05));
  opacity: 0;
  transition: opacity 0.3s ease;
}
.roma-toggle:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4),
              0 0 0 3px rgba(108, 184, 255, 0.1),
              inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.roma-toggle:hover::before {
  opacity: 1;
}
.roma-toggle:active { 
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35),
              0 0 0 2px rgba(108, 184, 255, 0.15);
}
.roma-toggle svg {
  position: relative;
  z-index: 1;
  width: 26px;
  height: 26px;
  stroke-width: 1.5;
  transition: transform 0.3s ease;
}
.roma-toggle:hover svg {
  transform: scale(1.1);
}
.roma-window { position: absolute; bottom: 70px; right: 0; width: 380px; max-width: calc(100vw - 40px); height: 600px; max-height: calc(100vh - 120px); background: rgba(11, 15, 20, 0.95); backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%); border: 1px solid rgba(255,255,255,0.15); border-radius: 20px; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.roma-window.hidden { display: none; }
.roma-header { padding: 16px 20px; border-bottom: 1px solid rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: space-between; }
.roma-title { font-weight: 600; font-size: 16px; color: var(--text); }
.roma-close { background: transparent; border: none; color: var(--muted); font-size: 24px; cursor: pointer; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 8px; transition: all 0.2s ease; }
.roma-close:hover { background: rgba(255,255,255,0.1); color: var(--text); }
.roma-messages { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.roma-message { padding: 12px 16px; border-radius: 12px; max-width: 85%; word-wrap: break-word; line-height: 1.6; }
.roma-message { font-variant-emoji: emoji; text-rendering: optimizeLegibility; }
.roma-title { font-variant-emoji: emoji; }
.roma-message.user { align-self: flex-end; background: rgba(108,184,255,0.2); border: 1px solid rgba(108,184,255,0.4); color: var(--text); }
.roma-message.bot { align-self: flex-start; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); color: var(--text); }
.roma-message.loading { align-self: flex-start; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); }
.roma-message.loading::after { content: '...'; animation: dots 1.5s steps(4, end) infinite; }
@keyframes dots { 0%, 20% { content: '.'; } 40% { content: '..'; } 60%, 100% { content: '...'; } }
.roma-input-container { padding: 16px; border-top: 1px solid rgba(255,255,255,0.1); display: flex; gap: 8px; }
.roma-input-container input { flex: 1; padding: 12px 16px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.06); color: var(--text); font-size: 14px; outline: none; transition: all 0.2s ease; }
.roma-input-container input:focus { border-color: rgba(108,184,255,0.4); background: rgba(255,255,255,0.08); }
.roma-input-container input::placeholder { color: var(--muted); }
.roma-send-btn { 
  width: 48px; 
  height: 48px; 
  border-radius: 16px; 
  background: rgba(255, 255, 255, 0.08); 
  backdrop-filter: blur(20px) saturate(180%); 
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.15); 
  color: var(--text); 
  cursor: pointer; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3), 
              0 0 0 0 rgba(108, 184, 255, 0),
              inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.roma-send-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(108, 184, 255, 0.1), rgba(108, 184, 255, 0.05));
  opacity: 0;
  transition: opacity 0.3s ease;
}
.roma-send-btn:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4),
              0 0 0 3px rgba(108, 184, 255, 0.1),
              inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.roma-send-btn:hover::before {
  opacity: 1;
}
.roma-send-btn:active { 
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35),
              0 0 0 2px rgba(108, 184, 255, 0.15);
}
.roma-send-btn svg {
  position: relative;
  z-index: 1;
  width: 20px;
  height: 20px;
  stroke-width: 2;
  stroke: currentColor;
  transition: transform 0.3s ease;
}
.roma-send-btn:hover svg {
  transform: scale(1.1);
}
.roma-send-btn:disabled { 
  opacity: 0.5; 
  cursor: not-allowed;
  transform: none;
}

@media (max-width: 480px) {
  .top-header { padding: 12px 16px; }
  .top-header-content { flex-wrap: wrap; gap: 8px; }
  .logo { font-size: 20px; }
  .title { font-size: 16px; }
  .lang-toggle { padding: 5px 10px; font-size: 12px; }
  .chat-panel.standalone { padding-top: 60px; }
  .chat-messages .hero { font-size: 32px; padding: 0 20px; }
  .chat-input { padding: 24px 16px; }
  .chat-input input { padding: 12px 18px; font-size: 14px; }
  .roma-window { width: calc(100vw - 20px); right: -10px; bottom: 90px; height: calc(100vh - 160px); }
  .roma-widget { bottom: 18px; right: 18px; }
  .roma-toggle { width: 58px; height: 58px; border-radius: 16px; }
}


