* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #4f46e5;
  --primary-hover: #4338ca;
  --secondary-color: #0ea5e9;
  --accent-color: #8b5cf6;
  --text-color: #1f2937;
  --text-light: #6b7280;
  --bg-color: #f3f4f6;
  --card-bg: #ffffff;
  --border-color: #e5e7eb;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius: 0.75rem;
}

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
}

/* Header and Navigation Styles */
header {
  background: var(--card-bg);
  padding: 1rem 3%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border-color);
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-color);
}

.logo {
  font-weight: 700;
  font-size: 1.5rem;
}

.logo img {
  height: 40px;
  width: auto;
}

nav {
  display: flex;
  align-items: center;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

nav > ul > li {
  position: relative;
}

nav a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.3s ease;
  padding: 0.5rem 0;
}

nav a:hover {
  color: var(--primary-color);
}

nav a.active {
  color: var(--primary-color);
}

/* Dropdown Menu */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  min-width: 250px;
  border-radius: var(--radius);
  margin-top: 0.5rem;
  z-index: 1000;
  overflow: hidden;
}

nav li:hover .dropdown-menu {
  display: block;
  animation: fadeIn 0.2s ease-in-out;
}

@media (min-width: 769px) {
  .dropdown-menu.wide {
    min-width: 500px;
  }
  
  nav li:hover .dropdown-menu.wide {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.dropdown-menu a {
  display: block;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.dropdown-menu a:hover {
  background-color: #f9fafb;
  color: var(--primary-color);
}

/* Main Content Area */
main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Hero Section */
.hero {
  text-align: center;
  margin-bottom: 3rem;
}

h1 {
  color: var(--text-color);
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

/* Converter Container */
.container {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
}

/* Textarea Styling */
textarea {
  width: 100%;
  height: 150px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 1.1rem;
  font-family: inherit;
  resize: vertical;
  transition: all 0.3s ease;
  background-color: #f9fafb;
}

textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  background-color: white;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

/* Button Styling */
.button-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

button {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#convertBtn {
  background-color: var(--primary-color);
  color: white;
  flex: 2;
  justify-content: center;
}

#convertBtn:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}

button:not(#convertBtn) {
  background-color: white;
  border: 1px solid var(--border-color);
  color: var(--text-color);
  flex: 1;
  justify-content: center;
}

button:not(#convertBtn):hover {
  background-color: #f9fafb;
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* Output Container */
#outputContainer {
  background: #f8fafc;
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  position: relative;
}

#outputContainer h3 {
  color: var(--text-light);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

#hindiOutput {
  font-size: 1.25rem;
  color: var(--text-color);
  min-height: 3rem;
  word-wrap: break-word;
  line-height: 1.8;
}

/* Content Sections */
.content-section {
  background: var(--card-bg);
  padding: 2rem;
  margin: 2rem 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

h2 {
  color: var(--text-color);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

h3 {
  color: var(--text-color);
  margin: 1.5rem 0 0.5rem;
  font-size: 1.2rem;
}

ul, ol {
  margin-left: 2rem;
  margin-bottom: 1.5rem;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.feature-card {
  padding: 1.5rem;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: transform 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* Footer */
footer {
  background: var(--card-bg);
  color: var(--text-light);
  text-align: center;
  padding: 2rem;
  margin-top: 4rem;
  border-top: 1px solid var(--border-color);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
    position: relative;
  }

  .logo {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .mobile-menu-toggle {
    display: block;
    position: absolute;
    right: 1rem;
    top: 1rem;
  }
  
  nav ul {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 0;
    padding-top: 1rem;
  }

  nav ul.active {
    display: flex;
  }

  nav li {
    width: 100%;
    border-bottom: 1px solid var(--border-color);
  }

  nav a {
    display: block;
    padding: 0.75rem 0;
  }

  .dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    background: #f9fafb;
    width: 100%;
    display: none;
    padding-left: 1rem;
  }

  nav li:hover .dropdown-menu {
    display: block;
  }
  
  .button-group {
    flex-direction: column;
  }
}
