body {
    opacity: 0;              /* start hidden */
    transition: opacity 0.5s ease-in-out, background 0.5s ease;
    font-family: 'Cherry Bomb One', cursive;
    background: linear-gradient(120deg, #ffe0e6, #d0e6ff); /* soft pink → soft blue */
    color: #004080;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
}

#timer {
    font-size: clamp(4rem, 10vw, 6rem); /* scales with screen size */
    letter-spacing: 2px;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.85);
    padding: 5px 10px; /* gives some spacing if using background */
    border-radius: 8px; /* rounded edges for a nice look */
    color: white; /* high-contrast color */
    margin-bottom: 20px;
    text-align: center;
    transition: transform 0.3s ease;
}

#timer.running {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

#mode-indicator {
    color: white; /* high-contrast color */
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
    padding: 3px 8px;
    border-radius: 6px;
}

#controls button {
    margin: 5px;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255,255,255,0.85), rgba(230,230,230,0.85));
    backdrop-filter: blur(4px); /* optional glass effect */
    box-shadow: 2px 2px 10px rgba(0,0,0,0.1);
    transition: all 0.2s ease-in-out;
}

#controls button:hover {
    background: rgba(255,255,255,1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transform: translateY(-2px) scale(1.05);
}

#progress-bar-container {
    width: 80%;
    height: 12px;
    background: rgba(255,255,255,0.3);
    margin-top: 20px;
    border-radius: 10px;
    overflow: hidden;
}

#progressBar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ffb3ba, #bae1ff);
    border-radius: 10px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1); /* smooth easing */
}

.hidden-videos {
    display: none; /* hides all embedded YouTube videos cleanly */
}

/* Optional header style */
header {
    font-size: 2rem;
    color: #004080;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 6px rgba(0,0,0,0.2);
}

.mode-toggle-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
}

.mode-toggle-container button {
    padding: 8px 16px;
    font-family: 'Cherry Bomb One', cursive;
    font-size: 16px;
    cursor: pointer;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255,255,255,0.85), rgba(230,230,230,0.85));
    backdrop-filter: blur(4px); /* optional glass effect */
    color: #004080;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.1);
    transition: all 0.2s ease-in-out;
}

.mode-toggle-container button:hover {
    background: rgba(255,255,255,1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transform: translateY(-2px) scale(1.05);
}
/* Container for add-time buttons */
.add-time-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 10px;
}

/* Styling for each add-time button */
.add-time-buttons button {
    padding: 10px 20px;
    font-size: 16px;
    font-family: 'Cherry Bomb One', cursive;
    cursor: pointer;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255,255,255,0.85), rgba(230,230,230,0.85));
    backdrop-filter: blur(4px); /* optional glass effect */
    color: #004080;
    box-shadow: 0 4px 10px rgba(0, 115, 230, 0.4);
    transition: all 0.2s ease;
}

.add-time-buttons button:hover {
    background-color: #005bb5;
    box-shadow: 0 6px 12px rgba(0, 91, 181, 0.5);
    transform: translateY(-2px) scale(1.05);
}

.add-time-buttons button:active {
    transform: translateY(1px);
    box-shadow: 0 3px 7px rgba(0, 115, 230, 0.4);
}

#pomodoro-container {
    transition: background 0.3s ease;
    padding: 20px;
    border-radius: 10px;
    /* Keep other styles you have */
}

#background-uploader {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-family: 'Cherry Bomb One', sans-serif;
}

/* Hide the real file input */
#background-uploader input[type="file"] {
    display: none;
}

/* Style the label as a button */
#background-uploader label {
    padding: 6px 12px;
    font-size: 14px;
    color: white;
    background: linear-gradient(135deg, #ffb6c1, #87ceeb);
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    box-shadow: 0 3px 6px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
}

#background-uploader label:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.3);
}

#background-uploader label:active {
    transform: translateY(0);
    box-shadow: 0 3px 6px rgba(0,0,0,0.2);
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* slightly darker overlay */
    z-index: 0; /* behind your content but above background */
    pointer-events: none; /* lets you still click buttons */
}

