/* ---------------------------
   Global Variables
--------------------------- */
:root {
  --color-bg: #1A1A2E;
  --color-surface: #1F2A3C;
  --color-header-footer: #0F3460;
  --color-text: #ffffff;

  --color-accent: #FF8800;
  --color-accent-hover: #ff9e33;

  --color-success: #22c55e;
  --color-error: #ef4444;
  --color-placeholder: #94a3b8;
}

/* ---------------------------
   Base Body
--------------------------- */
body {
  font-family: Arial, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  margin: 0;
  padding: 2rem;
  min-height: 100vh;
  box-sizing: border-box;
}

/* ---------------------------
   Wrapper
--------------------------- */
.box-wrapper {
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 700px;
  background: var(--color-surface);
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
  overflow: hidden;
  transition: all 0.3s ease;
}

/* ---------------------------
   Header
--------------------------- */
header {
  width: 100%;
  padding: 1.5rem 2rem;
  text-align: center;
  background: var(--color-header-footer);
  color: var(--color-text);
  border-bottom: 3px solid var(--color-accent);
  box-sizing: border-box;
}

header a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 600;
  margin: 0 0.75rem;
  transition: color 0.2s;
}

header a:hover {
  color: var(--color-accent);
}

/* ---------------------------
   Main content
--------------------------- */
main {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem;
  box-sizing: border-box;
}

/* ---------------------------
   Container
--------------------------- */
.container {
  width: 100%;
  padding: 2rem;
  border-radius: 12px;
  background: var(--color-bg);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  box-sizing: border-box;
  transition: all 0.3s ease;
  text-align: center;
}

.container.success h1 {
  color: var(--color-success);
}

.container.error h1 {
  color: var(--color-error);
}

.container p {
  margin-top: 0.75rem;
  color: var(--color-text);
}

/* ---------------------------
   Headings
--------------------------- */
main h1 {
  color: var(--color-accent);
  text-align: center;
  margin: 0;
  font-size: 1.9rem;
}

/* ---------------------------
   Form elements
--------------------------- */
label {
  display: block;
  margin-top: 1.25rem;
  font-size: 1rem;
  text-align: left;
}

input,
textarea {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 2px solid transparent;
  margin-top: 6px;
  box-sizing: border-box;
  font-size: 1rem;
  font-family: inherit;
  background: #0d1b2a;
  color: var(--color-text);
  transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input::placeholder,
textarea::placeholder {
  color: var(--color-placeholder);
  opacity: 1;
}

input:focus,
textarea:focus {
  outline: none;
  border: 2px solid var(--color-accent);
  box-shadow: 0 0 8px var(--color-accent);
}

input:invalid,
textarea:invalid {
  border: 2px solid var(--color-error);
  box-shadow: 0 0 6px var(--color-error);
}

/* ---------------------------
   Buttons
--------------------------- */
button {
  margin-top: 1.75rem;
  padding: 14px;
  width: 100%;
  background: var(--color-accent);
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.25s, transform 0.1s, box-shadow 0.2s;
}

button:hover {
  background: var(--color-accent-hover);
  box-shadow: 0 4px 12px rgba(255,136,0,0.3);
}

button:active {
  transform: scale(0.98);
}

/* Link styled as button */
.button-link {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 12px 24px;
  background: var(--color-accent);
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  color: #0f172a;
  transition: background 0.25s, transform 0.1s, box-shadow 0.2s;
}

.button-link:hover {
  background: var(--color-accent-hover);
  box-shadow: 0 4px 12px rgba(255,136,0,0.3);
}

.button-link:active {
  transform: scale(0.98);
}

/* ---------------------------
   Footer (separate)
--------------------------- */
footer {
  width: 100%;
  margin-top: 2rem;
  padding: 1.5rem 2rem;
  text-align: center;
  background: var(--color-header-footer);
  color: var(--color-text);
  border-top: 3px solid var(--color-accent);
  border-radius: 12px;
  box-sizing: border-box;
}

footer a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 600;
  margin: 0 0.75rem;
  transition: color 0.2s;
}

footer a:hover {
  color: var(--color-accent);
}

/* ---------------------------
   Responsive tweaks
--------------------------- */
@media (max-width: 600px) {
  body {
    padding: 1rem;
  }

  .box-wrapper {
    max-width: 100%;
    border-radius: 12px;
  }

  header,
  footer {
    padding: 1rem;
    font-size: 0.9rem;
  }

  main {
    padding: 1rem;
    gap: 1rem;
  }

  .container {
    padding: 1rem;
  }

  input,
  textarea,
  button,
  .button-link {
    font-size: 0.95rem;
    padding: 10px;
  }

  button,
  .button-link {
    margin-top: 1rem;
  }
}

@media (max-width: 400px) {
  header,
  footer {
    font-size: 0.8rem;
  }

  main h1 {
    font-size: 1.2rem;
  }

  input,
  textarea {
    font-size: 0.85rem;
    padding: 8px;
  }

  button,
  .button-link {
    font-size: 0.9rem;
    padding: 10px;
  }

  .container {
    padding: 1rem;
  }
}
