/* ============================================================
   SOMEMAI.COM – Main CSS
   ============================================================ */

:root {
  --bg:        #0a0a0f;
  --surface:   #111118;
  --surface2:  #18181f;
  --border:    #2a2a35;
  --accent:    #7c5cfc;
  --accent2:   #fc5c9c;
  --accent3:   #5cf0fc;
  --text:      #f0f0f8;
  --muted:     #6b6b85;
  --green:     #4ade80;
  --yellow:    #fbbf24;
  --red:       #f87171;
  --radius:    10px;
  --radius-lg: 16px;
  --shadow:    0 4px 24px rgba(0,0,0,0.4);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; padding: 10px 20px; border-radius: var(--radius);
  font-size: 0.88rem; font-weight: 500; cursor: pointer;
  border: none; font-family: 'DM Sans', sans-serif;
  transition: all 0.2s; white-space: nowrap; text-decoration: none;
}
.btn-primary {
  background: var(--accent); color: white;
}
.btn-primary:hover {
  background: #6b4ee8; transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(124,92,252,0.4);
}
.btn-ghost {
  background: transparent; color: var(--muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger { background: var(--red); color: white; }
.btn-danger:hover { background: #e05050; }
.btn-lg { padding: 13px 28px; font-size: 0.95rem; }
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ---- GRADIENT BUTTON ---- */
.btn-gradient {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: white; border: none;
}
.btn-gradient:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(124,92,252,0.4);
}

/* ---- FORMS ---- */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 0.82rem; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
.form-input, .form-select, .form-textarea {
  width: 100%; background: var(--surface2); border: 1px solid var(--border);
  color: var(--text); padding: 10px 14px; border-radius: var(--radius);
  font-size: 0.88rem; font-family: 'DM Sans', sans-serif;
  transition: border-color 0.2s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124,92,252,0.15);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--muted); }
.form-textarea { resize: vertical; min-height: 100px; }
.form-select { cursor: pointer; }
.form-error { font-size: 0.75rem; color: var(--red); margin-top: 4px; }
.form-help  { font-size: 0.75rem; color: var(--muted); margin-top: 4px; }

/* ---- CARD ---- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
}

/* ---- BADGE ---- */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 20px; font-size: 0.72rem; font-weight: 600; }
.badge-purple { background: rgba(124,92,252,0.15); color: var(--accent); }
.badge-green  { background: rgba(74,222,128,0.15); color: var(--green); }
.badge-yellow { background: rgba(251,191,36,0.15); color: var(--yellow); }
.badge-red    { background: rgba(248,113,113,0.15); color: var(--red); }
.badge-cyan   { background: rgba(92,240,252,0.15); color: var(--accent3); }

/* ---- ALERTS ---- */
.alert { padding: 12px 16px; border-radius: var(--radius); font-size: 0.85rem; margin-bottom: 16px; border-left: 3px solid; }
.alert-error   { background: rgba(248,113,113,0.1); border-color: var(--red); color: var(--red); }
.alert-success { background: rgba(74,222,128,0.1); border-color: var(--green); color: var(--green); }
.alert-info    { background: rgba(124,92,252,0.1); border-color: var(--accent); color: var(--accent); }

/* ---- LOADING ---- */
.spinner { width: 20px; height: 20px; border: 2px solid rgba(255,255,255,0.3); border-top-color: white; border-radius: 50%; animation: spin 0.7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }
.fade-in { animation: fadeIn 0.3s ease; }

/* ---- MODAL ---- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 20px; backdrop-filter: blur(4px);
}
.modal-overlay.hidden { display: none; }
.modal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px; width: 100%;
  max-width: 540px; animation: fadeIn 0.2s ease;
}
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-title { font-family: 'Syne', sans-serif; font-size: 1.1rem; font-weight: 700; }
.modal-close { background: none; border: none; color: var(--muted); font-size: 1.3rem; cursor: pointer; padding: 4px; }
.modal-close:hover { color: var(--text); }

/* ---- TOGGLE ---- */
.toggle { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; cursor: pointer; inset: 0; background: var(--border); border-radius: 24px; transition: 0.3s; }
.toggle-slider::before { content: ''; position: absolute; height: 18px; width: 18px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: 0.3s; }
.toggle input:checked + .toggle-slider { background: var(--accent); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ---- CHIP ---- */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px; border-radius: 20px; font-size: 0.75rem; border: 1px solid var(--border); cursor: pointer; transition: all 0.15s; color: var(--muted); }
.chip:hover, .chip.active { border-color: var(--accent); color: var(--accent); background: rgba(124,92,252,0.1); }

/* ---- TABLE ---- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
thead th { text-align: left; padding: 10px 14px; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); border-bottom: 1px solid var(--border); }
tbody td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--surface2); }

/* ---- UTILS ---- */
.text-muted { color: var(--muted); }
.text-accent { color: var(--accent); }
.text-sm { font-size: 0.82rem; }
.text-xs { font-size: 0.72rem; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 16px; }
.justify-between { justify-content: space-between; }
.hidden { display: none !important; }
.w-full { width: 100%; }