#pomodoro-container,
#timer,
#controls,
.mode-toggle-container,
.add-time-buttons,
header {
    position: relative;
    z-index: 1;
}

@keyframes progressGradient {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}
#progressBar {
    background: linear-gradient(270deg, #ffb3ba, #bae1ff, #ffb3ba);
    background-size: 400% 400%;
    animation: progressGradient 10s ease infinite;
}




#pomodoro-container {
    display: flex;
    flex-direction: column;
    align-items: center; /* centers children horizontally */
}

#timer-wrapper {
    display: flex;
    align-items: center; /* vertically center Loaf relative to timer */
    justify-content: center;
    position: relative;
}

#loaf-name {
    position: absolute;
    top: 100%; /* just below Loaf */
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Cherry Bomb One', cursive;
    color: white;
    font-size: 0.9rem;
    text-shadow: 0 2px 6px rgba(0,0,0,0.8);
    margin-top: 4px;
}
#mascot-container:hover::after {
    content: attr(data-name); /* shows "Loaf" or "Muffin" */
    position: absolute;
    top: -30px;      /* adjust so it’s above the image */
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    pointer-events: none;
    white-space: nowrap;
}

#loaf-speech {
    position: absolute;
    bottom: 100%; /* above Loaf */
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 6px 10px;
    border-radius: 10px;
    font-family: 'Cherry Bomb One', cursive;
    font-size: 0.9rem;
    text-align: center;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 3;
}

#loaf-speech.show {
    opacity: 1;
    transform: translateX(-50%) translateY(-20px);
}

#loaf-speech::after {
    content: '';
    position: absolute;
    top: 100%; /* arrow pointing down */
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: rgba(0,0,0,0.8) transparent transparent transparent;
}

/* Gear button */
#settings-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    font-size: 24px;
    background: linear-gradient(135deg, #ffb6c1, #87ceeb);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    transition: all 0.2s ease-in-out;
}

#settings-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0,0,0,0.4);
}

/* Modal overlay */
#settings-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

#settings-modal.hidden {
    display: none;
}

/* Modal content */
.settings-content {
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(6px);
    padding: 25px 30px;
    border-radius: 14px;
    font-family: 'Cherry Bomb One', cursive;
    text-align: center;
    width: 300px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    animation: popIn 0.3s ease-out;
}

/* Pop-in animation */
@keyframes popIn {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Modal headers and labels */
.settings-content h2 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.5rem;
    color: #004080;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.2);
}

.settings-content label {
    display: block;
    margin: 12px 0 6px 0;
    font-size: 1rem;
    color: #004080;
}

/* Buttons inside modal */
.settings-content button {
    margin-top: 12px;
    padding: 8px 16px;
    font-family: 'Cherry Bomb One', cursive;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #ffb6c1, #87ceeb);
    color: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: all 0.2s ease-in-out;
}

.settings-content button:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

.settings-content button:active {
    transform: translateY(1px);
    box-shadow: 0 3px 7px rgba(0,0,0,0.2);
}

/* Font dropdown */
#fontSelect {
    width: 100%;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 12px;
    border: 1px solid rgba(0,0,0,0.2);
    cursor: pointer;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(4px);
    transition: all 0.2s ease;
}

#fontSelect:hover {
    background: rgba(255,255,255,1);
}

.preset-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
}

.preset-btn {
    padding: 6px 12px;
    font-family: 'Cherry Bomb One', cursive;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #ffb6c1, #87ceeb);
    color: white;
    box-shadow: 0 3px 6px rgba(0,0,0,0.2);
    transition: all 0.2s ease-in-out;
}

.preset-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 5px 10px rgba(0,0,0,0.3);
}

.preset-btn:active {
    transform: translateY(1px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.2);
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    color: #004080;
    transition: color 0.2s ease;
}

.close-btn:hover {
    color: #ff6b81; /* subtle hover color */
}

/* Session counter styling */
#session-counter {
    font-family: 'Cherry Bomb One', cursive;
    color: white;
    text-shadow: 0 2px 6px rgba(0,0,0,0.8);
    margin-top: 12px;
    font-size: 1.1rem;
}

