:root{
  --accent:#ffffff;
  --pill-bg:rgba(255,255,255,0.12);
  --white: #fff;
  --muted: rgba(255,255,255,0.75);
  --glass: rgba(0,0,0,0.55);
}

/* Background */
html,body{height:100%;margin:0;font-family:Inter,system-ui,Arial,sans-serif}
body{
    transition: background-image 0.4s ease-in-out;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  background: url('photo1.webp') center/cover no-repeat;
  position:relative;
  color:var(--white);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  .fade-bg-out {
  opacity: 0;
  transition: opacity 0.4s ease;
}

.fade-bg-in {
  opacity: 1;
  transition: opacity 0.4s ease;
}
}

/* dark overlay for contrast */
.bg-overlay{
  position:fixed;inset:0;background:rgba(14,20,30,0.36);z-index:0;
}

header{
  position:fixed;top:24px;left:32px;z-index:5;display:flex;align-items:center;gap:12px;
}
.logo{font-size:1.2rem;font-weight:600;letter-spacing:0.2px}
.icon-btn{
  background:transparent;color:var(--white);border:none;font-size:1.1rem;cursor:pointer;padding:8px;border-radius:8px;
}

/* main centered UI */
main{position:relative;z-index:2;text-align:center;display:flex;flex-direction:column;align-items:center;gap:18px}

