/* Main CSS for Image Format Converter - Updated Design */

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background: #f4f6f9;
  color: #333;
  line-height: 1.6;
  min-height: 100vh;
}

/* Navigation Styles */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #2c3e50 !important;
  color: #fff;
  padding: 15px 30px;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  backdrop-filter: none !important;
}

.nav-brand {
  font-size: 1.5rem;
  font-weight: 600;
  color: #fff;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 20px;
  align-items: center;
}

.nav-links li {
  position: relative;
}

.nav-links a {
  color: #fff;
  text-decoration: none;
  padding: 10px;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: #1abc9c;
}

/* Dropdown styles */
.dropdown {
  position: relative;
}

.dropdown-content {
  display: none;
  position: absolute;
  background: #34495e;
  min-width: 200px;
  max-width: 250px;
  top: 100%;
  right: 0;
  list-style: none;
  box-shadow: 0 8px 16px rgba(0,0,0,0.25);
  border-radius: 8px;
  overflow: hidden;
  z-index: 1001;
  margin-top: 5px;
  border: 1px solid #2c3e50;
  transform: translateX(0);
}

/* Ensure dropdown stays within viewport */
@media (max-width: 768px) {
  .dropdown-content {
    right: -10px;
    min-width: 180px;
  }
}

/* For very small screens */
@media (max-width: 480px) {
  .dropdown-content {
    right: -20px;
    min-width: 160px;
    max-width: 200px;
  }
}

.dropdown:hover .dropdown-content {
  display: block;
}

.dropdown-content li {
  list-style: none;
}

.dropdown-content li a {
  padding: 12px 16px;
  display: block;
  color: #fff;
  white-space: nowrap;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.dropdown-content li:last-child a {
  border-bottom: none;
}

.dropdown-content li a:hover {
  background: #1abc9c;
  color: #fff;
  padding-left: 20px;
  transition: all 0.3s ease;
}

/* Hero Section */
.hero {
  background: linear-gradient(to right, #00b4db, #0083b0);
  color: #fff;
  padding: 60px 30px;
  text-align: center;
  animation: fadeIn 1s ease-in-out;
  margin-top: 60px;
}

.hero h1 {
  font-size: 2.8rem;
  margin-bottom: 15px;
}

.hero p {
  font-size: 1.1rem;
  max-width: 700px;
  margin: auto;
  line-height: 1.6;
}

/* Main content */
.content {
  padding: 40px 20px;
  display: flex;
  justify-content: center;
  max-width: 1200px;
  margin: 0 auto;
}

.tool-container {
  max-width: 600px;
  width: 100%;
  background: #fff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
  animation: slideUp 0.7s ease;
  margin-bottom: 2rem;
}

.tool-container h2 {
  margin-bottom: 20px;
  font-size: 1.6rem;
  color: #333;
}

/* Image Preview Box */
.img-preview-box {
  margin: 20px 0;
  text-align: center;
}

.img-preview-box img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid #ddd;
}

/* Form Elements */
#imageInput,
#formatSelect {
  display: block;
  width: 100%;
  margin: 15px 0;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  color: #333;
  background: #fff;
}

#imageInput {
  border: 2px dashed #0083b0;
  cursor: pointer;
  transition: border-color 0.3s ease;
}

#imageInput:hover {
  border-color: #1abc9c;
}

.tool-btn {
  display: inline-block;
  width: auto;
  margin: 20px 0;
  padding: 12px 25px;
  background: #0083b0;
  color: white;
  border: none;
  border-radius: 25px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.tool-btn:hover {
  background: #006b8e;
  transform: translateY(-2px);
}

/* Downloads Section */
#downloads {
  margin-top: 2rem;
}

#downloads a {
  display: block;
  padding: 0.75rem;
  margin: 0.5rem 0;
  background: #f8f9fa;
  border-radius: 8px;
  color: #0083b0;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid #e9ecef;
}

#downloads a:hover {
  background: #e9ecef;
  transform: translateX(10px);
  color: #006b8e;
}

/* Internal Section Styling */
.internal {
  background: linear-gradient(135deg, #f9fcff, #e6f2ff);
  border: 1px solid #cfdfff;
  padding: 20px;
  margin: 40px auto;
  border-radius: 14px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  max-width: 720px;
  transition: all 0.3s ease-in-out;
}

.internal:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.internal p {
  font-size: 1.1rem;
  color: #333;
  line-height: 1.6;
}

.internal a {
  color: #007bff;
  font-weight: 600;
  text-decoration: none;
  position: relative;
  transition: all 0.3s ease;
}

.internal a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 2px;
  background: #007bff;
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.internal a:hover {
  color: #0056cc;
}

.internal a:hover::after {
  transform: scaleX(1);
}

/* Progress bar styling */
#progressBar {
  width: 100%;
  height: 20px;
  border-radius: 10px;
  overflow: hidden;
  background: #e9ecef;
  margin-top: 10px;
}

#progressBar::-webkit-progress-bar {
  background: #e9ecef;
  border-radius: 10px;
}

#progressBar::-webkit-progress-value {
  background: linear-gradient(45deg, #0083b0, #1abc9c);
  border-radius: 10px;
}

/* Footer */
.footer {
  background: #0f172a;
  color: #f1f5f9;
  padding: 24px 16px;
  font-family: 'Poppins', sans-serif;
  margin-top: 40px;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  max-width: 1200px;
  margin: auto;
}

.footer-column h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #38bdf8;
}

.footer-column ul {
  list-style: none;
  padding: 0;
}

.footer-column ul li {
  margin: 4px 0;
}

.footer-column ul li a {
  color: #e2e8f0;
  text-decoration: none;
  transition: color 0.3s ease;
  font-size: 14px;
  line-height: 1.3;
}

.footer-column ul li a:hover {
  color: #38bdf8;
}

.footer-bottom {
  text-align: center;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #334155;
  font-size: 13px;
  color: #94a3b8;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Responsive design */
@media (max-width: 768px) {
  nav {
    padding: 15px 20px;
  }

  .nav-links {
    gap: 15px;
  }

  .hero {
    padding: 40px 20px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .tool-container {
    padding: 20px;
    margin: 20px;
  }

  .content {
    padding: 20px 10px;
  }
}
