@font-face {
  font-family: 'Ubuntu';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/ubuntu/v20/4iCv6KVjbNBYlgoC1CzTtw.ttf) format('truetype');
}
@font-face {
  font-family: 'Ubuntu';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/ubuntu/v20/4iCs6KVjbNBYlgo6eA.ttf) format('truetype');
}
@font-face {
  font-family: 'Ubuntu';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/ubuntu/v20/4iCv6KVjbNBYlgoCjC3Ttw.ttf) format('truetype');
}
@font-face {
  font-family: 'Ubuntu';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/ubuntu/v20/4iCv6KVjbNBYlgoCxCvTtw.ttf) format('truetype');
}

:root {
  --primary-color: #ff6b00;
  --primary-color-light: #ff8c3d;
  --secondary-color: #111111;
  --background-color: #000000;
  --glass-background: rgba(25, 25, 25, 0.3);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-shadow: rgba(255, 107, 0, 0.2);
}

* {
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  box-sizing: border-box;
}

.hidden {
  display: none;
}

body {
  height: 100vh;
  background-color: var(--background-color);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(255, 107, 0, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(255, 107, 0, 0.1) 0%, transparent 40%);
  font-family: 'Ubuntu', sans-serif;
  cursor: default;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
  color: white;
  overflow: hidden;
}

/* Glass morphism base style */
.glass {
  background: var(--glass-background);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px 0 var(--glass-shadow);
  border-radius: 15px;
}

.pulse {
  animation: pulse 2s infinite ease-in-out;
}

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

@keyframes fadeIn {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes buttonHover {
  0% { transform: translateY(0); }
  100% { transform: translateY(-5px); }
}

#animate {
  position: fixed;
  background-color: var(--background-color);
  width: 100%;
  height: 100vh;
  bottom: 0;
  left: 0;
  font-size: 70px;
  z-index: 100;
}

#animate div {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  font-weight: 600;
  margin: auto;
  animation: load 1000ms infinite 0s ease-in-out;
  animation-direction: alternate;
  color: var(--primary-color);
  text-shadow: 0 0 15px rgba(255, 107, 0, 0.5);
}

@keyframes load {
  0% {
    opacity: 1;
  }
  100% {
    letter-spacing: 2px;
    opacity: 0.08;
    filter: blur(3px);
  }
}

#big-box {
  padding: 30px;
  width: 90%;
  max-width: 600px;
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  animation: fadeIn 0.8s ease-out;
}

#button-top {
  text-align: center;
  margin-bottom: 30px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

#button-top button {
  cursor: pointer;
  background-color: var(--glass-background);
  color: white;
  padding: 12px 20px;
  font-size: 18px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  transition: all 0.3s ease;
  flex: 1;
  min-width: 120px;
  max-width: 180px;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#button-top button:hover {
  background-color: rgba(255, 107, 0, 0.2);
  transform: translateY(-3px);
  box-shadow: 0 7px 14px rgba(0, 0, 0, 0.1), 0 0 10px rgba(255, 107, 0, 0.2);
}

#button-top .clicked {
  color: white;
  background-color: var(--primary-color);
  box-shadow: 0 0 15px rgba(255, 107, 0, 0.5);
}

#timer-container {
  position: relative;
  text-align: center;
  margin: 20px 0;
}

#timer {
  text-align: center;
  color: white;
  font-size: 120px;
  font-weight: 700;
  text-shadow: 0 0 20px rgba(255, 107, 0, 0.3);
  display: inline-block;
  position: relative;
}

#timer::after {
  content: "";
  position: absolute;
  width: 120%;
  height: 10px;
  background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
  bottom: -15px;
  left: -10%;
  border-radius: 5px;
  filter: blur(3px);
  opacity: 0.7;
}

#progress-bar {
  width: 100%;
  height: 6px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  margin: 10px auto 30px auto;
  position: relative;
  overflow: hidden;
}

#progress-fill {
  height: 100%;
  width: 0%;
  background-color: var(--primary-color);
  border-radius: 3px;
  position: absolute;
  top: 0;
  left: 0;
  transition: width 1s linear;
  box-shadow: 0 0 10px var(--primary-color);
}

#button-bottom {
  margin-top: 30px;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

#button-bottom #startBtn {
  background-color: var(--primary-color);
  color: white;
}

#button-bottom #stopBtn {
  background-color: var(--glass-background);
  color: white;
  border: 1px solid var(--primary-color);
}