/* mode pills */
.mode-row{display:flex;gap:10px;margin-bottom:6px}
.mode{
  padding:8px 14px;border-radius:999px;border:none;background:var(--pill-bg);color:var(--white);cursor:pointer;font-weight:500;opacity:0.95;
}
.mode.active{background:var(--white);color:#000;box-shadow:0 6px 20px rgba(0,0,0,0.25)}

/* timer + ring */
.timer-wrap{position:relative;display:flex;align-items:center;flex-direction:column}
.timer{
  font-size:5.2rem;font-weight:800;letter-spacing:0.6px;margin:8px 0;background:linear-gradient(180deg,#fff,#eaeaea);-webkit-background-clip:text;background-clip:text;color:transparent;
  text-shadow:0 2px 0 rgba(0,0,0,0.18);
}
/* Progress bar container */
.progress-bar {
  width: 200px;
  height: 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  margin-top: 8px;
  overflow: hidden;
  box-shadow: 0 0 6px rgba(255,255,255,0.2);
}

/* Progress fill */
.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #fff, #eaeaea);
  border-radius: 6px 0 0 6px;
  transition: width 0.4s linear;
}

/* controls */
.controls{display:flex;gap:12px;justify-content:center}
button.primary{
  background:#fff;color:#000;padding:10px 20px;border-radius:999px;border:none;font-weight:700;cursor:pointer;box-shadow:0 8px 18px rgba(0,0,0,0.25)
}
button.ghost{background:transparent;border:none;color:var(--white);padding:8px 12px;border-radius:999px;cursor:pointer}


/* settings modal */
/* Modal overlay */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transform: scale(0.9);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.modal.show {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

/* Inner container */
.modal-inner {
  width: min(920px, 96%);
  background: linear-gradient(145deg, #0f0f0f, #1a1a1a);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  gap: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7);
  transition: transform 0.3s ease;
}

/* Sidebar */
.modal-sidebar {
  width: 170px;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  padding-right: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.modal-sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.side-item {
  background: transparent;
  color: #fff;
  border: none;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  opacity: 0.8;
  transition: background 0.3s ease, opacity 0.3s ease;
}

.side-item:hover {
  background: rgba(255, 255, 255, 0.08);
  opacity: 1;
}

.side-item.active {
  background: rgba(255, 82, 82, 0.2);
  border-left: 4px solid #ff5252;
  padding-left: 6px;
  opacity: 1;
}

/* Body */
.modal-body {
  flex: 1;
  padding-left: 14px;
  color: #fff;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

/* Header */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  font-weight: 700;
}

.close-x {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.close-x:hover {
  color: #ff5252;
}

/* Actions */
.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-primary {
  background: #ff5252;
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  border: none;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-primary:hover {
  background: #ff7070;
}

.btn-gray {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 10px 14px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
}

.btn-gray:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* Responsive */
@media (max-width: 640px) {
  .modal-inner {
    flex-direction: column;
    padding: 14px;
  }
  .modal-sidebar {
    width: 100%;
    flex-direction: row;
    gap: 8px;
    border-right: none;
    padding-right: 0;
  }
  .modal-body {
    padding-left: 0;
  }
}















/* General form styles */
.settings-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  font-family: 'Inter', sans-serif;
  color: #fff;
}

/* Labels */
.settings-form label {
  font-size: 0.9rem;
  font-weight: 500;
  display: block;
  margin-bottom: 0.3rem;
}

/* Input Row (number + minutes text) */
.input-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Custom number input */
input[type="number"] {
  -moz-appearance: textfield; /* remove arrows in Firefox */
  appearance: none;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.05);
  color: #fff;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  font-size: 0.9rem;
  width: 70px;
  text-align: center;
  transition: all 0.2s ease;
}

input[type="number"]:focus {
  border-color: #ff6b6b;
  background: rgba(255,255,255,0.1);
  outline: none;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none; /* remove arrows in Chrome */
  margin: 0;
}

/* Muted text for "minutes" */
.muted {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
}

/* Custom dropdown */
/* Custom dropdown */
.custom-select {
  position: relative;
  display: inline-block;
  width: 100%;
}

.custom-select select {
  /* This is the key part for styling the native select element */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background: #333; /* Dark gray background */
  border: 1px solid #555; /* Slightly lighter dark gray border */
  border-radius: 6px;
  padding: 0.4rem 2rem 0.4rem 0.6rem;
  font-size: 0.9rem;
  color: #ffffff; /* White text */
  cursor: pointer;
  width: 100%;
  transition: all 0.2s ease;
}

/* Style the custom arrow you added */
.custom-select::after {
  content: "▼";
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.6rem;
  color: #fff; /* White arrow */
  pointer-events: none;
}

/* Style the focus state */
.custom-select select:focus {
  border-color: #ff6b6b;
  background: #444;
  outline: none;
}



/* Style for the visible part of the dropdown */
/* Style for the visible part of the dropdown */
.custom-select .select-selected {
  background-color: #333; /* Dark gray background */
  color: #fff; /* White text */
  border: 1px solid #555; /* Slightly lighter dark gray border */
}

/* Style for the dropdown arrow when it's active (open) */
.custom-select .select-selected.select-arrow-active {
  background-color: #444; /* A slightly lighter dark gray when open */
}

/* Style for the list of options */
.custom-select .select-items {
  background-color: #333; /* Dark gray background for the options list */
  border: 1px solid #555; /* Slightly lighter dark gray border */
}

/* Style for each option in the list */
.custom-select .select-items div {
  color: #fff; /* White text for all options */
  border-bottom: 1px solid #555; /* Separator line between options */
}

/* Remove the border from the last option */
.custom-select .select-items div:last-child {
  border-bottom: none;
}

/* Style for an option when you hover over it or when it's the selected item */
.custom-select .select-items div:hover,
.same-as-selected {
  background-color: #555; /* Lighter dark gray on hover and for the selected item */
  color: #fff; /* White text */
}








.bg-noise-player {
  position: fixed;
  bottom: 120px; /* above the YT player (which is at 20px bottom) */
  left: 20px;
  width: 100%;
  padding: 12px;
  background-color: rgba(30, 30, 30, 0.6);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-family: 'Roboto', sans-serif;
  z-index: 1001;
}

.bg-noise-player .noise-info {
  flex-grow: 1;
}

.bg-noise-player .noise-title {
  font-weight: 500;
  font-size: 15px;
}

.bg-noise-player .noise-status {
  font-size: 13px;
  color: #b3b3b3;
}

.bg-noise-player .noise-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bg-noise-player #noiseToggleBtn {
  background: transparent;
  border: none;
  color: #e0e0e0;
  cursor: pointer;
  font-size: 22px;
  padding: 6px;
  border-radius: 50%;
  transition: color 0.2s;
}

.bg-noise-player #noiseToggleBtn:hover {
  color: #ff5252;
}

.bg-noise-player #volumeSlider {
  width: 120px;
}

#volumeSlider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 8px;
  background: #3d3d3d6d 0%;
  cursor: pointer;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
  transition: background 0.3s ease;
  position: relative;
  overflow: hidden;
}



#volumeSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 220px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow:
    0 0 6px 2px rgba(0, 0, 0, 0.8),
    inset 0 2px 5px rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
  margin-top: -7px; /* center the thumb */
  position: relative;
  z-index: 2;
}

#volumeSlider::-webkit-slider-thumb:hover {
  background: #ffffff;
  box-shadow:
    0 0 10px 3px rgb(255, 255, 255),
    inset 0 3px 6px rgba(255, 255, 255, 0.8);
  transform: scale(1.15);
}

#volumeSlider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow:
    0 0 6px 2px rgba(255, 82, 82, 0.8),
    inset 0 2px 5px rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

