:root {
  --primary-blue: #013d7a;
  --secondary-blue: #0066cc;
  --accent-pink: #ff3366;
  --light-bg: #f0f7ff;
  --card-bg: #ffffff;
  --text-dark: #333;
  --text-light: #666;
  --border-color: #e1e8f0;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  --success-green: #28a745;
  --warning-orange: #ffc107;
  --error-red: #dc3545;
  --info-blue: #17a2b8;
  --footer-bg: #0a192f;
  --footer-text: #ccd6f6;
  --footer-heading: #e6f1ff;
  --footer-border: #233554;
  --footer-hover: #64ffda;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  color: #2b2d42;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header Styles */
.header {
  background: white;
  position: sticky;
  top: 0;
  width: 100%;
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  box-shadow: var(--shadow);
  z-index: 1000;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo {
  color: black;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
}

.logo a:hover {
  color: var(--accent-pink);
}

/* Navigation */
.nav-links {
  display: flex;
  margin-left: 40px;
}

.nav-item {
  position: relative;
  color: black;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 10px 16px;
  transition: color 0.3s;
  display: flex;
  align-items: center;
  gap: 5px;
}

.links a {
  color: black;
  text-decoration: none;
}

.links a:hover {
  color: var(--accent-pink);
}

.nav-item:hover {
  color: var(--accent-pink);
}

.mainpage {
  color: black;
  text-decoration: none;
}

.dropdown-icon {
  font-size: 12px;
  transition: transform 0.3s ease;
}

.nav-item:hover .dropdown-icon {
  transform: rotate(180deg);
}

/* Mega Dropdown Styles */
.mega-dropdown {
  position: absolute;
  top: 50px;
  left: -750px;
  background-color: white;
  width: 1200px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  padding: 30px;
  display: none;
  z-index: 1001;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  border-top: 3px solid var(--accent-pink);
}

.nav-item:hover .mega-dropdown {
  display: grid;
  animation: fadeIn 0.3s ease;
}

.dropdown-section h3 {
  color: var(--primary-blue);
  font-size: 0.9rem;
  margin-bottom: 15px;
  padding-bottom: 8px;
  display: flex;
  align-items: center;
}

.dropdown-section h3 i {
  margin-right: 10px;
  color: var(--accent-pink);
  background: rgba(255, 51, 102, 0.1);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dropdown-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dropdown-link {
  display: flex;
  align-items: center;
  color: var(--text-dark);
  text-decoration: none;
  font-size: 0.7rem;
  padding: 5px;
  border-radius: 4px;
  transition: all 0.2s;
}

.dropdown-link:hover {
  background-color: #f0f7ff;
  color: var(--accent-pink);
  transform: translateX(5px);
}

.dropdown-link i {
  margin-right: 12px;
  color: var(--secondary-blue);
  width: 20px;
  text-align: center;
  font-size: 14px;
}

/* Mobile Toggle */
.mobile-toggle {
  margin-left: auto;
  display: none;
  background: none;
  border: none;
  color: var(--accent-pink);
  font-size: 24px;
  cursor: pointer;
}

/* Mobile Sidebar */
.mobile-sidebar {
  position: fixed;
  top: 60px;
  left: -100%;
  width: 100%;
  height: calc(100vh - 60px);
  background-color: white;
  z-index: 999;
  transition: all 0.4s ease;
  overflow-y: auto;
  padding: 20px;
  box-shadow: var(--shadow);
}

.mobile-sidebar.active {
  left: 0;
}

.mobile-category {
  margin-top: 20px;
}

.mobile-category-title {
  font-size: 18px;
  color: var(--primary-blue);
  font-weight: 500;
  margin-bottom: 15px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent-pink);
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-category-title i {
  color: var(--accent-pink);
}

.mobile-tool-link {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  text-decoration: none;
  border-radius: 6px;
  margin-bottom: 8px;
  font-weight: 500;
  transition: all 0.2s;
  background: #f8fafd;
  color: var(--text-dark);
}

.mobile-tool-link:hover {
  background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
  transform: translateX(5px);
  color: var(--accent-pink);
}

.mobile-tool-link i {
  margin-right: 15px;
  color: var(--secondary-blue);
  font-size: 18px;
  width: 24px;
  text-align: center;
}

/* Tool Container */
.tool-container {
  max-width: 1000px;
  margin: 40px auto 200px;
  padding: 0 20px;
  flex: 1;
}

.tool-header {
  text-align: center;
  margin-bottom: 40px;
}

.tool-header h1 {
  color: var(--footer-bg);
  font-size: 2.8rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  margin-bottom: 15px;
}

.tool-header p {
  color: var(--text-light);
  font-size: 1.2rem;
  max-width: 1100px;
  margin: 0 auto;
  line-height: 1.8;
}

.feature-badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.badge {
  background: rgba(0, 102, 204, 0.1);
  color: var(--primary-blue);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge i {
  color: var(--accent-pink);
}

.tool-card {
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 30px;
  transition: transform 0.3s ease;
}

.tool-card:hover {
  transform: translateY(-5px);
}

.card-header {
  background-color: var(--primary-blue);
  padding: 20px;
  color: white;
  display: flex;
  align-items: center;
  gap: 15px;
}

.card-header i {
  font-size: 28px;
}

.card-header h2 {
  font-size: 1.8rem;
  font-weight: 600;
}

.card-content {
  padding: 30px;
}

.input-group {
  margin-bottom: 25px;
  position: relative;
}

.input-group label {
  display: block;
  margin-bottom: 10px;
  font-weight: 500;
  color: var(--text-dark);
  font-size: 1.1rem;
}

textarea {
  width: 100%;
  height: 200px;
  padding: 15px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  resize: vertical;
  transition: border-color 0.3s;
  font-family: 'Courier New', monospace;
  background-color: #f8fafd;
}

textarea:focus {
  outline: none;
  border-color: var(--secondary-blue);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.stats {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--text-light);
}

.btn-group {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-bottom: 15px;
}

.btn {
  padding: 14px 28px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-primary {
  background: var(--primary-blue);
  color: white;
  box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 102, 204, 0.4);
  background: var(--accent-pink);
}

.btn-secondary {
  background: var(--primary-blue);
  color: white;
  box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.btn-secondary:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
  background: var(--accent-pink);
}

.btn-success {
  background: var(--success-green);
  color: white;
}

.btn-success:hover {
  transform: translateY(-3px);
  background: #218838;
}

.btn-accent {
  background: var(--accent-pink);
  color: white;
}

.btn-accent:hover {
  transform: translateY(-3px);
  background: #e02e58;
}

.btn-warning {
  background: var(--warning-orange);
  color: #212529;
}

.btn-warning:hover {
  background: #e0a800;
}

.btn-info {
  background: var(--info-blue);
  color: white;
}

.btn-info:hover {
  background: #138496;
}

.swap-container {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}

.btn-swap {
  background: linear-gradient(135deg, var(--primary-blue), var(--accent-pink));
  color: white;
  padding: 12px 24px;
  border-radius: 50px;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-swap:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.preview-section {
  margin-top: 30px;
  background: #f8fafd;
  border-radius: 8px;
  padding: 20px;
  border: 1px solid var(--border-color);
}

.preview-section h3 {
  margin-bottom: 15px;
  color: var(--primary-blue);
  display: flex;
  align-items: center;
  gap: 10px;
}

.preview-container {
  padding: 15px;
  border: 1px dashed var(--border-color);
  border-radius: 8px;
  min-height: 100px;
  background: white;
}

.copyright {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 20px 30px;
  text-align: center;
  margin-top: auto;
  border-top: 1px solid var(--border-color);
}

/* Notification */
.notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--success-green);
  color: white;
  padding: 15px 25px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  align-items: center;
  gap: 10px;
}

.notification.show {
  opacity: 1;
}

/* Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
  .mega-dropdown {
    width: 700px;
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .nav-links {
    display: none;
  }

  .mobile-toggle {
    display: block;
  }

  .mega-dropdown {
    width: 500px;
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header {
    height: 70px;
  }

  .logo {
    font-size: 22px;
  }

  .logo-icon {
    font-size: 24px;
  }

  .mobile-sidebar {
    top: 70px;
    height: calc(100vh - 70px);
  }

  .tool-header h1 {
    font-size: 2.2rem;
  }

  .card-header {
    padding: 15px;
  }

  .card-header h2 {
    font-size: 1.5rem;
  }

  .card-content {
    padding: 20px;
  }

  textarea {
    height: 150px;
  }

  .btn {
    padding: 12px 20px;
    font-size: 0.95rem;
    flex: 1;
    min-width: 120px;
  }
}