@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --bg-primary: #07070a;
  --bg-secondary: #0e0e12;
  --bg-card: #121217;
  --bg-elevated: #16161c;
  --bg-hover: #1a1a21;
  --border: #232329;
  --border-hover: #33333d;
  --text-primary: #f7f7f8;
  --text-secondary: #a2a2ac;
  --text-muted: #6c6c78;
  --accent: #7928ca;
  --accent-pink: #ff0080;
  --accent-gradient: linear-gradient(135deg, #ff0080, #7928ca);
  --accent-soft: rgba(121, 40, 202, 0.14);
  --accent-glow: 0 0 40px rgba(121, 40, 202, 0.18);
  --success: #22c55e;
  --error: #ff3b5c;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 6px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.45);
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Inter', -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg-primary);
  background-image:
    radial-gradient(900px circle at 0% -5%, rgba(121, 40, 202, 0.10), transparent 45%),
    radial-gradient(900px circle at 100% 0%, rgba(255, 0, 128, 0.06), transparent 45%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font);
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.6;
}
::selection { background: rgba(121, 40, 202, 0.35); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #444450; background-clip: padding-box; }

/* Typography */
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.022em; line-height: 1.18; }
.gradient-text { background: var(--accent-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* Buttons */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 20px; border-radius: var(--radius-md); font-size: 0.9rem; font-weight: 600; letter-spacing: -0.01em; cursor: pointer; transition: var(--transition); border: 1px solid transparent; font-family: var(--font); text-decoration: none; white-space: nowrap; user-select: none; }
.btn-primary { background: var(--accent-gradient); color: white; box-shadow: 0 4px 14px rgba(121, 40, 202, 0.25); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 32px rgba(121, 40, 202, 0.38); filter: brightness(1.06); }
.btn-primary:active { transform: translateY(0); filter: brightness(0.98); }
.btn-secondary { background: var(--bg-elevated); color: var(--text-primary); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--border-hover); background: var(--bg-hover); transform: translateY(-1px); }
.btn-secondary:active { transform: translateY(0); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { color: var(--text-primary); background: var(--bg-hover); }
.btn-lg { padding: 14px 28px; font-size: 1rem; border-radius: var(--radius-lg); }
.btn-sm { padding: 7px 14px; font-size: 0.8rem; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; box-shadow: none !important; filter: none !important; }

/* Cards */
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 32px; transition: var(--transition); box-shadow: var(--shadow-sm); }
.card:hover { border-color: var(--border-hover); box-shadow: var(--shadow-md); }
.card-sm { padding: 20px; border-radius: var(--radius-lg); }

/* Inputs */
.input { width: 100%; padding: 12px 16px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-md); color: var(--text-primary); font-size: 0.95rem; font-family: var(--font); outline: none; transition: var(--transition); }
.input:hover { border-color: var(--border-hover); }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(121, 40, 202, 0.18); background: var(--bg-elevated); }
.input::placeholder { color: var(--text-muted); }
.input-label { display: block; font-size: 0.85rem; font-weight: 500; color: var(--text-secondary); margin-bottom: 8px; }

