:root {
  --bg-color: #020617;
  --text-color: #f8fafc;
  --primary-color: #3b82f6;
  --primary-hover: #2563eb;
  --primary-glow: rgba(59, 130, 246, 0.5);
  --secondary-color: #a78bfa;
  --card-bg: #0f172a;
  --card-border: #1e293b;
  --card-hover-bg: #1e293b;
  --glass-bg: rgba(15, 23, 42, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
  --font-mono: "JetBrains Mono", "Fira Code", "Courier New", monospace;
}

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

body {
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    sans-serif;
  background-color: var(--bg-color);
  background-image:
    radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.05) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(167, 139, 250, 0.05) 0px, transparent 50%);
  color: var(--text-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

h1 {
  font-size: 2.5rem;
  margin-top: 8rem;
  margin-bottom: 1.3rem;
  background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800;
  letter-spacing: -0.025em;
  text-align: center;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 3rem;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  z-index: 1000;
  transition: all 0.3s ease;
}

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

.nav-logo {
  height: 32px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-link {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--primary-color);
}

/* Nav Search */
.nav-search {
  flex: 1;
  max-width: 400px;
  margin: 0 2rem;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-wrapper svg {
  position: absolute;
  left: 1rem;
  color: #64748b;
  pointer-events: none;
}

.search-input-wrapper input {
  width: 100%;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid var(--card-border);
  padding: 0.6rem 1rem 0.6rem 2.8rem;
  border-radius: 2rem;
  color: white;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.search-input-wrapper input:focus {
  outline: none;
  background: rgba(30, 41, 59, 0.8);
  border-color: var(--primary-color);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
  transform: scale(1.02);
}

/* Search Dropdown */
.nav-search {
  position: relative; /* Container for dropdown */
}

.search-dropdown {
  position: fixed;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.25rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  z-index: 9999;
  display: none;
  overflow: hidden;
  animation: fadeIn 0.2s ease-out;
}

.search-dropdown.active {
  display: block;
}

.search-results-list {
  max-height: 300px;
  overflow-y: auto;
  padding: 0.5rem;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: var(--text-color);
  border-radius: 0.75rem;
  transition: all 0.2s ease;
}

.search-result-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.result-emoji-small {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.result-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.result-name-small {
  font-weight: 600;
  font-size: 0.95rem;
}

.result-desc-small {
  font-size: 0.75rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 250px;
}

/* Hero Section */
.hero-section {
  text-align: center;
  margin: 8rem auto 4rem;
  padding: 0 2rem;
  animation: fadeIn 0.8s ease-out;
}

.page-title {
  font-size: 3rem;
  margin-top: 0;
  margin-bottom: 0.5rem;
  background: linear-gradient(to right, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  color: transparent;
}

.subtitle {
  color: #94a3b8;
  font-size: 1.125rem;
}

.home-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  width: 100%;
  max-width: 1400px;
  margin: 2rem auto 6rem;
  padding: 0 2rem;
}

.card-btn {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 1.5rem;
  padding: 3rem 2rem;
  text-decoration: none;
  color: var(--text-color);
  font-size: 1.25rem;
  font-weight: 700;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  position: relative;
  overflow: hidden;
}

.card-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.1) 0%,
    rgba(167, 139, 250, 0.1) 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card-btn:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--primary-color);
  background-color: var(--card-hover-bg);
  box-shadow:
    0 20px 40px -15px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(59, 130, 246, 0.2);
}

.card-btn:hover::before {
  opacity: 1;
}

.card-btn span {
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 1;
}

.card-btn:hover span {
  transform: scale(1.2) rotate(5deg);
}

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

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

.fade-in {
  animation: fadeIn 0.5s ease-out forwards;
}

.copy-feedback {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary-color);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 2rem;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, 20px);
}

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

/* Tool pages specific */
.tool-container {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 1.5rem;
  border: 1px solid var(--card-border);
  width: 100%;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.6s ease-out;
}

.btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s;
  font-weight: 600;
}

.btn:hover {
  background: var(--primary-hover);
}

.back-link {
  color: #94a3b8;
  text-decoration: none;
  margin-bottom: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.3s ease;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  background: rgba(30, 41, 59, 0.3);
  border: 1px solid transparent;
}

.back-link:hover {
  color: white;
  background: rgba(30, 41, 59, 0.6);
  border-color: var(--card-border);
  transform: translateX(-5px);
}

/* Simple Corrector */
.simple-corrector {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.view-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  animation: fadeIn 0.4s ease-out;
}

#text-input {
  width: 100%;
  min-height: 400px;
  background: #0f172a;
  border: 1px solid var(--card-border);
  border-radius: 1rem;
  padding: 1.5rem;
  color: white;
  font-size: 1.1rem;
  line-height: 1.6;
  resize: vertical;
}

#text-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.1);
}

