:root {
  --primary: #9b1724;
  --primary-bg: #f4e7e9;
  --red-bold: #3e0000;
  --red-dark: #b32b23;

  --grey-text: #292828;
  --app-background: #f4f4f4;
  --F-white: #ffffff;
}

html, body {
  font-size: 16px;
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  font-family: "Manrope", sans-serif !important;
  color: var(--F-white);
  background: linear-gradient(to top, #9c1824, #b0483a);
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

* {
  box-sizing: border-box;
}

/* --- Header --- */
header {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center; /* Centering the text */
  padding: 1rem 5rem;
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  border-bottom: 1px solid #a93933;
}

header .logo {
  width: 3rem;
  border-radius: 0.5rem;
  margin-right: 1rem;
}

header h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: bold;
  text-align: center;
}

/* --- Main Content Layout --- */
.pad {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1600px;
  padding: 5rem 8rem 2rem;
  gap: 3rem;
  margin-top: -2rem;
}

/* Left Side (Text Content) */
.side {
  flex: 1;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  text-align: left;
  margin-top: -2rem;
}

h1 {
  font-size: 3.5rem;
  font-weight: bold;
  margin: 0;
  text-align: left;
}

p {
  font-size: 1.4rem;
  font-weight: bold;
  text-align: left;
  max-width: 90%;
}

/* --- Download Buttons Adjustments --- */
.download {
  display: flex;
  gap: 1.2rem;
  justify-content: center; /* Align buttons in one line */
  align-items: center;
  flex-wrap: nowrap; /* Prevents wrapping */
}

.download-button {
  width: 9rem;
  height: 3rem;
  object-fit: contain;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Right Side (Phone Mockup) --- */
.phone-cont {
  flex: 2;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-width: 600px;
  padding-left: 8rem;
  padding-top: 1rem;
  margin-right: -6rem;
}

.phones {
  width: 100%;
  max-width: 900px;
}

/* --- Responsive Adjustments --- */
@media (max-width: 1200px) {
  .pad {
    padding: 4rem 4rem 2rem;
    gap: 2rem;
  }

  .phone-cont {
    padding-left: 3rem;
    margin-right: -3rem;
  }

  .phones {
    max-width: 750px;
  }
}

@media (max-width: 1024px) {
  .pad {
    flex-direction: column-reverse;
    align-items: center;
    text-align: center;
    padding: 4rem 2rem 2rem;
    margin-top: -3rem;
  }

  .phone-cont {
    order: -1;
    justify-content: center;
    width: 100%;
    padding-left: 0;
    margin-right: 0;
  }

  .phones {
    max-width: 500px;
  }

  .side {
    text-align: center;
    align-items: center;
    max-width: 90%;
    margin-top: -1rem;
  }

  h1, p {
    text-align: center;
  }

  .download {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .pad {
    flex-direction: column-reverse;
    padding: 4rem 1.5rem 2rem;
  }

  .phone-cont {
    justify-content: center;
    width: 100%;
  }

  .phones {
    max-width: 400px;
  }

  .side {
    max-width: 100%;
    margin-top: -1.5rem;
  }

  p {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .pad {
    padding: 4rem 1.2rem 1.5rem;
    margin-top: -2rem;
  }

  .phone-cont {
    justify-content: center;
    width: 100%;
  }

  .phones {
    max-width: 320px;
  }
}

/* Hide buttons on small screens */
@media (max-width: 768px) {
  .wButton {
    display: none;
  }
}

/* --- TOTP Generator Styles --- */
.totp-generator {
  width: 100%;
  max-width: 100%;
  margin: 1rem 0;
}

.totp-generator form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

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

.input-with-toggle {
  position: relative;
  display: flex;
  align-items: center;
}

.form-group label {
  font-size: 1rem;
  font-weight: 500;
  color: var(--F-white);
}

.form-note {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 0.25rem;
  font-style: italic;
}

.form-group input[type="text"],
.form-group input[type="number"] {
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: "Manrope", sans-serif;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 0.5rem;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--F-white);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  width: 100%;
}

.input-with-toggle input[type="text"] {
  padding-right: 3rem;
}

.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.6);
  background-color: rgba(255, 255, 255, 0.15);
}

.form-group input[type="text"]::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.form-group input[type="number"] {
  max-width: 150px;
}

/* Toggle Button */
.toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  transition: background-color 0.3s ease;
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
}

.toggle-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.toggle-btn:focus {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

.chevron {
  display: inline-block;
  font-size: 0.875rem;
  color: var(--F-white);
  transition: transform 0.3s ease;
  user-select: none;
}

/* Collapsible Options */
.options-collapsed {
  display: none;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* TOTP Output Display */
.totp-output {
  margin-top: 1rem;
  padding: 1.5rem;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  border: 2px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.token-display {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
  align-items: center;
}

.token-value {
  font-size: 2rem;
  font-weight: 700;
  font-family: "Courier New", monospace;
  letter-spacing: 0.25rem;
  color: var(--F-white);
  text-align: center;
  padding: 0.5rem;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  min-width: 200px;
}

.countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  font-size: 1rem;
}

.countdown-label {
  color: rgba(255, 255, 255, 0.8);
}

.countdown-value {
  font-weight: 700;
  color: var(--F-white);
  font-size: 1.25rem;
}

/* Responsive adjustments for TOTP generator */
@media (max-width: 1024px) {
  .totp-generator {
    max-width: 100%;
  }

  .token-value {
    font-size: 1.75rem;
    letter-spacing: 0.2rem;
  }
}

@media (max-width: 768px) {
  .totp-generator {
    margin: 0.5rem 0;
  }

  .token-value {
    font-size: 1.5rem;
    letter-spacing: 0.15rem;
  }

  .form-group input[type="number"] {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .token-value {
    font-size: 1.25rem;
    letter-spacing: 0.1rem;
  }

  .totp-output {
    padding: 1rem;
  }
}