/* Badge */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 99px; font-size: 0.75rem; font-weight: 600; letter-spacing: -0.01em; }
.badge-purple { background: rgba(121, 40, 202, 0.15); color: #b884ff; border: 1px solid rgba(121, 40, 202, 0.28); }
.badge-green { background: rgba(34, 197, 94, 0.12); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.25); }
.badge-red { background: rgba(255, 59, 92, 0.1); color: #ff7088; border: 1px solid rgba(255, 59, 92, 0.22); }

/* Progress */
.progress-bar { background: var(--bg-secondary); border-radius: 99px; height: 6px; overflow: hidden; border: 1px solid var(--border); }
.progress-fill { height: 100%; background: var(--accent-gradient); border-radius: 99px; transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 0 0 12px rgba(121, 40, 202, 0.5); }

/* Toast */
.toast { position: fixed; bottom: 24px; right: 24px; padding: 14px 20px; border-radius: var(--radius-md); font-size: 0.9rem; font-weight: 500; z-index: 9999; display: none; max-width: 360px; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: var(--shadow-lg); animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.toast.success { background: rgba(34, 197, 94, 0.12); border: 1px solid rgba(34, 197, 94, 0.3); color: #4ade80; }
.toast.error { background: rgba(255, 59, 92, 0.12); border: 1px solid rgba(255, 59, 92, 0.3); color: #ff7088; }
.toast.info { background: rgba(121, 40, 202, 0.14); border: 1px solid rgba(121, 40, 202, 0.3); color: #b884ff; }

/* Animations */
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

.animate-fadeIn { animation: fadeIn 0.4s ease; }
.animate-slideUp { animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.skeleton { background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-hover) 50%, var(--bg-card) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--radius-sm); }

/* Layout */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }

/* Divider */
.divider { height: 1px; background: var(--border); margin: 24px 0; }

/* Empty State */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state .icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.4; }
.empty-state h3 { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 8px; }
.empty-state p { font-size: 0.9rem; color: var(--text-muted); }

/* Sidebar Layout */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 240px; background: linear-gradient(180deg, var(--bg-secondary), var(--bg-primary)); border-right: 1px solid var(--border); padding: 24px 0; display: flex; flex-direction: column; position: fixed; height: 100vh; z-index: 100; }
.sidebar-logo { padding: 0 20px 24px; border-bottom: 1px solid var(--border); }
.sidebar-logo h1 { font-size: 1.2rem; }
.sidebar-nav { flex: 1; padding: 16px 12px; }
.nav-item { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-md); color: var(--text-secondary); font-size: 0.9rem; font-weight: 500; cursor: pointer; transition: var(--transition); text-decoration: none; margin-bottom: 4px; }
.nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-item.active { background: var(--accent-soft); color: #b884ff; }
.nav-item.active::before { content: ''; position: absolute; left: -12px; top: 50%; transform: translateY(-50%); width: 3px; height: 18px; border-radius: 0 99px 99px 0; background: var(--accent-gradient); }
.nav-item .icon { font-size: 1rem; width: 20px; text-align: center; }
.sidebar-footer { padding: 16px 12px; border-top: 1px solid var(--border); }
.main-content { margin-left: 240px; flex: 1; padding: 32px; }

/* Topbar */
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; }

/* Upload Area */
.upload-zone { border: 2px dashed var(--border); border-radius: var(--radius-xl); padding: 60px 40px; text-align: center; cursor: pointer; transition: var(--transition); background: var(--bg-secondary); position: relative; overflow: hidden; }
.upload-zone:hover { border-color: var(--accent); background: rgba(121, 40, 202, 0.04); box-shadow: var(--accent-glow); }
.upload-zone.dragover { border-color: var(--accent); background: rgba(121, 40, 202, 0.06); box-shadow: var(--accent-glow); }
.upload-zone input { display: none; }
.upload-zone .upload-icon { font-size: 3rem; margin-bottom: 16px; }
.upload-zone h3 { font-size: 1.1rem; margin-bottom: 8px; }
.upload-zone p { color: var(--text-secondary); font-size: 0.9rem; }
.upload-zone span { color: var(--accent); }

/* Video Player */
.clip-card { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; transition: var(--transition); }
.clip-card:hover { border-color: var(--border-hover); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.clip-card video { width: 100%; display: block; max-height: 300px; background: #000; }
.clip-card-body { padding: 16px; }
.clip-card-actions { display: flex; gap: 8px; margin-top: 12px; }

/* Status indicator */
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.status-dot.active { background: var(--success); box-shadow: 0 0 8px var(--success); }
.status-dot.inactive { background: var(--text-muted); }

/* User avatar (dashboard sidebar) */
.user-avatar { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem; color: #fff; background: var(--accent-gradient); flex-shrink: 0; }

/* Dil seçici (i18n) — tüm sayfalarda ortak */
.lang-select { background: var(--bg-elevated); color: var(--text-primary); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; font-size: 0.85rem; font-family: var(--font); cursor: pointer; outline: none; transition: var(--transition); }
.lang-select:hover { border-color: var(--border-hover); }
.lang-select:focus { border-color: var(--accent); }
.lang-fixed { position: fixed; top: 16px; right: 16px; z-index: 200; }

/* Mobil dokunma vurgusu — varsayılan mavi/gri flash yerine marka rengi */
.btn, .nav-item, .control-btn, a, button, select { -webkit-tap-highlight-color: rgba(121, 40, 202, 0.18); }

/* Mobile */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .main-content { margin-left: 0; padding: 16px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .hide-mobile { display: none; }
  /* Dokunma hedefleri: min 44px (Apple HIG) — küçük butonlar büyütülür */
  .btn { padding: 12px 18px; min-height: 44px; }
  .btn-sm { padding: 10px 14px; min-height: 40px; font-size: 0.82rem; }
  .btn-lg { min-height: 52px; }
  /* iOS Safari: <16px input'larda odaklanınca otomatik zoom'u engelle */
  input, select, textarea, .input, .time-input { font-size: 16px; }
  .toast { left: 16px; right: 16px; bottom: 16px; max-width: none; }
}
