:root {
  /* Color Palette */

  /* Pentru texte generale (nu titluri): */
  --text-primary: #e5e5e5; 
  /* Pentru texte secundare */
  --text-secondary: #a8d2ff;


  --text-cyan: #4fc3f7;
  --text-green: var(--accent-green);
  --border-color: rgba(79, 195, 247, 0.22);
  /* Pentru texte titluri, subtitluri, icon-uri */

  --accent-cyan: #4fc3f7;
  --accent-green: #00ff88;

  /* Typography */
  --font-primary: 'Rajdhani', sans-serif;
  --font-mono: 'Orbitron', monospace;
  
  /* Layout */
  --sidebar-width: 330px;
  --border-radius: 8px;
  --border-radius-lg: 16px;
}
h3 {
  color: #4fc3f7 ;
  font-family: var(--font-mono) ;
}

/* ===== NOTIFICATIONS BELL & BADGE ===== */
#notification-btn {
  background: transparent;
  color: #4fc3f7;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: var(--transition);
  font-size: 18px;
}

#notification-btn:hover,
#notification-btn:focus {
  background: var(--hover-bg);
  border-color: #4fc3f7;
  color: var(--text-primary);
  box-shadow: 0 0 10px #4fc3f7;
}

#notification-btn i.fas.fa-bell {
  font-size: 20px;
  color: inherit;
  transition: color 0.2s;
}

#notification-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  background: #e53935;
  color: #fff;
  border-radius: 50%;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  box-shadow: 0 0 6px #e53935cc;
  z-index: 2;
  pointer-events: none;
  transition: background 0.2s, color 0.2s;
}



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

/* ===== CSS CUSTOM PROPERTIES (DESIGN TOKENS) ===== */


/* ===== GLOBAL RESET & BASE STYLES ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  line-height: 1.5;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  color: var(--text-primary);
  height: 100vh;
  overflow: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== ACCESSIBILITY UTILITIES ===== */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}



/* ===== LAYOUT COMPONENTS ===== */









/* ===== INTERACTIVE ELEMENTS ===== */

/* Buttons Base */
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: transparent;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Icon centering for all buttons */
button i {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* Button Primary Style */
.btn-primary {
  background: linear-gradient(135deg, var(--accent-blue), #4fc3f7);
  color: var(--primary-bg);
  padding: 12px 20px;
  border-radius: var(--border-radius);
  font-weight: 600;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
}



/* Task delete hover moved to task-enhancements.css */

/* Input Elements */
input[type="text"] {
  font-family: inherit;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

input[type="text"]:focus {
  outline: none;
  border-color: #4fc3f7;
  box-shadow: 0 0 15px rgba(79, 195, 247, 0.3);
}




@keyframes jarvis-glow-in {
  from {
    box-shadow: 0 0 0 rgba(79, 195, 247, 0);
  }
  to {
    box-shadow: 0 2px 10px rgba(79, 195, 247, 0.1);
  }
}

@keyframes jarvis-active-pulse {
  0%, 100% { 
    opacity: 1; 
    transform: translateY(-50%) scale(1);
    text-shadow: 0 0 8px rgba(79, 195, 247, 0.8);
  }
  50% { 
    opacity: 0.6; 
    transform: translateY(-50%) scale(1.1);
    text-shadow: 0 0 15px rgba(79, 195, 247, 1);
  }
}

@keyframes jarvis-edge-glow {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ===== MOBILE RESPONSIVE - JARVIS OPTIMIZED ===== */
@media (max-width: 768px) {
  .conversation-actions {
    opacity: 1;
    gap: 4px;
  }
  
  .conversation-actions button {
    width: 28px;
    height: 28px;
    font-size: 10px;
    border-radius: 4px;
  }
  
  .conversation-actions button i {
    font-size: 11px;
  }
  
  .sidebar-history-item.active-conversation::before {
    font-size: 8px;
    left: 8px;
  }
  
  .sidebar-history-item {
    padding: 6px 8px 6px 20px; /* Adjusted for mobile */
    min-height: 36px;
    margin-bottom: 4px;
    border-radius: 6px;
  }
  
  .sidebar-history-item:hover {
    transform: translateX(1px) scale(1.005);
  }
  
  .sidebar-history-item.active-conversation {
    transform: translateX(3px) scale(1.01) !important;
  }
}

/* Loading Placeholder Animation */
.loading-placeholder {
  animation: loadingPulse 1.5s ease-in-out infinite;
  opacity: 0.6;
}

@keyframes loadingPulse {
  0%, 100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}


/* ===== SCROLLBAR STYLING ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, rgba(79, 195, 247, 0.6), rgba(0, 212, 255, 0.4));
  border-radius: 3px;
  border: 1px solid rgba(79, 195, 247, 0.3);
  box-shadow: 0 0 6px rgba(79, 195, 247, 0.3);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, rgba(79, 195, 247, 0.8), rgba(0, 212, 255, 0.6));
  box-shadow: 0 0 10px rgba(79, 195, 247, 0.5);
}

/* Specific sidebar scrollbar */
.sidebar::-webkit-scrollbar {
  width: 8px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, rgba(79, 195, 247, 0.6), rgba(0, 212, 255, 0.4));
  border-radius: 4px;
  border: 1px solid rgba(79, 195, 247, 0.3);
  box-shadow: 0 0 6px rgba(79, 195, 247, 0.3);
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, rgba(79, 195, 247, 0.8), rgba(0, 212, 255, 0.6));
  box-shadow: 0 0 10px rgba(79, 195, 247, 0.5);
}

/* For Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #4fc3f7 transparent;
}

/* ===== ANIMATIONS ===== */
@keyframes checkmark {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes progressShine {
  0% { left: -100%; }
  100% { left: 100%; }
}

@keyframes deleteShake {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-3deg); }
  75% { transform: rotate(3deg); }
}

@keyframes moveUp {
  0% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(-10px); opacity: 0.7; }
  100% { transform: translateY(0); opacity: 1; }
}

