
:root {
  --bg-gradient: radial-gradient(circle at top left, #120c02, #020617);
  --panel-bg: rgba(15, 23, 42, 0.7);
  --border-color: rgba(245, 158, 11, 0.15);
  --accent-color: #f59e0b;
  --accent-hover: #d97706;
  --text-primary: #f8fafc;
  --text-secondary: #d97706;
  --text-muted: #78350f;
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.8), 0 8px 10px -6px rgba(0, 0, 0, 0.8);
  --card-glow: 0 0 20px rgba(245, 158, 11, 0.2);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Fira Code', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg-gradient);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
  background: rgba(15, 23, 42, 0.4);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-color);
  text-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

main {
  flex: 1;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.card {
  background: var(--panel-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--accent-color);
  box-shadow: 0 0 10px var(--accent-color);
}

.terminal-title {
  color: var(--accent-color);
  text-transform: uppercase;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.terminal-input-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

textarea {
  width: 100%;
  height: 120px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  color: var(--accent-color);
  font-family: 'Fira Code', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.05rem;
  resize: vertical;
  outline: none;
  transition: all 0.2s ease;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.6);
}

textarea:focus {
  border-color: var(--accent-color);
  box-shadow: var(--card-glow);
}

/* Outputs side by side */
.outputs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .outputs-grid {
    grid-template-columns: 1fr;
  }
}

.output-panel {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.output-panel h3 {
  font-size: 0.95rem;
  color: var(--accent-color);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.output-box {
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(245, 158, 11, 0.1);
  border-radius: 6px;
  padding: 1rem;
  min-height: 120px;
  max-height: 200px;
  overflow-y: auto;
  color: #fff;
  font-size: 1rem;
  white-space: pre-wrap;
  word-break: break-all;
  line-height: 1.6;
}

/* Audio wave visualization placeholder */
.wave-container {
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: rgba(0,0,0,0.6);
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

#wave-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.btn-primary {
  background: var(--accent-color);
  color: #000;
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Fira Code', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  box-shadow: var(--card-glow);
}

.btn-primary:disabled {
  background: #78350f;
  color: #f59e0b;
  cursor: not-allowed;
  opacity: 0.5;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--accent-color);
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Fira Code', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.btn-secondary:hover {
  background: rgba(245, 158, 11, 0.05);
}

.btn-bar {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

/* Warning overlay */
.warning-toast {
  position: fixed;
  top: 2rem;
  left: 50%;
  transform: translate(-50%, -100px);
  background: #ef4444;
  color: #fff;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 9999;
}

.warning-toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
}

/* Toast alert */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #10b981;
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 9999;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.seo-section {
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
  margin-top: 1rem;
  color: #b45309;
  line-height: 1.7;
}

.seo-section h2 {
  color: var(--accent-color);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.seo-section p {
  margin-bottom: 1rem;
}

footer {
  border-top: 1px solid var(--border-color);
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(12px);
  padding: 3rem 2rem 1.5rem 2rem;
  margin-top: auto;
}

.footer-grid {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin-bottom: 3rem;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-col h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--accent-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.75rem;
}

.footer-col ul li a {
  color: #d97706;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s ease, padding-left 0.2s ease;
  display: inline-block;
}

.footer-col ul li a:hover {
  color: var(--text-primary);
  padding-left: 4px;
}

.footer-bottom {
  max-width: 1400px;
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(245, 158, 11, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.lang-selector {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.lang-link {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  text-transform: uppercase;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.lang-link:hover, .lang-link.active {
  color: var(--accent-color);
  border-color: rgba(245, 158, 11, 0.2);
  background: rgba(245, 158, 11, 0.05);
}

/* AdSense Optimization Overrides for Mobile (under 768px) */
@media (max-width: 768px) {
  header {
    margin-bottom: 2.5rem !important;
  }
  .dashboard-layout,
  main,
  .footer-grid,
  .card {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  .dashboard-layout {
    margin-bottom: 2.5rem !important;
  }
  .dashboard-layout > * {
    width: 100% !important;
    margin-bottom: 1.5rem;
  }
  .dashboard-layout > *:last-child {
    margin-bottom: 0;
  }
}