/* css/desktop.css */

/* Background neon ambient spheres */
.ambient-glow {
  position: fixed;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.15;
  z-index: -1;
  pointer-events: none;
  animation: float 20s infinite alternate ease-in-out;
}

.glow-1 {
  background: var(--accent-cyan);
  top: -100px;
  right: -50px;
  animation-delay: 0s;
}

.glow-2 {
  background: var(--accent-purple);
  bottom: -150px;
  left: -50px;
  animation-delay: -5s;
}

@keyframes float {
  0% { transform: translateY(0) scale(1); }
  50% { transform: translateY(30px) scale(1.1); }
  100% { transform: translateY(0) scale(1); }
}

/* Dashboard Layout */
.dashboard-wrapper {
  display: flex;
  min-height: 100vh;
  padding: 2.5rem;
  gap: 2.5rem;
  max-width: 1700px;
  margin: 0 auto;
}

/* Sidebar */
.sidebar {
  width: 320px;
  min-width: 320px;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 5rem);
  position: sticky;
  top: 2.5rem;
  padding: 2rem;
  z-index: 100;
  overflow: hidden;
}

.sidebar-brand {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.brand-text {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #ffffff 40%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-dot {
  color: var(--accent-cyan);
  -webkit-text-fill-color: var(--accent-cyan);
  display: inline-block;
  text-shadow: 0 0 10px rgba(0, 242, 254, 0.5);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex-grow: 1;
}

.nav-item {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--color-text-secondary);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  padding: 0.85rem 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  text-align: left;
  transition: all var(--transition-normal);
}

.nav-icon {
  width: 20px;
  height: 20px;
  stroke: var(--color-text-secondary);
  fill: none;
  stroke-width: 2;
  transition: stroke var(--transition-normal);
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--color-text-primary);
  border-color: rgba(255, 255, 255, 0.05);
}

.nav-item:hover .nav-icon {
  stroke: var(--color-text-primary);
}

.nav-item.active {
  background: rgba(127, 0, 255, 0.1);
  border-color: rgba(127, 0, 255, 0.2);
  color: var(--color-text-primary);
  box-shadow: inset 0 0 12px rgba(127, 0, 255, 0.1);
}

.nav-item.active .nav-icon {
  stroke: var(--accent-cyan);
  filter: drop-shadow(0 0 5px rgba(0, 242, 254, 0.5));
}

.nav-lock-indicator {
  margin-left: auto;
  font-size: 0.85rem;
  transition: transform var(--transition-spring);
}

.nav-item.active .nav-lock-indicator {
  transform: scale(1.15);
}

/* Sidebar Footer (Quick Memo Pad) */
.sidebar-footer {
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.memo-widget {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 1rem;
  transition: all var(--transition-normal);
}

.memo-widget:focus-within {
  border-color: rgba(127, 0, 255, 0.2);
  background: rgba(255, 255, 255, 0.02);
  box-shadow: 0 0 15px rgba(127, 0, 255, 0.08);
}

.memo-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 0.6rem;
  letter-spacing: 0.05em;
}

.memo-save-indicator {
  color: var(--accent-green);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.memo-save-indicator.saving {
  color: var(--accent-cyan);
  opacity: 1;
}

.memo-save-indicator.saved {
  opacity: 1;
}

#quick-memo-pad {
  width: 100%;
  height: 90px;
  background: transparent;
  border: none;
  resize: none;
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  line-height: 1.4;
  outline: none;
}

#quick-memo-pad::placeholder {
  color: var(--color-text-muted);
}

/* Main Content Workspace */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* Top bar widgets */
.top-bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.time-widget {
  padding: 1rem 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 250px;
}

.time-main {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  background: linear-gradient(135deg, #ffffff 60%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.date-sub {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  font-weight: 500;
  margin-top: 0.25rem;
}

.weather-widget {
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.weather-icon {
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-yellow);
}

.weather-sun {
  width: 24px;
  height: 24px;
  animation: spin 30s linear infinite;
}

.weather-info {
  display: flex;
  flex-direction: column;
}

.weather-temp {
  font-size: 1.1rem;
  font-weight: 700;
}

.weather-desc {
  font-size: 0.78rem;
  color: var(--color-text-secondary);
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.security-control {
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.security-control:hover {
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.lock-indicator {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.15);
  color: var(--accent-red);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.1);
  transition: all var(--transition-normal);
}

.security-control.unlocked .lock-indicator {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.15);
  color: var(--accent-green);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.1);
}

.lock-indicator svg {
  width: 20px;
  height: 20px;
}

.security-meta {
  display: flex;
  flex-direction: column;
}

.security-status-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--color-text-muted);
  letter-spacing: 0.05em;
}

.security-status-value {
  font-size: 0.95rem;
  font-weight: 700;
  transition: color var(--transition-normal);
}

.security-status-value.locked {
  color: var(--accent-red);
}

.security-status-value.unlocked {
  color: var(--accent-green);
}

/* Workspace Section headers */
.workspace-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-height: 400px;
}

.section-header {
  border-left: 3px solid var(--accent-purple);
  padding-left: 1.25rem;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  margin-top: 0.2rem;
}

/* Projects grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
}

/* Glassmorphic Project Card */
.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 2rem;
  height: 210px;
  cursor: pointer;
  text-decoration: none;
  overflow: hidden;
  animation: cardEntrance 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes cardEntrance {
  from { opacity: 0; transform: translateY(30px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(800px circle at var(--mouse-x, 0) var(--mouse-y, 0), rgba(255, 255, 255, 0.05), transparent 40%);
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.project-card:hover::before {
  opacity: 1;
}

.project-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), 0 0 15px rgba(var(--accent-rgb, 255, 255, 255), 0.15);
  border-color: rgba(var(--accent-rgb, 255, 255, 255), 0.3);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  z-index: 2;
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--accent-color, var(--color-text-secondary));
  transition: all var(--transition-normal);
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.02);
}

.project-card:hover .card-icon {
  color: #fff;
  background: var(--accent-color);
  box-shadow: 0 0 20px var(--accent-color);
  border-color: transparent;
}

.card-icon svg {
  width: 24px;
  height: 24px;
  transition: transform var(--transition-spring);
}

.project-card:hover .card-icon svg {
  transform: scale(1.1);
}

.card-body {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 2;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text-primary);
  letter-spacing: -0.01em;
}

.card-desc {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-weight: 500;
  z-index: 2;
}

.card-arrow {
  opacity: 0;
  transform: translateX(-10px);
  transition: all var(--transition-normal);
  color: var(--accent-color);
}

.project-card:hover .card-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* Special private card animation entrance */
.project-card.private-item {
  animation: privateCardEntrance 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes privateCardEntrance {
  0% { opacity: 0; transform: translateY(40px) scale(0.9) rotate(-1deg); filter: blur(5px); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(0); filter: blur(0); }
}

/* Responsiveness adjustments for Desktop */
@media (max-width: 1200px) {
  .dashboard-wrapper {
    padding: 1.5rem;
    gap: 1.5rem;
  }
  .sidebar {
    width: 260px;
    min-width: 260px;
    padding: 1.5rem 1rem;
  }
  .time-widget {
    min-width: 200px;
  }
}
