/* DocuConvert Modern UI Theme */
:root {
  --bg-dark: #0f172a;
  --bg-card: #1e293b;
  --bg-hover: #334155;
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --accent: #06b6d4;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: #334155;
  --radius: 12px;
  --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 2rem;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.3rem;
  list-style: none;
}

@media (max-width: 900px) {
  .header-container {
    flex-wrap: wrap;
    gap: 0.8rem;
  }
  .nav-links {
    order: 3;
    width: 100%;
    gap: 0.7rem 1.1rem;
  }
  .nav-links a {
    font-size: 0.85rem;
  }
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--text-main);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  font-weight: 500;
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0;
  transition: color 0.2s;
}

.nav-dropdown-toggle:hover, .nav-dropdown-toggle.active-group {
  color: var(--text-main);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.8rem);
  left: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.5rem;
  min-width: 190px;
  box-shadow: var(--shadow);
  z-index: 200;
  flex-direction: column;
  gap: 0.2rem;
}

.nav-dropdown.open .nav-dropdown-menu {
  display: flex;
}

.nav-dropdown-menu a {
  padding: 0.45rem 0.7rem;
  border-radius: 6px;
  white-space: nowrap;
}

.nav-dropdown-menu a:hover {
  background: var(--bg-hover);
}

@media (max-width: 900px) {
  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    margin-top: 0.4rem;
    border-color: var(--border-color);
  }
}

.badge-privacy {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.35rem 0.8rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.hero {
  text-align: center;
  padding: 4rem 1.5rem 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero h1 span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.main-container {
  max-width: 1200px;
  margin: 0 auto 4rem;
  padding: 0 1.5rem;
  width: 100%;
  flex: 1;
}

.converter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.8rem;
  text-decoration: none;
  color: var(--text-main);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
  overflow: hidden;
}

.tool-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 12px 30px -10px rgba(99, 102, 241, 0.3);
}

.tool-icon {
  width: 48px;
  height: 48px;
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.2rem;
}

.tool-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.tool-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.workspace {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow);
  max-width: 800px;
  margin: 0 auto;
}

.dropzone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius);
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: rgba(15, 23, 42, 0.5);
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
}

.dropzone-icon {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  padding: 0.9rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.btn-primary:hover {
  opacity: 0.95;
  transform: scale(1.02);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.preview-box {
  margin-top: 1.5rem;
  padding: 1rem;
  background: var(--bg-dark);
  border-radius: 8px;
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
}

.preview-box pre {
  font-family: monospace;
  font-size: 0.85rem;
  color: #a7f3d0;
  white-space: pre-wrap;
  word-break: break-all;
}

.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: auto;
}

.footer a {
  color: var(--primary);
  text-decoration: none;
}