.corrected-text-area {
  width: 100%;
  min-height: 400px;
  background: #0f172a;
  border: 1px solid var(--card-border);
  border-radius: 1rem;
  padding: 1.5rem;
  color: #cbd5e1;
  font-size: 1.1rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.actions-bar {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.btn-secondary {
  background: #334155;
}

.btn-secondary:hover {
  background: #475569;
}

/* Corrected Word Styling */
.corrected-word {
  border-bottom: 2px solid var(--primary-color);
  color: white;
  font-weight: 500;
  cursor: pointer;
  padding: 0 1px;
  transition: background 0.2s;
  position: relative;
}

.corrected-word:hover {
  background: rgba(59, 130, 246, 0.2);
}

/* Alternatives Menu */
.alternatives-menu {
  position: absolute;
  background: #1e293b;
  border: 1px solid var(--card-border);
  border-radius: 0.75rem;
  padding: 0.5rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
  display: none;
  z-index: 1000;
  min-width: 150px;
}

.alternatives-menu.active {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.alt-item {
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  color: white;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.alt-item:hover {
  background: var(--primary-color);
}

.alt-header {
  font-size: 0.75rem;
  color: #94a3b8;
  padding: 0.25rem 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--card-border);
  margin-bottom: 0.25rem;
}

/* Blur Tool Redesign */
.blur-tool-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 2rem;
  width: 100%;
  max-width: 1200px;
  background: transparent;
  padding: 0 2rem;
  border: none;
  margin: 1rem auto 4rem;
}

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

.blur-sidebar {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 1.25rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  height: fit-content;
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.sidebar-section h3 {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  margin-bottom: 1rem;
  font-weight: 600;
}

/* Custom File Upload */
.custom-file-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  border: 2px dashed var(--card-border);
  border-radius: 1rem;
  padding: 2rem 1rem;
  cursor: pointer;
  background: rgba(30, 41, 59, 0.5);
  transition: all 0.3s ease;
  color: #cbd5e1;
}

.custom-file-upload input[type="file"] {
  display: none;
}

.custom-file-upload:hover {
  border-color: var(--primary-color);
  background: rgba(59, 130, 246, 0.05);
  color: var(--primary-color);
}

.custom-file-upload svg {
  color: inherit;
}

/* Custom Radio Group */
.custom-radio-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.radio-card {
  position: relative;
  cursor: pointer;
}

.radio-card input[type="radio"] {
  position: absolute;
  opacity: 0;
}

.radio-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 0.5rem;
  background: #0f172a;
  border: 1px solid var(--card-border);
  border-radius: 0.75rem;
  color: #94a3b8;
  transition: all 0.2s ease;
  font-size: 0.875rem;
  font-weight: 500;
  min-height: 80px;
}

.radio-card input[type="radio"]:checked + .radio-content {
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--primary-color);
  color: var(--primary-color);
  box-shadow: 0 0 0 1px var(--primary-color);
}

.radio-card:hover .radio-content {
  border-color: #475569;
}

.radio-card:active .radio-content {
  transform: scale(0.95);
}

/* Custom Sliders */
.slider-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.slider-group:last-child {
  margin-bottom: 0;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: #cbd5e1;
}

.val-badge {
  background: #0f172a;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-family: monospace;
  font-size: 0.75rem;
  color: var(--primary-color);
  border: 1px solid var(--card-border);
}

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  background: transparent;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 16px;
  width: 16px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
  margin-top: -5px;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

input[type="range"]::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  cursor: pointer;
  background: #475569;
  border-radius: 3px;
  border: 1px solid #64748b;
}

input[type="range"]::-moz-range-track {
  width: 100%;
  height: 6px;
  cursor: pointer;
  background: #475569;
  border-radius: 3px;
  border: 1px solid #64748b;
}

input[type="range"]::-moz-range-thumb {
  height: 16px;
  width: 16px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
  border: none;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

input[type="range"]:focus {
  outline: none;
}

input[type="range"]:focus::-webkit-slider-runnable-track {
  background: #475569;
}

/* Canvas Area */
.blur-main {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 1.25rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: fit-content;
  align-self: start;
  overflow: hidden;
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.canvas-container {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  width: 100%;
  min-height: 300px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: repeating-conic-gradient(#1e293b 0% 25%, #0f172a 0% 50%) 50% /
    20px 20px;
}

.canvas-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  color: #475569;
}

.canvas-placeholder svg {
  color: #334155;
}

canvas {
  max-width: 100%;
  height: auto;
  display: block;
  cursor: crosshair;
  z-index: 10;
  transform-origin: 0 0;
}

/* Utility */
.w-full {
  width: 100%;
}

.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  border-radius: 0.75rem;
  font-size: 1rem;
}

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

.controls label {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #cbd5e1;
}

input[type="range"] {
  accent-color: var(--primary-color);
}
/* Footer */
.footer {
  margin-top: auto; /* Push to bottom of flex container */
  padding: 1.5rem 3rem;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--glass-border);
  width: 100%;
}

.footer-content {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.footer-copyright {
  color: #64748b;
  font-size: 0.95rem;
}

.drayko-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.drayko-link:hover {
  color: white;
  text-shadow: 0 0 10px var(--primary-glow);
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-link {
  color: #64748b;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: white;
}

/* Content Pages (Privacy/Terms) */
.content-container {
  max-width: 800px;
  margin: 8rem auto 4rem;
  padding: 0 2rem;
  line-height: 1.6;
}

.content-container h1 {
  margin-top: 0;
  margin-bottom: 2rem;
}

.content-container h2 {
  margin: 2rem 0 1rem;
  color: var(--primary-color);
}

.content-container p {
  color: #cbd5e1;
  margin-bottom: 1rem;
}

.content-container ul {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
  color: #cbd5e1;
}

.content-container li {
  margin-bottom: 0.5rem;
}

.legal-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 1.5rem;
  padding: 3rem;
  backdrop-filter: blur(12px);
}

@media (max-width: 640px) {
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}
