@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Fira+Code:wght@400;500&display=swap');

:root {
  --bg-color: #080710;
  --panel-bg: rgba(255, 255, 255, 0.05);
  --panel-border: rgba(255, 255, 255, 0.08);
  --primary-accent: #6366f1;
  --secondary-accent: #a855f7;
  --success-color: #10b981;
  --error-color: #ef4444;
  --text-primary: #ffffff;
  --text-muted: #94a3b8;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Outfit', sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  position: relative;
  padding: 40px 20px;
}

/* Background Glow Effects */
body::before, body::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  filter: blur(150px);
  z-index: -1;
  opacity: 0.4;
}

body::before {
  background: var(--primary-accent);
  top: 10%;
  left: 15%;
}

body::after {
  background: var(--secondary-accent);
  bottom: 10%;
  right: 15%;
}

.container {
  width: 100%;
  max-width: 900px;
  position: relative;
  z-index: 1;
}

/* Header design */
header {
  text-align: center;
  margin-bottom: 40px;
}

header h1 {
  font-size: 2.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, #ffffff 30%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
  letter-spacing: -0.03em;
}

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

/* Glassmorphism Panel */
.panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

/* Form Styles */
form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

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

.form-group.full-width {
  grid-column: span 2;
}

label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

input, select, textarea {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--primary-accent);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
}

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

/* Custom Accordion for DKIM details */
.dkim-section {
  grid-column: span 2;
  border-top: 1px solid var(--panel-border);
  margin-top: 10px;
  padding-top: 20px;
}

.dkim-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  padding: 10px 0;
  user-select: none;
}

.dkim-header h3 {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-primary);
}

.dkim-header .toggle-btn {
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--panel-border);
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.dkim-header:hover .toggle-btn {
  border-color: var(--secondary-accent);
  color: var(--text-primary);
}

.dkim-fields {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 15px;
  animation: slideDown 0.3s ease-out forwards;
}

.dkim-fields.active {
  display: grid;
}

/* Submit Button */
.btn-submit {
  grid-column: span 2;
  background: linear-gradient(135deg, var(--primary-accent) 0%, var(--secondary-accent) 100%);
  border: none;
  border-radius: 14px;
  padding: 16px;
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
  margin-top: 15px;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(99, 102, 241, 0.5);
  opacity: 0.95;
}

.btn-submit:active {
  transform: translateY(0);
}

.btn-submit:disabled {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.3);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

/* Terminal Console (Results Display) */
.terminal-window {
  margin-top: 40px;
  background: #050409;
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  display: none;
  animation: fadeIn 0.4s ease-out forwards;
}

.terminal-header {
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--panel-border);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.terminal-title {
  font-family: 'Fira Code', monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-left: auto;
}

.terminal-body {
  padding: 24px;
  font-family: 'Fira Code', monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  max-height: 350px;
  overflow-y: auto;
}

.log-line {
  margin-bottom: 8px;
  color: var(--text-muted);
}

.log-line.info { color: #818cf8; }
.log-line.success { color: var(--success-color); }
.log-line.error { color: var(--error-color); }
.log-line.cmd { color: #f472b6; }

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

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Grid adjustments */
@media (max-width: 680px) {
  form {
    grid-template-columns: 1fr;
  }
  
  .form-group, .form-group.full-width, .dkim-fields, .btn-submit, .dkim-section {
    grid-column: span 1;
  }

  .dkim-fields {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 24px;
  }
}