#volumeSlider::-moz-range-thumb:hover {
  background: #ffffff;
  box-shadow:
    0 0 10px 3px rgb(255, 255, 255),
    inset 0 3px 6px rgba(255, 255, 255, 0.8);
  transform: scale(1.15);
}





/* Floating toggle button bottom-left */
.audio-toggle-btn {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 1500;
  background: rgba(255, 255, 255, 0.9);
  color: #000;
  border: none;
  padding: 14px 18px;
  border-radius: 9999px;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 6px 12px rgba(255, 255, 255, 0.6);
  transition: background-color 0.3s;
}
.audio-toggle-btn:hover {
  background: #ffa7a7;
}

.audio-panel {
  position: fixed;
  bottom: 70px;
  left: 20px;
  width: max-content; /* shrink to fit content */
  min-width: 320px; /* prevent getting smaller than player */
  max-width: 90vw;
  max-width: 90vw;
  background: transparent;

  border-radius: 16px;
  padding: 20px;
  
  display: hidden;
  flex-direction: column;
  gap: 16px;
  color: #fff;
  font-family: 'Roboto', sans-serif;
  transform: translateY(150%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s ease, opacity 0.4s ease;
  z-index: 1600;
  /* add this */
  overflow: visible; /* so the close button can overflow if needed */
  position: fixed; /* keep fixed */
}

/* Close button absolutely positioned top-right inside panel */
.close-btn {
 align-self: flex-start; /* move it to the left */
  background: transparent;
  border: none;
  color: #eee;
  font-size: 26px;
  cursor: pointer;
  padding: 6px;
  margin-bottom: 8px;
  transition: color 0.3s;
  z-index: 1700;
}


/* Show panel */
.audio-panel.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Close button inside panel, top-right corner */

.close-btn:hover {
  color: #ff5252;
}

.yt-music-player,
.bg-noise-player {
  width: 100%;  /* fills the 320px container */
  box-sizing: border-box; /* includes padding/border inside width */
}








.bg-noise-player {
  flex-direction: column;
  padding: 16px 20px;
  gap: 14px;
  width: 320px;
}

.noise-sound-buttons {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.noise-sound-buttons .noise-btn {
  flex: 1;
  background: rgba(255 255 255 / 0.1);
  border: 1.5px solid rgba(255 255 255 / 0.25);
  color: #eee;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 6px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition:
    background 0.3s ease,
    border-color 0.3s ease,
    color 0.3s ease,
    transform 0.15s ease;
  user-select: none;
}

.noise-sound-buttons .noise-btn span {
  line-height: 1.2;
  white-space: nowrap;
}

.noise-sound-buttons .noise-btn:hover,
.noise-sound-buttons .noise-btn[aria-pressed="true"] {
  background: #ff5252;
  border-color: #ff7979;
  color: #000;
  transform: scale(1.05);
}

.noise-sound-buttons .noise-btn:active {
  transform: scale(0.95);
  transition: none;
}

/* Adjust existing noise-controls & volume slider to fit new layout */
.bg-noise-player .noise-controls {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
}

.bg-noise-player #volumeSlider {
  flex-grow: 1;
  width: auto;
}

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&display=swap');

  .yt-music-player {
    width: 100%; /* match width of container */
  background-color: rgba(30, 30, 30, 0.85);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 16px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Roboto', sans-serif;
  color: #fff;

    /* Frosted Glass Effect */
    background-color: rgba(30, 30, 30, 0.6);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px); /* For Safari */
    border: 1px solid rgba(255, 255, 255, 0.1);
    
    /* Layout & Sizing */
    width: 320px;
    padding: 12px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    
    /* Font & Color */
    font-family: 'Roboto', sans-serif;
    color: #ffffff;
    
   
  }
  
  @keyframes slide-up {
    to {
        transform: translateY(0);
    }
  }

  .yt-music-player .album-art {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    flex-shrink: 0;
    object-fit: cover;
  }

  .yt-music-player .track-info {
    flex-grow: 1;
    min-width: 0; /* Prevents overflow in flexbox */
  }

  .yt-music-player .song-title {
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .yt-music-player .song-artist {
    font-size: 13px;
    color: #b3b3b3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .yt-music-player .player-controls {
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .yt-music-player .player-controls button {
    background: transparent;
    border: none;
    color: #e0e0e0;
    cursor: pointer;
    font-size: 20px;
    padding: 6px;
    border-radius: 50%;
    transition: background-color 0.2s, color 0.2s;
  }

  .yt-music-player .player-controls button:hover {
    color: #ffffff;
  }

  /* This keeps the actual YouTube video hidden */
  #youtube-player-container {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }