* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Cairo', sans-serif;
  user-select: none;
}

body {
  background: transparent;
  display: flex;
  justify-content: center;
  padding-top: 15px;
  overflow: hidden;
}

.island {
  background: rgba(18, 18, 22, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45);
  transition: all 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
  position: relative;
}

.island.collapsed {
  width: 310px;
  height: 44px;
  border-radius: 30px;
  cursor: pointer;
}

.island.collapsed:hover {
  transform: scale(1.03);
  border-color: rgba(255, 255, 255, 0.25);
}

.island.expanded {
  width: 440px;
  height: 365px;
  border-radius: 28px;
  cursor: default;
}

.pill-view {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  padding: 0 18px;
  font-size: 13px;
  font-weight: 600;
}

.island.expanded .pill-view {
  display: none;
}

.pill-right, .pill-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
}

.pill-center {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  color: #a5b4fc;
}

.equalizer {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}

.equalizer span {
  width: 2.5px;
  background: #38bdf8;
  border-radius: 2px;
  animation: eq 0.8s infinite ease-in-out alternate;
}
.equalizer span:nth-child(2) { animation-delay: 0.2s; }
.equalizer span:nth-child(3) { animation-delay: 0.4s; }

@keyframes eq {
  0% { height: 3px; }
  100% { height: 12px; }
}

.expanded-view {
  display: none;
  flex-direction: column;
  height: 100%;
  padding: 16px 20px;
  animation: fadeIn 0.35s ease;
}

.island.expanded .expanded-view {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.island-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 10px;
}

.tabs {
  display: flex;
  gap: 6px;
}

.tab-btn {
  background: transparent;
  border: none;
  color: #9ca3af;
  padding: 5px 12px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}

.tab-btn.active {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #d1d5db;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 12px;
}

.close-btn:hover {
  background: rgba(239, 68, 68, 0.3);
  color: #fff;
}

.tab-content {
  display: none;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.tab-content.active {
  display: flex;
}

/* قسم المهام */
.date-selector {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.date-selector input[type="date"] {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 12px;
  flex: 1;
  color-scheme: dark;
}

.nav-day, .today-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #fff;
  padding: 5px 10px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 12px;
}

.today-btn:hover, .nav-day:hover {
  background: rgba(255, 255, 255, 0.18);
}

.add-task-box {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.add-task-box input {
  flex: 1;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 8px 12px;
  color: #fff;
  font-size: 13px;
  outline: none;
}

.add-task-box input:focus {
  border-color: #6366f1;
}

.add-task-box button {
  background: #6366f1;
  border: none;
  color: #fff;
  width: 38px;
  border-radius: 12px;
  font-size: 20px;
  cursor: pointer;
}

.task-list {
  list-style: none;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 4px;
}

.task-list::-webkit-scrollbar { width: 4px; }
.task-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 4px; }

.task-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.05);
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 13px;
  transition: 0.2s;
}

.task-item.done span {
  text-decoration: line-through;
  color: #6b7280;
}

.task-left {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  flex: 1;
}

.delete-task {
  background: transparent;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 14px;
  opacity: 0.7;
}
.delete-task:hover { opacity: 1; }

/* قسم الميديا */
.media-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding: 10px 0;
}

.media-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.album-art {
  width: 54px;
  height: 54px;
  background: linear-gradient(135deg, #6366f1, #ec4899);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.media-info h4 { font-size: 15px; }
.media-info p { font-size: 12px; color: #9ca3af; }

.media-controls {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 15px 0;
}

.ctrl-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
}

.play-btn {
  background: #fff;
  color: #000;
  width: 52px;
  height: 52px;
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.06);
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px;
}

.volume-control input[type="range"] {
  flex: 1;
  accent-color: #6366f1;
}

/* قسم الوقت والمؤقت */
.mode-switcher {
  display: flex;
  background: rgba(255, 255, 255, 0.06);
  padding: 4px;
  border-radius: 14px;
  margin-bottom: 12px;
}

.mode-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: #9ca3af;
  padding: 6px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}

.mode-btn.active {
  background: #6366f1;
  color: #fff;
}

.time-mode {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  padding-bottom: 6px;
}

.time-mode.active {
  display: flex;
}

.presets-row {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  justify-content: center;
}

.preset-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #e5e7eb;
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 12px;
  cursor: pointer;
}

.preset-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.custom-min-box {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  padding-right: 6px;
}

.custom-min-box input {
  width: 55px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 12px;
  outline: none;
  text-align: center;
}

.custom-min-box input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.custom-min-box button {
  background: #6366f1;
  border: none;
  color: #fff;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}

.timer-display {
  font-size: 46px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #a5b4fc;
  font-variant-numeric: tabular-nums;
}

.stopwatch-font {
  margin-top: 24px;
  color: #38bdf8;
}

.stopwatch-font .ms {
  font-size: 24px;
  color: #7dd3fc;
}

.timer-controls {
  display: flex;
  gap: 12px;
}

.timer-btn {
  padding: 8px 26px;
  border-radius: 14px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  font-size: 13px;
  transition: 0.2s;
}

.timer-btn.start { background: #10b981; color: #fff; }
.timer-btn.reset { background: rgba(255, 255, 255, 0.12); color: #fff; }
