/* Alarm Modal Styles */
.alarm-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  z-index: 20000;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.alarm-modal.active {
  display: flex;
  opacity: 1;
  visibility: visible;
}

.alarm-modal-content {
  background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
  border-radius: 20px;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  border: 2px solid #ff9800;
  position: relative;
  transform: scale(0.8);
  transition: transform 0.3s ease;
}

.alarm-modal.active .alarm-modal-content {
  transform: scale(1);
}

.alarm-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #ff9800;
}

.alarm-modal-header h2 {
  color: #ff9800;
  font-size: 1.8rem;
  font-weight: bold;
  margin: 0;
  text-shadow: 0 0 10px rgba(255, 152, 0, 0.3);
}

.close-btn {
  background: none;
  border: none;
  color: #ff9800;
  font-size: 2rem;
  cursor: pointer;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.close-btn:hover {
  background: rgba(255, 152, 0, 0.2);
  transform: scale(1.1);
}

.alarm-modal-body {
  margin-bottom: 2rem;
}

.alarm-time-section,
.alarm-sound-section,
.alarm-title-section {
  margin-bottom: 1.5rem;
}

.alarm-time-section {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.alarm-time-section label {
  color: #ff9800;
  font-weight: bold;
  font-size: 1.1rem;
  min-width: 50px;
  text-align: center;
}

.alarm-sound-section,
.alarm-title-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.alarm-sound-section label,
.alarm-title-section label {
  color: #ff9800;
  font-weight: bold;
  font-size: 1.1rem;
}

.alarm-select,
.alarm-input {
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid #ff9800;
  border-radius: 8px;
  color: white;
  padding: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
  min-width: 80px;
  width: 80px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ff9800' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
  cursor: pointer;
}

.alarm-select::-ms-expand {
  display: none;
}

.alarm-select:focus,
.alarm-input:focus {
  outline: none;
  border-color: #ffa726;
  box-shadow: 0 0 10px rgba(255, 152, 0, 0.3);
}

/* Custom dropdown styling */
.alarm-select option {
  background: #1a1a1a;
  color: white;
  padding: 8px 12px;
  border: none;
}

.alarm-select option:hover {
  background: #ff9800;
  color: #1a1a1a;
}

.alarm-select option:checked {
  background: #ff9800;
  color: #1a1a1a;
  font-weight: bold;
}

/* Scrollbar styling for dropdown */
.alarm-select::-webkit-scrollbar {
  width: 8px;
}

.alarm-select::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
}

.alarm-select::-webkit-scrollbar-thumb {
  background: #ff9800;
  border-radius: 4px;
}

.alarm-select::-webkit-scrollbar-thumb:hover {
  background: #ffa726;
}

.alarm-input {
  width: 100%;
}

.alarm-modal-footer {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

/* Lock background interactions and dim slightly when alarm modal is open */
body.modal-open #header-component,
body.modal-open #sidebar-component,
body.modal-open .main-content {
  filter: blur(1px) brightness(0.85);
  pointer-events: none;
}

.alarm-modal-footer .btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.cancel-btn {
  background: #666;
  color: white;
}

.cancel-btn:hover {
  background: #777;
  transform: scale(1.05);
}

.set-btn {
  background: #ff9800;
  color: white;
}

.set-btn:hover {
  background: #ffa726;
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
}

/* Active Alarm Display */
#active-alarm {
  background: rgba(255, 152, 0, 0.1);
  border: 2px solid #ff9800;
  border-radius: 15px;
  padding: 1.5rem;
  margin-top: 1rem;
  text-align: center;
}

#active-alarm h2 {
  color: #ff9800;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.alarm-time {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.alarm-icon {
  width: 30px;
  height: 30px;
}

#alarm-time-display {
  color: white;
  font-size: 1.3rem;
  font-weight: bold;
  font-family: 'Digital-7', monospace;
}

#countdown-display {
  color: #ffa726;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.stop-alarm-btn {
  background: #f44336;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
  transition: all 0.3s ease;
}

.stop-alarm-btn:hover {
  background: #da190b;
  transform: scale(1.05);
}

/* Responsive Design */
@media (max-width: 600px) {
  .alarm-modal-content {
    padding: 1.5rem;
    margin: 1rem;
  }
  
  .alarm-time-section {
    flex-direction: column;
    gap: 1rem;
  }
  
  .alarm-time-section label {
    min-width: auto;
    text-align: left;
  }
  
  .alarm-select {
    width: 100%;
    min-width: auto;
  }
  
  .alarm-modal-footer {
    flex-direction: column;
  }
}
