/* 1. Global Color Variables & Theme Setup */
:root {
  --bg-color: #0f172a;        /* Deep slate dark background */
  --card-bg: #1e293b;         /* Elevated card surface */
  --card-border: #334155;     /* Subtle border lines */
  --accent-color: #6366f1;    /* Vibrant Indigo accent */
  --text-primary: #f8fafc;    /* Crisp white text */
  --text-secondary: #94a3b8;  /* Muted secondary gray text */
}

/* 2. Global Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 28px 16px;
}

/* our main container*/
.app-container{
    width: 100%;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/*header*/
.header{
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 16px;
border-bottom: 1px solid var(--card-border);
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.logo span{
    color: var(--accent-color);
}

.stats-badge {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 8px 16px;
  border-radius: 100px; 
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

/*Dashboard Grid Layout */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media(max-width:768px){
    .dashboard-grid{
        grid-template-columns: 1fr;
    }
}

/*Card container same styles for all*/
.card{
    background-color: var(--bg-color);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 24px;
    display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.4);
}

/*Styling for timer Card*/
.timer-card{
  align-items: center;
  text-align: center;
}

/* Mode Toggle Switcher */
.mode-toggles {
  display: flex;
  background: #0f172a;
  padding: 4px;
  border-radius: 12px;
  gap: 4px;
  margin-bottom: 20px;
}

.mode-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mode-btn.active {
  background: var(--accent-color);
  color: #ffffff;
}

/* Digital Clock Numbers */
.timer-display {
  font-size: 4rem;
  font-weight: 700;
  letter-spacing: -2px;
  margin: 10px 0 24px;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

/* Timer Control Buttons */
.timer-controls {
  display: flex;
  gap: 12px;
}
.btn {
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-primary{
  background: var(--accent-color);
  color: #ffffff;
}
.btn-primary:hover{
  background: #4f46e5;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
  background: #334155;
  color: #ffffff;
}

.btn-secondary:hover {
  background: #475569;
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
}

.btn-outline:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.card h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.subtitle {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.task-input-group {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.task-input-group input {
  flex: 1;
  background: #0f172a;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 10px 14px;
  color: #ffffff;
  outline: none;
  font-size: 0.9rem;
}

.task-input-group input:focus {
  border-color: var(--accent-color);
}

.btn-small {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.task-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.task-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0f172a;
  border: 1px solid var(--card-border);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
}

.task-item.completed span {
  text-decoration: line-through;
  color: var(--text-secondary);
}

.task-actions {
  display: flex;
  gap: 8px;
}

.task-action-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.task-action-btn:hover {
  opacity: 1;
}


.limit-msg {
  display: none;
  font-size: 0.8rem;
  color: #ef4444; 
  margin-top: 8px;
}

.sound-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.sound-btn {
  background: #0f172a;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.sound-btn:hover {
  border-color: var(--accent-color);
  background: rgba(99, 102, 241, 0.05);
}

.sound-btn.playing {
  border-color: var(--accent-color);
  background: rgba(99, 102, 241, 0.15);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.25);
}

.sound-icon {
  font-size: 1.5rem;
}

.sound-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.sound-btn.playing .sound-name {
  color: #ffffff;
}

.volume-container {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 4px;
}
.vol-icon {
  font-size: 0.9rem;
  opacity: 0.7;
}

#volume-slider {
  flex: 1;
  accent-color: var(--accent-color);
  cursor: pointer;
}

.notes-card {
  display: flex;
  flex-direction: column;
}

.notes-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.notes-footer {
  font-size: 0.75rem;
  color: var(--text-secondary); 
  margin-top: 8px;
  text-align: right;
  opacity: 0.7;
}

.save-status {
  font-size: 0.75rem;
  color: #10b981;
  font-weight: 500;
  opacity: 0.8;
}

#scratchpad {
  width: 100%;
  flex: 1;
  min-height: 120px;
  background: #0f172a;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 12px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.5;
  resize: none;
  outline: none;
  transition: border-color 0.2s ease;
}

#scratchpad:focus {
  border-color: var(--accent-color);
}