/* ---------------------------
   Base
----------------------------*/
body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #f7f9fc;
  margin: 0;
  padding: 0;
  color: #333;
}

html, body {
  height: 100%;
  display: flex;
  flex-direction: column;
}

main.container {
  flex: 1 0 auto;
  width: 100%;
  padding: 0;
  background-color: transparent;
}

.container {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 2rem;
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* ---------------------------
   Logo
----------------------------*/
.logo-img {
  height: 40px;
  vertical-align: middle;
  animation: scaleIn 1s ease-out both;
}

@keyframes scaleIn {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* ---------------------------
   Navbar Layout
----------------------------*/
.navbar {
  background-color: #1e1e2f;
  padding: 1rem 0;
  color: white;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-shrink: 0;
}

.main-nav a,
.dropbtn {
  color: white;
  background: none;
  border: none;
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
}

/* ---------------------------
   Dropdown
----------------------------*/
.dropdown {
  position: relative;
}

.dropdown-content {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 0.75rem;
  background-color: white;
  padding: 1rem;
  border-radius: 10px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  position: absolute;
  top: 100%;
  left: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.dropdown:hover .dropdown-content {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.dropdown-content a {
  text-decoration: none;
  color: #333;
  background-color: #f9f9f9;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-weight: 500;
  text-align: center;
  transition: background 0.3s ease;
}

.dropdown-content a:hover {
  background-color: #6c63ff;
  color: white;
}

/* ---------------------------
   Auth
----------------------------*/
.auth-links {
  display: flex;
  gap: 0.5rem;
}

.btn-small {
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  text-decoration: none;
  background: #6c63ff;
  color: white;
  border-radius: 5px;
  transition: background 0.3s ease;
}

.btn-small:hover {
  background: #574fd6;
}

.btn-secondary {
  background: white;
  color: #6c63ff;
  border: 1px solid #6c63ff;
}

.btn-secondary:hover {
  background: #6c63ff;
  color: white;
}

.user-greeting {
  color: white;
  font-size: 0.9rem;
  margin-right: 0.75rem;
  font-weight: 500;
}

/* ---------------------------
   Container
----------------------------*/
.container {
  max-width: 100%;
  margin: 0 auto;
  padding: 2rem 1rem; /* keep vertical padding */
  background: white;
  border-radius: 0; /* remove rounded corners */
  box-shadow: none; /* remove box shadow if needed */
}

/* ---------------------------
   Tool Grid
----------------------------*/
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
}

/* ---------------------------
   Hamburger (Mobile Only)
----------------------------*/
.hamburger {
  display: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: white;
}

/* Hide checkbox on all views */
.nav-toggle {
  display: none;
}

/* ---------------------------
   Responsive Navigation
----------------------------*/
@media (max-width: 500px) {
  .hamburger {
    display: block;
  }
.main-nav {
    display: none;
    flex-direction: column;
    background: #1e1e2f;
    width: 100%;
    position: absolute;
    top: 60px;
    left: 0;
    padding: 1rem 0;
    z-index: 1000;
  }
/* Show nav when checkbox is checked */
  .nav-toggle:checked + .hamburger + .main-nav {
    display: flex;
  }
  .tool-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    gap: 1rem;
  }

  .tool-card {
    padding: 1rem;
  }

  .tool-icon-img {
    width: 48px;
    height: 48px;
  }

  .tool-card h3 {
    font-size: 1rem;
  }

  .tool-card p {
    font-size: 0.85rem;
  }
}


/* ---------------------------
   Flash
----------------------------*/
.flash-messages {
  list-style: none;
  padding: 1rem;
  margin: 0;
  background-color: #fff3cd;
  color: #856404;
  border-radius: 6px;
  margin-bottom: 1rem;
}

/* ---------------------------
   Hero Section
----------------------------*/
.hero {
  background: linear-gradient(to right, #6c63ff, #7c71f5);
  color: white;
  padding: 5rem 2rem;
  text-align: center;
  animation: fadeSlideIn 1s ease-out both;
}

@keyframes fadeSlideIn {
  0% { opacity: 0; transform: translateY(30px); }
  100% { opacity: 1; transform: translateY(0); }
}

.hero-text h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero-text p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

.cta-button {
  background: white;
  color: #6c63ff;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.cta-button:hover {
  background: #574fd6;
  color: white;
}

/* ---------------------------
   Tools Section
----------------------------*/
.tools-section {
  padding: 3rem 1.5rem;
  background-color: #f8f9fb;
  text-align: center;
}

.section-title {
  font-size: 2rem;
  margin-bottom: 2rem;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.tool-card {
  background: white;
  border-radius: 10px;
  padding: 1.25rem 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  transition: transform 0.2s ease;
}

.tool-card:hover {
  transform: translateY(-6px);
}

.tool-icon-img {
  width: 64px;
  height: 64px;
  margin-bottom: 1rem;
}

@keyframes floatIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Tool Title */
.tool-card h3 {
  font-size: 1.1rem;
  margin: 0.5rem 0 0.25rem;
}

/* Tool Description */
.tool-card p {
  font-size: 0.9rem;
  line-height: 1.4;
  margin: 0;
  color: #555;
}
/* ---------------------------
   Footer
----------------------------*/
.site-footer {
  background-color: #1e1e2f;
  color: white;
  font-size: 0.9rem;
  padding: 1rem 0;
  box-shadow: 0 -2px 6px rgba(0,0,0,0.05);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.footer-left a {
  margin-right: 1rem;
  color: #ccc;
  text-decoration: none;
  font-weight: 500;
}

.footer-left a:hover {
  text-decoration: underline;
  color: #fff;
}

.footer-right {
  text-align: center;
  color: #ccc;
}

.tool-form {
  background-color: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.tool-form h2 {
  margin-bottom: 1rem;
}

.upload-form {
  margin-top: 1rem;
}

.form-group {
  margin-bottom: 1.5rem;
  text-align: left;
}

input[type="file"] {
  width: 100%;
  padding: 0.5rem;
}

.btn-submit {
  background: #6c63ff;
  color: white;
  padding: 0.7rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}

.btn-submit:hover {
  background: #574fd6;
}

.result {
  margin-top: 2rem;
}

/* Blog Page */
.blog-section {
  padding: 4rem 2rem;
  background-color: #fefefe;
  text-align: center;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.blog-card {
  background-color: white;
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  text-align: left;
}

.blog-card h3 {
  margin-top: 0;
  color: #333;
}

.blog-card h3 a {
  color: #6c63ff;
  text-decoration: none;
}

.blog-card h3 a:hover {
  text-decoration: underline;
}

.blog-date {
  font-size: 0.9rem;
  color: #888;
  margin-bottom: 1rem;
}

.read-more {
  color: #6c63ff;
  font-weight: 500;
  text-decoration: none;
}

.read-more:hover {
  text-decoration: underline;
}

.about-section {
  padding: 4rem 2rem;
  background-color: #f8f9fb;
}

.about-container {
  max-width: 900px;
  margin: 0 auto;
  background: white;
  padding: 3rem;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
}

.about-intro {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: #444;
}

.about-content h2 {
  margin-top: 2rem;
  color: #6c63ff;
}

.about-content p,
.about-content ul {
  font-size: 1rem;
  color: #555;
  line-height: 1.6;
}

.about-content ul {
  padding-left: 1.5rem;
  list-style: disc;
}

.tools-content {
  max-width: 100%;
  margin: 0 auto;
  border-radius: 0;
  padding: 3rem 1rem;
  box-shadow: none;
}

.tools-content h2, .tools-content h3 {
  color: #333;
  margin-bottom: 1rem;
}

.tools-content ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 2rem;
}

.tools-content p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

.flash-messages p.flash {
  background-color: #ffe0e0;
  padding: 0.75rem;
  border-left: 4px solid #ff4d4d;
  color: #333;
  margin-bottom: 1rem;
}

.file-stats {
  font-size: 0.95rem;
  margin-top: 0.5rem;
  color: #555;
}

.flash-messages p.flash {
  background: #ffe5e5;
  padding: 0.75rem;
  border-left: 4px solid #e74c3c;
  margin-top: 1rem;
  font-weight: 500;
}

/* Fade out flash messages */
.flash-messages.fade-out {
  opacity: 0;
  transition: opacity 0.5s ease-out;
  height: 0;
  overflow: hidden;
}

/* Loading button style */
button.loading {
  opacity: 0.7;
  pointer-events: none;
  cursor: wait;
}
