/* ========================================================
   MTV TOOLS - Shared Common Styles & Design System
   ======================================================== */

:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --panel-hover: #fafafa;
  --panel-elevated: #f1f5f9;
  --ink: #0f172a;
  --ink-secondary: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-focus: #94a3b8;
  
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-soft: #eef2ff;
  --primary-glow: rgba(79, 70, 229, 0.15);
  
  --accent: #b66d78;
  --accent-hover: #9c545f;
  --accent-soft: #fdf2f4;
  
  --green: #16a34a;
  --green-soft: #dcfce7;
  --red: #dc2626;
  --red-soft: #fee2e2;
  --amber: #d97706;
  --amber-soft: #fef3c7;
  --blue: #2563eb;
  --blue-soft: #dbeafe;
  
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 2px 4px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 24px -4px rgba(15, 23, 42, 0.12);
  
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;
  
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  --bg: #0b0f19;
  --panel: #111827;
  --panel-hover: #172033;
  --panel-elevated: #1f2937;
  --ink: #f8fafc;
  --ink-secondary: #cbd5e1;
  --muted: #94a3b8;
  --line: #1e293b;
  --line-focus: #334155;
  
  --primary: #6366f1;
  --primary-hover: #818cf8;
  --primary-soft: #1e1b4b;
  --primary-glow: rgba(99, 102, 241, 0.25);
  
  --accent: #e07a8b;
  --accent-hover: #f497a5;
  --accent-soft: #3f1d24;
  
  --green: #22c55e;
  --green-soft: #052e16;
  --red: #ef4444;
  --red-soft: #450a0a;
  --amber: #f59e0b;
  --amber-soft: #451a03;
  --blue: #3b82f6;
  --blue-soft: #172554;
  
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 2px 4px 0 rgba(0, 0, 0, 0.5);
  --shadow-md: 0 6px 16px -2px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 30px -4px rgba(0, 0, 0, 0.6);
}

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

html, body {
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.25s ease, color 0.25s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ================= Navbar ================= */
.mtv-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: var(--transition);
}

[data-theme="dark"] .mtv-header {
  background: rgba(17, 24, 39, 0.85);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: white;
  font-weight: 800;
  font-size: 18px;
  box-shadow: 0 4px 10px var(--primary-glow);
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  background: var(--primary-soft);
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.brand-desc {
  font-size: 12px;
  color: var(--muted);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-link:hover, .nav-link.active {
  color: var(--ink);
  background: var(--panel-elevated);
}

.nav-link.active {
  color: var(--primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ================= Buttons ================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
  white-space: nowrap;
}

.btn:hover {
  background: var(--panel-elevated);
  border-color: var(--line-focus);
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 2px 8px var(--primary-glow);
}

.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: white;
}

.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.btn-accent:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: white;
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}

.btn-ghost:hover {
  background: var(--panel-elevated);
  color: var(--ink);
}

.btn-sm {
  font-size: 12px;
  padding: 5px 9px;
  border-radius: var(--radius-xs);
}

.btn-lg {
  font-size: 15px;
  padding: 11px 20px;
  border-radius: var(--radius-md);
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-md);
}

/* ================= Badges ================= */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-primary {
  background: var(--primary-soft);
  color: var(--primary);
}

.badge-success {
  background: var(--green-soft);
  color: var(--green);
}

.badge-danger {
  background: var(--red-soft);
  color: var(--red);
}

.badge-warning {
  background: var(--amber-soft);
  color: var(--amber);
}

.badge-neutral {
  background: var(--panel-elevated);
  color: var(--muted);
}

/* ================= Panels / Cards ================= */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.panel:hover {
  border-color: var(--line-focus);
}

/* ================= Form Elements ================= */
input[type="text"],
input[type="search"],
textarea,
select {
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  outline: none;
  transition: var(--transition);
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* ================= Breadcrumb ================= */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--muted);
  transition: var(--transition);
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb-separator {
  color: var(--line-focus);
  font-size: 11px;
}

.breadcrumb-current {
  color: var(--ink);
  font-weight: 600;
}

/* ================= Footer ================= */
.mtv-footer {
  border-top: 1px solid var(--line);
  background: var(--panel);
  padding: 36px 20px 24px;
  margin-top: 60px;
  font-size: 13px;
  color: var(--muted);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

/* ================= Utilities ================= */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 768px) {
  .header-nav {
    display: none;
  }
}