@keyframes moveDown {
  0% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(10px); opacity: 0.7; }
  100% { transform: translateY(0); opacity: 1; }
}

@keyframes groupCollapse {
  from {
    max-height: 1000px;
    opacity: 1;
  }
  to {
    max-height: 0;
    opacity: 0;
  }
}

@keyframes groupExpand {
  from {
    max-height: 0;
    opacity: 0;
  }
  to {
    max-height: 1000px;
    opacity: 1;
  }
}

/* ===== UTILITY CLASSES ===== */
.moving-up { animation: moveUp 0.3s ease-out; }
.moving-down { animation: moveDown 0.3s ease-out; }
/* Animations for sidebar tasks only - modal has its own */
#todo-list .task-moving-up { animation: moveUp 0.3s ease-out; }
#todo-list .task-moving-down { animation: moveDown 0.3s ease-out; }
.collapsing { animation: groupCollapse 0.3s ease-out forwards; }
.expanding { animation: groupExpand 0.3s ease-out forwards; }

/* ===== FOCUS STATES FOR ACCESSIBILITY ===== */
button:focus,
input:focus,
.task-checkbox:focus {
  outline: 2px solid rgba(79, 195, 247, 0.5);
  outline-offset: 2px;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  :root {
    --sidebar-width: 240px;
  }
  
  

  

}

/* ===== ACCESSIBILITY & MOTION PREFERENCES ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-color-scheme: dark) {
  .task-group-header {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  }
}

/* ===== MISC IMPROVEMENTS ===== */
.confirm-dialog-overlay {
  z-index: 999999 !important;
}

#custom-confirm-dialog button {
  background: #4fc3f7 !important;
  border: none !important;
  color: var(--text-primary) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

#custom-confirm-dialog button:hover {
  background: #3a7bd5 !important;
}


/* Focus visible for better keyboard navigation */
*:focus-visible {
  outline: 2px solid #4fc3f7;
  outline-offset: 2px;
}

/* Performance optimizations */
.performance-optimized {
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Pause Jarvis animations when modals are open */
body.modal-open .performance-layer {
  animation-play-state: paused !important;
}

body.modal-open .jarvis-background * {
  animation-play-state: paused !important;
}

body.modal-open .performance-layer * {
  animation-play-state: paused !important;
}

/* ===== NOTIFICATION ANIMATIONS ===== */
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* ===== CALENDAR FOLDER CARD ===== */
.calendar-folder-card {
  width: 200px !important;
  height: 150px !important;
  padding: 16px !important;
  background: rgba(30, 30, 30, 0.95);
  border: 1px solid rgba(79, 195, 247, 0.3);
  backdrop-filter: blur(10px);
}

.calendar-folder-card .folder-icon {
  margin-bottom: 8px;
}

.calendar-folder-card .folder-icon i {
  color: var(--accent-cyan);
  font-size: 24px;
}

.calendar-folder-card .folder-name {
  color: var(--accent-cyan);
  font-weight: 600;
  margin-bottom: 12px;
  font-size: 14px;
}

.calendar-folder-card .calendar-stats {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  width: 100%;
}

.calendar-folder-card .calendar-stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.8);
}

.calendar-folder-card .calendar-stat-item i {
  color: var(--accent-cyan);
  font-size: 10px;
  width: 12px;
}

.calendar-folder-card .calendar-stat-number {
  margin-left: auto;
  color: var(--accent-cyan);
  font-weight: 600;
  padding: 2px 6px;
  background: rgba(79, 195, 247, 0.1);
  border-radius: 8px;
  font-size: 10px;
}

.calendar-folder-card .calendar-open-btn {
  background: rgba(79, 195, 247, 0.1);
  border: 1px solid rgba(79, 195, 247, 0.3);
  color: var(--accent-cyan);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

.calendar-folder-card .calendar-open-btn:hover {
  background: rgba(79, 195, 247, 0.2);
  border-color: rgba(79, 195, 247, 0.5);
}

.calendar-folder-card .calendar-open-btn i {
  margin-right: 4px;
  font-size: 9px;
}