#button-bottom .btn {
  cursor: pointer;
  font-size: 22px;
  border-radius: 50px;
  padding: 12px 40px;
  transition: all 0.3s ease;
  min-width: 150px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#button-bottom .btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2), 0 0 15px rgba(255, 107, 0, 0.3);
}

#button-bottom i {
  cursor: pointer;
  color: white;
  font-size: 28px;
  padding: 15px;
  border-radius: 50%;
  background-color: var(--glass-background);
  border: 1px solid var(--glass-border);
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

#button-bottom i:hover {
  color: var(--primary-color);
  transform: rotate(180deg);
  box-shadow: 0 0 15px rgba(255, 107, 0, 0.3);
}

#my-id {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  z-index: 10;
}

#my-id p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

#my-id p a {
  text-decoration: none;
  color: var(--primary-color);
  font-weight: 500;
  padding: 5px 10px;
  transition: all 0.3s ease;
  border-radius: 20px;
}

#my-id p a:hover {
  background-color: rgba(255, 107, 0, 0.1);
  box-shadow: 0 0 10px rgba(255, 107, 0, 0.2);
}

#FullScreen {
  position: fixed;
  right: 20px;
  top: 20px;
  cursor: pointer;
  color: white;
  font-size: 24px;
  padding: 10px;
  border-radius: 50%;
  background-color: var(--glass-background);
  border: 1px solid var(--glass-border);
  transition: all 0.3s ease;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
}

#FullScreen:hover {
  color: var(--primary-color);
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(255, 107, 0, 0.3);
}

/* Settings panel */
#settings-icon {
  position: fixed;
  left: 20px;
  top: 20px;
  cursor: pointer;
  color: white;
  font-size: 24px;
  padding: 10px;
  border-radius: 50%;
  background-color: var(--glass-background);
  border: 1px solid var(--glass-border);
  transition: all 0.3s ease;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
}

#settings-icon:hover {
  color: var(--primary-color);
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(255, 107, 0, 0.3);
}

#settings-panel {
  position: fixed;
  left: 20px;
  top: 80px;
  width: 300px;
  padding: 20px;
  background-color: var(--glass-background);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  border: 1px solid var(--glass-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  z-index: 100;
  transform: translateX(-350px);
  transition: transform 0.5s ease;
}

#settings-panel.visible {
  transform: translateX(0);
}

#settings-panel h3 {
  color: var(--primary-color);
  margin-bottom: 15px;
  font-size: 18px;
}

.settings-group {
  margin-bottom: 20px;
}

.settings-group label {
  display: block;
  margin-bottom: 5px;
  color: white;
  font-size: 14px;
}

.settings-group input[type="number"] {
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid var(--glass-border);
  margin-bottom: 10px;
}

.settings-group input[type="number"]:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 10px rgba(255, 107, 0, 0.3);
}

.settings-group button {
  padding: 8px 15px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
}

.settings-group button:hover {
  background-color: var(--primary-color-light);
  box-shadow: 0 0 10px rgba(255, 107, 0, 0.3);
}

/* Alert Animation */
@keyframes alertIn {
  0% { transform: translate(-50%, -100%); opacity: 0; }
  100% { transform: translate(-50%, 0); opacity: 1; }
}

@keyframes alertOut {
  0% { transform: translate(-50%, 0); opacity: 1; }
  100% { transform: translate(-50%, -100%); opacity: 0; }
}

.custom-alert {
  position: fixed;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--glass-background);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  border: 1px solid var(--glass-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2), 0 0 15px rgba(255, 107, 0, 0.3);
  padding: 20px 30px;
  color: white;
  text-align: center;
  z-index: 1000;
  animation: alertIn 0.5s forwards, alertOut 0.5s 3s forwards;
  min-width: 300px;
}

.custom-alert h3 {
  color: var(--primary-color);
  margin-bottom: 10px;
  font-size: 20px;
}

/* Responsive adjustments */
@media all and (max-width: 991.98px) {
  #big-box {
    width: 95%;
    padding: 20px;
  }
  
  #timer {
    font-size: 25vw;
  }
  
  #button-top {
    flex-direction: column;
    align-items: center;
  }
  
  #button-top button {
    width: 100%;
    max-width: none;
    margin: 5px 0;
  }
  
  #button-bottom {
    flex-direction: column;
    align-items: center;
  }
  
  #button-bottom .btn {
    width: 100%;
  }
  
  #settings-panel {
    width: 80%;
    max-width: 300px;
  }
}
