/* Modern CSS Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* Main Form Container */
form {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  text-align: center;
  max-width: 420px;
  width: 100%;
  margin: auto;
  padding: 40px 30px;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

form:hover {
  transform: translateY(-5px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.3);
}

/* Title Styling */
h1 {
  color: #4a5568;
  font-size: 2.5em;
  font-weight: 700;
  margin-bottom: 30px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Input Field Styling */
#textbox {
  width: 80%;
  max-width: 200px;
  text-align: center;
  font-size: 2.2em;
  font-weight: 600;
  border: 3px solid #e2e8f0;
  border-radius: 12px;
  padding: 15px 20px;
  margin-bottom: 25px;
  background: #f8fafc;
  transition: all 0.3s ease;
  color: #2d3748;
}

#textbox:focus {
  outline: none;
  border-color: #667eea;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  transform: scale(1.02);
}

#textbox:hover {
  border-color: #cbd5e0;
  background: #ffffff;
}

/* Radio Button Container */
.radio-group {
  margin: 25px 0;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.radio-option {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px 20px;
  border-radius: 12px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 2px solid transparent;
}

.radio-option:hover {
  background: rgba(102, 126, 234, 0.05);
  border-color: rgba(102, 126, 234, 0.2);
}

/* Custom Radio Button */
input[type="radio"] {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 3px solid #cbd5e0;
  border-radius: 50%;
  margin-right: 12px;
  position: relative;
  transition: all 0.3s ease;
  cursor: pointer;
}

input[type="radio"]:checked {
  border-color: #667eea;
  background: #667eea;
}

input[type="radio"]:checked::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: white;
}

input[type="radio"]:hover {
  border-color: #a0aec0;
  transform: scale(1.1);
}

/* Label Styling */
label {
  font-size: 1.3em;
  font-weight: 600;
  color: #4a5568;
  cursor: pointer;
  user-select: none;
  transition: color 0.3s ease;
}

label:hover {
  color: #667eea;
}

/* Button Styling */
button {
  margin-top: 25px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  font-size: 1.4em;
  font-weight: 600;
  color: white;
  border: none;
  padding: 15px 35px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

button:hover {
  background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

button:active {
  transform: translateY(0);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Result Display */
#result {
  font-size: 1.6em;
  font-weight: 700;
  color: #2d3748;
  margin-top: 25px;
  padding: 15px 20px;
  background: rgba(102, 126, 234, 0.05);
  border-radius: 12px;
  border-left: 4px solid #667eea;
  transition: all 0.3s ease;
}

#result.success {
  color: #38a169;
  background: rgba(56, 161, 105, 0.05);
  border-left-color: #38a169;
}

#result.error {
  color: #e53e3e;
  background: rgba(229, 62, 62, 0.05);
  border-left-color: #e53e3e;
}

/* Responsive Design */
@media (max-width: 480px) {
  form {
    padding: 30px 20px;
    margin: 10px;
  }

  h1 {
    font-size: 2em;
    margin-bottom: 20px;
  }

  #textbox {
    width: 90%;
    font-size: 1.8em;
    padding: 12px 15px;
  }

  label {
    font-size: 1.1em;
  }

  button {
    font-size: 1.2em;
    padding: 12px 25px;
  }

  #result {
    font-size: 1.4em;
  }
}

/* Animation for form entrance */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

form {
  animation: slideIn 0.6s ease-out;
}
