/* ══════════════════════════════════════════
   NOX AI — design.css
   ══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;600;700;900&family=Share+Tech+Mono&family=Exo+2:wght@300;400;500;600&display=swap');

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

:root {
  --blue:       #3a8fff;
  --blue-dim:   #1a4a88;
  --blue-glow:  rgba(58,143,255,0.35);
  --bg:         #00080f;
  --surface:    rgba(6,18,34,0.88);
  --border:     rgba(58,143,255,0.15);
  --text:       #c2d8f2;
  --text-dim:   rgba(140,180,230,0.5);
}

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  background: var(--bg);
  font-family: 'Exo 2', sans-serif;
  color: var(--text);
}

/* ─── LAYOUT ─── */
#app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  width: 100%;
  position: relative;
}

/* ─── HEADER ─── */
#header {
  position: relative;
  z-index: 20;
  padding: 14px 20px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border);
  background: rgba(0,4,12,0.95);
  backdrop-filter: blur(12px);
  flex-shrink: 0;
}

.logo {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: 26px;
  letter-spacing: 6px;
  color: #fff;
  text-shadow: 0 0 30px rgba(58,143,255,0.6), 0 0 60px rgba(58,143,255,0.2);
  text-transform: uppercase;
}

.logo .ai {
  color: var(--blue);
  margin-left: 4px;
}

/* ─── CORE SECTION ─── */
#core-section {
  flex: 0 0 40%;
  position: relative;
  overflow: hidden;
}

#container {
  width: 100%;
  height: 100%;
}

/* ─── DIVIDER ─── */
#divider {
  flex-shrink: 0;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  z-index: 10;
  background: rgba(0,4,12,0.4);
}

#divider::before, #divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--blue-glow), transparent);
}

.divider-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 9px;
  letter-spacing: 3px;
  color: rgba(58,143,255,0.5);
  text-transform: uppercase;
  white-space: nowrap;
}

/* ─── MESSAGES SECTION ─── */
#messages-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

#messages-feed {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px 6px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: none;
}
#messages-feed::-webkit-scrollbar { display: none; }

/* ─── MESSAGE BUBBLE ─── */
.msg {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px 14px 14px 4px;
  padding: 11px 15px;
  max-width: 97%;
  position: relative;
  animation: msgIn 0.4s cubic-bezier(0.34,1.3,0.64,1) both;
  backdrop-filter: blur(8px);
}

@keyframes msgIn {
  from { opacity: 0; transform: translateY(14px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.msg-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 6px;
}

.msg-avatar {
  width: 20px; height: 20px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--blue-dim), var(--blue));
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
  flex-shrink: 0;
  box-shadow: 0 0 8px var(--blue-glow);
}

.msg-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  font-weight: 600;
  color: var(--blue);
  letter-spacing: 1px;
}

.msg-time {
  font-family: 'Share Tech Mono', monospace;
  font-size: 9px;
  color: var(--text-dim);
  margin-left: auto;
}

.msg-text {
  font-family: 'Exo 2', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  font-weight: 400;
}

/* Тип повідомлення */
.msg.type-win    { border-left: 2px solid #3dffaa; }
.msg.type-loss   { border-left: 2px solid #ff4d4d; }
.msg.type-bonus  { border-left: 2px solid #ffd700; }
.msg.type-night  { border-left: 2px solid #9b59b6; }
.msg.type-normal { border-left: 2px solid var(--blue); }

/* Бонус-тег */
.bonus-tag {
  display: inline-block;
  background: rgba(255,215,0,0.1);
  border: 1px solid rgba(255,215,0,0.3);
  border-radius: 5px;
  padding: 2px 9px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: #ffd700;
  margin-top: 6px;
  cursor: pointer;
  transition: background 0.2s;
}
.bonus-tag:active { background: rgba(255,215,0,0.2); }

/* Freespin badge */
.freespin-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(61,255,170,0.1);
  border: 1px solid rgba(61,255,170,0.3);
  border-radius: 5px;
  padding: 2px 9px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: #3dffaa;
  margin-top: 6px;
}

/* ─── TYPING ─── */
#typing {
  padding: 6px 14px 4px;
  display: none;
  align-items: center;
  gap: 7px;
}
#typing.visible { display: flex; }

.typing-dots span {
  display: inline-block;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--blue);
  animation: dot 1.4s infinite ease-in-out;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dot {
  0%,80%,100% { transform: scale(0.6); opacity: 0.4; }
  40%          { transform: scale(1);   opacity: 1; }
}

.typing-text {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 1px;
}

/* ─── BOTTOM BAR ─── */
#bottom-bar {
  flex-shrink: 0;
  padding: 8px 16px 16px;
  border-top: 1px solid var(--border);
  background: rgba(0,4,12,0.95);
}

.event-info {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 1px;
  text-align: center;
}

/* ─── BONUS MODAL ─── */
#bonus-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,4,14,0.75);
  backdrop-filter: blur(5px);
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
#bonus-modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

#bonus-modal {
  background: linear-gradient(160deg, rgba(6,18,38,0.98), rgba(2,10,22,0.98));
  border: 1px solid rgba(255,215,0,0.25);
  border-radius: 22px 22px 18px 18px;
  padding: 22px 22px 26px;
  width: calc(100% - 28px);
  max-width: 420px;
  position: relative;
  transform: translateY(30px);
  transition: transform 0.4s cubic-bezier(0.34,1.3,0.64,1);
  box-shadow: 0 -8px 50px rgba(255,190,0,0.07);
}
#bonus-modal-overlay.active #bonus-modal {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.modal-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: rgba(255,200,0,0.12);
  border: 1px solid rgba(255,215,0,0.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.modal-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #fff;
}
.modal-subtitle {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  color: rgba(255,215,0,0.55);
  letter-spacing: 1px;
  margin-top: 2px;
}

.bonus-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}
.bonus-card {
  background: rgba(255,215,0,0.05);
  border: 1px solid rgba(255,215,0,0.18);
  border-radius: 12px;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.bonus-card-icon { font-size: 22px; flex-shrink: 0; }
.bonus-card-label {
  font-family: 'Exo 2', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}
.bonus-card-desc {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 1px;
}
.bonus-card-value {
  margin-left: auto;
  font-family: 'Orbitron', sans-serif;
  font-size: 14px;
  color: #ffd700;
  font-weight: 700;
  white-space: nowrap;
}

#btn-claim {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, rgba(255,200,0,0.18), rgba(255,140,0,0.12));
  border: 1px solid rgba(255,215,0,0.35);
  border-radius: 14px;
  color: #ffd700;
  font-family: 'Orbitron', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 3px;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
}
#btn-claim:active {
  transform: scale(0.98);
  background: rgba(255,215,0,0.24);
}

.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text-dim);
  font-size: 14px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-family: sans-serif;
}

/* ─── EFFECTS ─── */
#scanlines {
  position: fixed; inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent, transparent 2px,
    rgba(0,0,0,0.035) 2px, rgba(0,0,0,0.035) 4px
  );
  pointer-events: none;
  z-index: 1000;
}

#vignette {
  position: fixed; inset: 0;
  background: radial-gradient(ellipse at center, transparent 45%, rgba(0,3,10,0.75) 100%);
  pointer-events: none;
  z-index: 999;
}

@keyframes fadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}
