body {
  font-family: "Montagu Slab", serif;
  margin: 0;
  padding: 0 10%;
  background: radial-gradient(circle at top right, #2a1a3c 0%, #0d0b1f 80%);
  color: #f8e6b8;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background-image: url('./background.jpg');
  background-size: cover;      /* phóng to vừa màn hình */
  background-position: center; /* căn giữa */
  background-repeat: no-repeat;
}

.hidden { display: none; }

/* --- Form Box --- */
.form-container {
  border: 1px solid rgba(255, 215, 128, 0.6);
  border-radius: 10px;
  padding: 5%;
  background: rgba(25, 15, 35, 0.6);
  box-shadow: 0 0 25px rgba(255, 204, 128, 0.05);
  backdrop-filter: blur(6px);
  flex: 1;
  max-width: 50vw;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 3rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

label {
  font-size: 1.2vw;
  letter-spacing: 1px;
  font-weight: 600;
  color: #f6d77a;
  margin-bottom: 0.5rem;
}
.radio-label label{
  font-family: "Bellota", system-ui;
  font-size: 1.5vw;
  font-weight: normal;
  color: #666;
}
.radio-label label:hover{
  cursor: pointer;
}

input {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 240, 200, 0.4);
  color: #f8e6b8;
  font-size: 1.5vw;
  padding: 0.3rem 0;
  outline: none;
  transition: all 0.3s ease;
  font-family: "Bellota", system-ui;
  border-radius: 0 !important;
}

input:not(input[type="radio"],input[type="email"]) {
  text-transform: uppercase;
}

input::placeholder {
  text-transform: none;
}

input:not(input[type="radio"]) { 
  width: 100%; 
}  

input:focus {
  border-bottom: 1px solid #f6d77a;
}

input:disabled, select:disabled {
  background-color: rgba(50, 30, 60, 0.6);
  color: #aaa;
  border-color: #555;
  cursor: not-allowed;
  opacity: 0.6;
}
input[type="radio"]:checked + span {
  color: #f8e6b8;
}

.plan-select {
  font-family: "Bellota", system-ui;
  width: 100%;
  padding: 0.8rem 1rem;
  font-size: 1rem;
  border: 1px solid rgba(255, 215, 128, 0.6);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: red;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  appearance: none;
  background-image: url('data:image/svg+xml;charset=UTF-8,<svg width="14" height="10" xmlns="http://www.w3.org/2000/svg"><path d="M1 1l6 6 6-6" stroke="%23f8e6b8" stroke-width="2" fill="none" fill-rule="evenodd"/></svg>');
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 12px;
}

.plan-select:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.12);
  background-image: url('data:image/svg+xml;charset=UTF-8,<svg width="14" height="10" xmlns="http://www.w3.org/2000/svg"><path d="M1 1l6 6 6-6" stroke="%23f8e6b8" stroke-width="2" fill="none" fill-rule="evenodd"/></svg>');
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 12px;
}

/* Force style cho option */
.plan-select option {
  color: #b62f27;
}

/* Một số trình duyệt mobile / Safari */
.plan-select optgroup,
.plan-select option:checked,
.plan-select option:hover {
  font-weight: bold;
}

input[type="radio"] {
  accent-color: #f6d77a;
}

/* --- Submit Button --- */
button {
  margin: 2rem auto 0;
  display: block;
  background: linear-gradient(90deg, #d74b35, #b62f27);
  color: #f8e6b8;
  font-family: "Genos", sans-serif;
  font-size: 2vw;
  padding: 0.8rem 3rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 215, 128, 0.6);
  text-transform: uppercase;
}

button:hover {
  background: linear-gradient(90deg, #e36d4c, #c33b2d);
  transform: scale(1.03);
  border-color: red;
}

.spinner-container{
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgb(0, 0, 0, 0.6);
  border-radius: 10px;
}

/* Spinner */
.spinner {
  position: absolute;
  top: calc(50% - 30px);
  left: calc(50% - 30px);
  border: 4px solid #f3f3f3;
  border-top: 4px solid #b91c1c;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

#qrContainer{
  text-align: center;
  font-size: 1.3vw;
}

.popup-buttons{
  display: flex;
  gap: 2rem;
}

.popup-buttons button{
  flex: 1;
}

#uploadSection h2{
  text-align: center;
  text-transform: capitalize;
}

/* Container chính */
.file-upload {
  border: 1px dashed #d74b35;
  border-radius: 10px;
  padding: 2em 0 ;
  text-align: center;
  transition: border-color 0.3s, background 0.3s;
  min-height: 30vh;
  display: flex;
  justify-content: center;
}

.file-upload.dragover {
  border-color: #0056b3;
  background: #e6f0ff;
}

.file-upload:hover {
  cursor: pointer;
}

/* Ẩn input gốc */
.file-upload input[type="file"] {
  display: none;
}
.file-upload-label{
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
/* Icon + text */
.file-upload-label svg {
  width: 30px;
  height: 30px;
  margin-bottom: 1rem;
}
.file-name {
  color: white;
  font-weight: normal;
}

#successSection{
  text-align: center;
  font-size: 2vw;
}

#successSection .tick {
  font-size: 60px;
  color: #16a34a;
  margin-bottom: 15px;
}

/* --- Responsive --- */
@media (max-width: 600px) {
  .form-container{
    position: fixed;
    bottom: 3vw;
    top: 3vw;
    left: 3vw;
    right: 3vw;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    max-width: 100%;
  }
  .register-form{
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
  .form-grid {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3vh;
  }
  .plan-options {
    flex-direction: column;
    gap: 0.6rem;
  }
  .plan-options label{
    font-size: 1rem;
  }
  .btn-submit{
    font-size: 1.6rem;
    margin-right: 0;
    margin-left: 0;
  }
  label{
    font-size: 1.3rem;
  }
  .radio-label label {
    font-size: 1.5rem;
  }
  input{
    font-size: 1.2rem;
  }
  button {
    font-size: 1.6rem;
    margin: 0;
    width: 100%;
    margin-top: 3vh;
  }

  #qrContainer{
    text-align: center;
    font-size: 1.3rem;
  }
  .popup-buttons{
    display: inline-block;
  }

  #uploadSection h2{
    font-size: 1.5rem;
  }
  .file-name {
    font-size: 1rem;
  }

  #successSection{
    font-size: 1.6rem;
  }
}
