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

:root {
  --color-canvas: #F6F5FA;
  --color-charcoal: #212121;
  --color-misty: #D8DFE9;
  --color-sage: #CFDECA;
  --color-lime: #EFF0A3;
}

body {
  font-family: 'Urbanist', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--color-canvas);
  background-image: 
    radial-gradient(at 5% 10%, rgba(216, 223, 233, 0.85) 0px, transparent 45%),
    radial-gradient(at 95% 15%, rgba(207, 222, 202, 0.75) 0px, transparent 40%),
    radial-gradient(at 85% 85%, rgba(216, 223, 233, 0.8) 0px, transparent 50%),
    radial-gradient(at 15% 90%, rgba(239, 240, 163, 0.5) 0px, transparent 45%),
    radial-gradient(at 50% 45%, rgba(246, 245, 250, 0.6) 0px, transparent 60%);
  background-attachment: fixed;
  background-size: 100% 100%;
  color: var(--color-charcoal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Cam Efektleri (Frosted Glassmorphism) */
.glass-card {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 10px 30px -10px rgba(216, 223, 233, 0.55), 0 1px 3px 0 rgba(0, 0, 0, 0.02);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
  border-color: rgba(216, 223, 233, 0.9);
  box-shadow: 0 16px 36px -10px rgba(216, 223, 233, 0.75);
}

.glass-pill {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 2px 8px rgba(216, 223, 233, 0.35);
}

.glass-panel {
  background: rgba(246, 245, 250, 0.68);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-left: none;
}

.glass-input {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(216, 223, 233, 0.8);
  transition: all 0.25s ease;
}

.glass-input:focus {
  background: rgba(255, 255, 255, 0.95);
  border-color: var(--color-charcoal);
  box-shadow: 0 0 0 4px rgba(239, 240, 163, 0.45);
}

/* macOS Kilit Ekranı Sallanma (Shake) Animasyonu */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.animate-shake {
  animation: shake 0.45s ease-in-out;
}

/* Widget Düzenleme Modu Sallanma (Jiggle) Animasyonu */
@keyframes jiggle {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(-0.6deg); }
  75% { transform: rotate(0.6deg); }
  100% { transform: rotate(0deg); }
}

.jiggle-mode {
  animation: jiggle 0.25s infinite ease-in-out;
}

/* Sürükle-Bırak Efektleri */
.widget-draggable {
  cursor: grab;
}

.widget-draggable:active {
  cursor: grabbing;
}

.widget-dragging {
  opacity: 0.4;
  transform: scale(0.97);
}

.drag-over-active {
  border: 2px dashed #212121 !important;
  background: rgba(239, 240, 163, 0.25) !important;
}

/* Scrollbar Tamamen Gizlendi (Akıcı Kaydırma Korunur) */
::-webkit-scrollbar {
  width: 0px !important;
  height: 0px !important;
  display: none !important;
}

* {
  -ms-overflow-style: none !important;  /* IE and Edge */
  scrollbar-width: none !important;  /* Firefox */
}

/* ================================================= */
/* MODÜLER BENTO GRID & SÜRÜKLE-BIRAK SİSTEMİ        */
/* ================================================= */
.widget-bento-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1.25rem;
}

@media (max-width: 1024px) {
  .widget-bento-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .widget-bento-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
}

.widget-grid-item {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, opacity 0.2s ease;
}

.widget-grid-item.dragging {
  opacity: 0.35;
  transform: scale(0.98);
}

.widget-grid-item.drag-over {
  border: 2px dashed #212121 !important;
  background: rgba(239, 240, 163, 0.3) !important;
  transform: scale(1.01);
}

.widget-empty-slot {
  min-height: 180px;
  border: 2px dashed rgba(216, 223, 233, 0.8);
  background: rgba(255, 255, 255, 0.25);
  transition: all 0.25s ease;
}

.widget-empty-slot:hover {
  border-color: rgba(33, 33, 33, 0.3);
  background: rgba(255, 255, 255, 0.45);
}

.widget-empty-slot.slot-drag-over {
  border: 2.5px dashed #212121 !important;
  background: rgba(239, 240, 163, 0.45) !important;
  transform: scale(1.01);
}

/* ================================================= */
/* REFERANS GÖRSEL: DIŞ ÇERÇEVE & DİKEY RAIL SİSTEMİ */
/* ================================================= */
.os-outer-shell {
  min-height: 100vh;
  width: 100vw;
  background-color: #0d0d0f; /* Dıştaki derin koyu macOS kabuğu */
  display: flex;
  overflow: hidden;
  padding: 0;
  margin: 0;
}

/* Sol Dikey Tam Boy Rail Sidebar */
.os-rail-sidebar-full {
  width: 58px;
  background-color: #0d0d0f;
  color: #f6f5fa;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  shrink: 0;
  z-index: 40;
  user-select: none;
}

.os-rail-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.45);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.os-rail-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  transform: scale(1.06);
}

.os-rail-btn.active {
  color: #111113;
  background: #EFF0A3;
  box-shadow: 0 4px 14px rgba(239, 240, 163, 0.4);
}

/* İç Çerçeveli Masaüstü Ekranı (Actual Screen Frame) */
.os-screen-frame {
  flex: 1;
  height: calc(100vh - 12px);
  margin: 6px 6px 6px 0;
  border-radius: 24px;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  background-color: transparent !important;
  border: 1px solid rgba(0, 0, 0, 0.25);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}

/* Apple macOS Tarzı Sakinleştirici Arka Plan & Blur Sistemi */
.os-screen-backdrop-container {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
  pointer-events: none;
  z-index: 0;
}

.os-screen-backdrop-frame {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: calc(100vh - 12px);
  border-radius: 24px;
  overflow: hidden;
}

.os-screen-backdrop-image {
  position: absolute;
  inset: -32px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(24px);
  transform: scale(1.08);
  transition: background-image 0.6s ease-in-out, filter 0.3s ease, transform 0.3s ease;
  will-change: filter, transform;
}

.os-screen-backdrop-overlay {
  position: absolute;
  inset: 0;
  background: rgba(246, 245, 250, 0.42);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Apple macOS Tarzı Yüzen Terminal / Komut Dock'u */
.floating-dock-terminal {
  position: fixed;
  bottom: 1.5rem;
  left: calc(50% + 29px); /* Sidebar genişliğini hesaba katarak ortala */
  transform: translateX(-50%);
  z-index: 50;
  width: 88%;
  max-width: 780px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 20px 45px -10px rgba(33, 33, 33, 0.2), 0 0 0 1px rgba(216, 223, 233, 0.5);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.floating-dock-terminal:focus-within {
  box-shadow: 0 24px 50px -10px rgba(33, 33, 33, 0.3), 0 0 0 3px rgba(239, 240, 163, 0.6);
  background: rgba(255, 255, 255, 0.96);
}

/* Kompakt Widget Kartları & Apple iOS / macOS Tarzı Canlı İkonlar */
.compact-widget-card {
  padding: 1.25rem;
  border-radius: 1.75rem;
  min-height: 160px;
}

.terminal-font {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

