:root {
  --bg: #f4f6f8;
  --bg-dark: #12161b;
  --text: #1c1c1c;
  --text-dark: #eee;
  --accent: #3498db;
  --panel: #ffffff;
  --panel-dark: #1f2a32;
  --btn-gradient: linear-gradient(135deg, #3498db, #9b59b6);
  --font: 'Segoe UI', sans-serif;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  transition: background 0.3s, color 0.3s;
  min-height: 100vh;
}

body.dark-mode {
  background: var(--bg-dark);
  color: var(--text-dark);
}

/* HEADER */
.navbar {
  background: var(--panel);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

body.dark-mode .navbar {
  background: var(--panel-dark);
}

.navbar-inner {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  display: flex;
  align-items: center;
}

.logo {
  height: 40px;
  margin-right: 10px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--accent);
  font-weight: 500;
  position: relative;
  padding: 0.3rem 0.5rem;
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0%;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--accent);
  transition: width 0.3s ease-in-out;
}

.nav-links a:hover::after {
  width: 100%;
}

.theme-toggle {
  padding: 0.4rem 1rem;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

.theme-toggle:hover {
  background-color: var(--accent);
  color: white;
}

/* WRAPPER BACKGROUND */
.form-wrapper {
  background: var(--bg-dark);
  padding: 3rem 1rem 5rem;
}

body:not(.dark-mode) .form-wrapper {
  background: #1a1a1a;
}

/* CONTAINER */
.application-container {
  max-width: 900px;
  margin: auto;
  padding: 2rem;
  background: var(--panel);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  transition: background 0.3s;
}

body.dark-mode .application-container {
  background: var(--panel-dark);
}

/* FORM ELEMENTS */
.apply-title {
  font-size: 2rem;
  margin-bottom: 1rem;
  text-align: center;
}

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

.apply-form label {
  font-weight: bold;
  display: block;
  margin-top: 1rem;
}

.apply-form input[type="text"],
.apply-form textarea,
.apply-form select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  background: #fff;
  color: #000;
}

body.dark-mode .apply-form input[type="text"],
body.dark-mode .apply-form textarea,
body.dark-mode .apply-form select {
  background: #2c2c2c;
  color: var(--text-dark);
  border: 1px solid #444;
}

.apply-form textarea {
  resize: vertical;
  min-height: 100px;
}

.apply-submit {
  background: var(--btn-gradient);
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 1.5rem;
  transition: background 0.3s;
}

.apply-submit:hover {
  opacity: 0.9;
}

.apply-errors {
  background: #ffcccc;
  color: #a10000;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-radius: 6px;
}

.apply-success {
  background: #c7ffd2;
  color: #007c2e;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-radius: 6px;
  text-align: center;
}

/* QUESTION MENU BUTTONS */
.app-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.app-menu button {
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.app-menu button:hover,
.app-menu button.active {
  background: #2f80ed;
}

/* FOOTER */
.footer {
  padding: 1.5rem;
  text-align: center;
  background: var(--panel);
  color: #888;
}

body.dark-mode .footer {
  background: var(--panel-dark);
  color: #bbb;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .navbar-inner,
  .nav-links {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    margin-top: 1rem;
  }

  .application-container {
    padding: 1.5rem;
    margin: 2rem 1rem;
  }

  .theme-toggle {
    margin-top: 0.5rem;
  }
}
