:root {
  --primary: #0071FF;
  --primary-light: #23A9FF;
  --text: #f1f1f1;
  --text-secondary: #b2b2b2;
  --bg: #121212;
  --bg-transparent: rgba(18, 18, 18, 0.8);
  --card-bg: rgba(30, 30, 30, 0.5);
  --success: #00b894;
  --error: #d63031;
  --glass-blur: 12px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  min-height: 100vh;
  background: var(--bg) url('../media/bg.jpg') no-repeat center center fixed;
  background-size: cover;
  color: var(--text);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.background-blur {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(5px);
  z-index: -1;
}

header {
  text-align: center;
  padding: 2rem 1rem 1rem;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.typing-text {
  border-right: 2px solid var(--primary);
  padding-right: 5px;
  white-space: nowrap;
  overflow: hidden;
}

header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.card {
  background: var(--card-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-radius: 15px;
  padding: 2rem;
  margin: 0 auto;
  width: 90%;
  max-width: 600px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

textarea {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 1rem;
  color: var(--text);
  font-size: 1rem;
  resize: vertical;
  min-height: 150px;
  transition: all 0.3s ease;
}

textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(108, 92, 231, 0.3);
}

textarea::placeholder {
  color: var(--text-secondary);
}

button {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

button:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
}

button:active {
  transform: translateY(0);
}

.status-msg {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.9rem;
  min-height: 1.2rem;
}

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

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

footer {
  margin-top: auto;
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.links a:hover {
  color: var(--primary-light);
}

/* Overlay Styles */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.overlay.active {
  opacity: 1;
  pointer-events: all;
}

.popup {
  background: var(--card-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-radius: 15px;
  padding: 2rem;
  width: 90%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.overlay.active .popup {
  transform: translateY(0);
}

.popup p {
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.btn-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.btn-green {
  background: var(--success);
}

.btn-green:hover {
  background: #00d8a7;
}

.btn-red {
  background: var(--error);
}

.btn-red:hover {
  background: #ff5252;
}

/* Improved Snowflakes (dots) */
.snowflake {
  position: fixed;
  top: -10px;
  z-index: -1;
  user-select: none;
  pointer-events: none;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  will-change: transform;
  animation-timing-function: linear;
}

@keyframes fall {
  to {
    transform: translateY(100vh);
  }
}

/* Responsive */
@media (max-width: 600px) {
  h1 {
    font-size: 2rem;
    height: 3rem;
  }

  .card {
    padding: 1.5rem;
    width: 95%;
  }

  .btn-group {
    flex-direction: column;
  }

  button {
    width: 100%;
  }
}