/*quick notes */
/* Quick Notes container */
#quick-notes-container {
    position: fixed;
    top: 70px;
    right: 20px;
    width: 200px;
    font-family: 'Cherry Bomb One', cursive;
    color: white;
    background: rgba(0,0,0,0.35);
    padding: 8px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 1001;
    backdrop-filter: blur(4px); /* glassy effect */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#quick-notes-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.4);
}

/* Header */
#quick-notes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

#quick-notes-header span {
    font-size: 0.9rem;
}

#quick-notes-header button {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #ff6b81;
    font-size: 1rem;
    transition: color 0.2s ease;
}

#quick-notes-header button:hover {
    color: #ffd1dc;
}

/* Notes list */
#quick-notes-list {
    max-height: 100px;
    overflow-y: auto;
    margin-bottom: 6px;
}

.quick-note {
    background: rgba(255,255,255,0.15);
    padding: 4px 8px;
    border-radius: 6px;
    margin-bottom: 4px;
    font-size: 0.85rem;
    transition: background 0.2s ease;
}

.quick-note:hover {
    background: rgba(255,255,255,0.25);
}

/* Add note button */
#add-note-btn {
    width: 100%;
    padding: 4px 0;
    font-size: 0.9rem;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #ffb6c1, #87ceeb);
    color: white;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transition: all 0.2s ease-in-out;
}

#add-note-btn:hover {
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.quick-note {
    background: rgba(255,255,255,0.15);
    padding: 4px 8px;
    border-radius: 6px;
    margin-bottom: 4px;
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s ease, opacity 0.2s ease;
}

.quick-note:hover {
    background: rgba(255,255,255,0.25);
}

.quick-note.done span {
    text-decoration: line-through;
    opacity: 0.6; /* slightly faded but still readable */
}

/* Individual delete button */
.note-delete-btn {
    background: transparent;
    border: none;
    color: #ff6b81;
    font-size: 0.9rem;
    cursor: pointer;
    margin-left: 8px;
    transition: color 0.2s ease;
}

.note-delete-btn:hover {
    color: #ffd1dc;
}


.quick-note {
    position: relative; /* for pseudo-element positioning */
    background: rgba(255,255,255,0.15);
    padding: 4px 8px;
    border-radius: 6px;
    margin-bottom: 4px;
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s ease, opacity 0.2s ease;
}

.quick-note.done {
    opacity: 0.6;
}

/* Full-width line */
.quick-note.done::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;  /* thickness of the line */
    background-color: white;  /* line color */
    transform: translateY(-50%);
    pointer-events: none; /* keeps clicks working */
}

@keyframes jump {
    0%   { transform: translateY(0); }
    50%  { transform: translateY(-18px); }
    100% { transform: translateY(0); }
}

#timer-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

#mascot-container {
  position: absolute;
  top: 23%;              /* middle of the timer wrapper */
  left: 70%;            /* right next to the timer */
  transform: translateY(-50%) translateX(20px); /* small gap */
  width: 70px;
  height: auto;
  z-index: 10;           /* make sure it’s above the timer */
}

#mascot-container img {
  width: 70px;
  height: auto;
}

/* Mood selector styles */
#mood-selector {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 10px; /* space between buttons */
    background: rgba(0,0,0,0.5); /* semi-transparent background */
    padding: 10px 15px;
    border-radius: 12px;
    z-index: 1000; /* make sure it’s on top */
}

#mood-selector .mood-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background-color: #4CAF50; /* default button color, can be changed dynamically */
    color: white;
    font-weight: bold;
    transition: transform 0.2s, background-color 0.2s;
}

#mood-selector .mood-btn:hover {
    transform: scale(1.1);
    background-color: #66bb6a;
}

.mood-btn {
  opacity: 0.6;
  transition: opacity 0.2s, transform 0.2s;
}

.mood-btn.active {
  opacity: 1;
  transform: scale(1.1);
  border: 2px solid #fff; /* optional: adds a border to highlight */
}

