/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Arial', sans-serif;
  background: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 50%, #16213e 100%);
  color: #ffffff;
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Background animation */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(2px 2px at 20px 30px, #ffffff, transparent),
    radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.8), transparent),
    radial-gradient(1px 1px at 90px 40px, #ffffff, transparent),
    radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.6), transparent),
    radial-gradient(2px 2px at 160px 30px, #ffffff, transparent);
  background-repeat: repeat;
  background-size: 200px 100px;
  animation: sparkle 20s linear infinite;
  pointer-events: none;
  z-index: -1;
}

@keyframes sparkle {
  from { transform: translateY(0px); }
  to { transform: translateY(-100px); }
}

/* Header */
h1 {
  text-align: center;
  font-size: 3rem;
  font-weight: bold;
  margin: 2rem 0;
  background: linear-gradient(45deg, #64b5f6, #42a5f5, #29b6f6);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 30px rgba(100, 181, 246, 0.5);
  animation: glow 3s ease-in-out infinite alternate;
}

@keyframes glow {
  from { filter: brightness(1); }
  to { filter: brightness(1.2); }
}

/* Controls section */
#inputs {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin: 2rem 0;
  padding: 1rem;
}

#inputs button {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  border: none;
  color: white;
  padding: 0.8rem;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(30, 60, 114, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

#inputs button:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 20px rgba(30, 60, 114, 0.6);
  background: linear-gradient(135deg, #2a5298 0%, #1e3c72 100%);
}

#inputs button:active {
  transform: translateY(0) scale(0.98);
}

#timeInput {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(100, 181, 246, 0.3);
  border-radius: 10px;
  padding: 0.8rem 1rem;
  color: white;
  font-size: 1rem;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

#timeInput:focus {
  outline: none;
  border-color: #64b5f6;
  box-shadow: 0 0 20px rgba(100, 181, 246, 0.3);
  background: rgba(255, 255, 255, 0.15);
}

/* Error message */
#error {
  text-align: center;
  color: #ff6b6b;
  font-size: 1.1rem;
  margin: 1rem 0;
  text-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
}

/* Main content */
#all {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: 1400px;
  margin: 2rem auto;
  padding: 0 2rem;
  align-items: start;
}

#info {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
}

#info:hover {
  transform: translateY(-5px);
}

#copyright {
  color: #ffd54f;
  font-size: 1rem;
  margin-bottom: 0.5rem;
  font-weight: 300;
}

#title {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(45deg, #ffffff, #e3f2fd);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.3;
}

#explanation {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #e8eaf6;
  text-align: justify;
}

/* Image container */
#timeImage {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 15px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
  cursor: pointer;
}

#timeImage:hover {
  transform: scale(1.02);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.7);
}

/* Description section */
#description {
  max-width: 1400px;
  margin: 4rem auto 2rem;
  padding: 0 2rem;
}

#description p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #b3c5d7;
  text-align: justify;
  background: rgba(255, 255, 255, 0.03);
  padding: 2rem;
  border-radius: 15px;
  border-left: 4px solid #64b5f6;
  margin-bottom: 2rem;
}

#myInfo {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

#developerTag {
  color: #64b5f6;
  font-size: 1.1rem;
}

#developerTag strong {
  color: #ffffff;
}

#socialLinks {
  display: flex;
  gap: 1rem;
  align-items: center;
}

#socialLinks a {
  color: #81c784;
  text-decoration: none;
  padding: 0.6rem 1rem;
  border: 1px solid rgba(129, 199, 132, 0.3);
  border-radius: 25px;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(129, 199, 132, 0.05);
}

#socialLinks a:hover {
  background: rgba(129, 199, 132, 0.15);
  border-color: #81c784;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(129, 199, 132, 0.3);
  color: #ffffff;
}

.icon {
  width: 18px;
  height: 18px;
  filter: brightness(0) saturate(100%) invert(67%) sepia(16%) saturate(435%) hue-rotate(92deg) brightness(94%) contrast(87%);
  transition: filter 0.3s ease;
}

#socialLinks a:hover .icon {
  filter: brightness(0) saturate(100%) invert(100%) sepia(0%) saturate(7496%) hue-rotate(315deg) brightness(106%) contrast(106%);
}

/* Responsive design */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
    margin: 1rem 0;
  }
  
  #all {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0 1rem;
  }
  
  #info {
    padding: 1.5rem;
  }
  
  #title {
    font-size: 1.5rem;
  }
  
  #inputs {
    flex-wrap: wrap;
    gap: 0.8rem;
    padding: 0.5rem;
  }
  
  #timeInput {
    min-width: 150px;
  }
  
  #description {
    padding: 0 1rem;
  }
  
  #myInfo {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
    align-items: center;
  }
  
  #socialLinks {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  #description p {
    padding: 1.5rem;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.5rem;
  }
  
  #inputs button {
    padding: 0.6rem;
  }
  
  #timeInput {
    padding: 0.6rem;
    font-size: 0.9rem;
  }
  
  #title {
    font-size: 1.3rem;
  }
  
  #explanation, #description p {
    font-size: 0.95rem;
    line-height: 1.6;
  }
}

/* Loading animation */
.loading {
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

/* Material icons styling */
.material-symbols-outlined {
  font-size: 1.5rem !important;
}