/* Reset + base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: #006400;
  color: #111;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding: 1rem;
}

/* Header */
header {
  margin: 2rem 0;
}

header h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 900;
  letter-spacing: 1px;
  color: #111;
  background: #fff;
  padding: 0.5rem 1.2rem;
  border-radius: 1rem;
  margin-bottom: 0.5rem;
  display: inline-block;
  box-shadow: 4px 4px 0 #000;
}

header h2, header p {
  font-family: 'Poppins', sans-serif;
  color: #ffffff;         
}

header p {
  margin-top: 0.5rem;
  font-size: 1rem;
  color: #f1f1f1;
}

/* Navigation */
.nav-container {
  width: 100%;
  max-width: 600px;
  margin: 1rem 0 2rem 0;
}

.converter-tabs {
  display: flex;
  background: #fff;
  border-radius: 1rem;
  padding: 0.3rem;
  box-shadow: 4px 4px 0 #000;
  gap: 0.3rem;
}

.tab-link {
  padding: 0.5rem 1rem;
  margin: 0 0.25rem;
  text-decoration: none;
  font-weight: 600;
  color: #111;
  border-radius: 0.5rem;
  background: #eee;
  transition: background 0.2s ease;
}

.tab-link:hover {
  background: #ddd;
}

.tab-link.active {
  background: #ff4d6d; /* pink highlight */
  color: #fff;
}

.tab-link:not(.active) {
  background: transparent;
  color: #666;
}

.tab-link:not(.active):hover {
  background: #f5f5f5;
  color: #333;
}

/* Card form */
main.card {
  background: #fff;
  border-radius: 1.5rem;
  padding: 2rem;
  max-width: 480px;
  width: 100%;
  box-shadow: 6px 6px 0 #000;
  margin-bottom: 2rem;
}

/* Inputs + buttons */
input[type="file"] {
  display: block;
  margin: 1rem auto;
  font-size: 1rem;
  cursor: pointer;
}

button {
  display: block;
  width: 100%;
  padding: 0.8rem 1rem;
  margin: 1rem 0;
  font-size: 1.1rem;
  font-weight: bold;
  border: none;
  border-radius: 0.8rem;
  cursor: pointer;
  background-color: #ff4d6d; /* playful pink/red */
  color: #fff;
  box-shadow: 4px 4px 0 #000;
  transition: all 0.2s ease;
}

button:disabled {
  background: #ccc;
  color: #666;
  cursor: not-allowed;
  box-shadow: none;
}

button:hover:not(:disabled) {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 #000;
}

/* Download link styled as button */
.download-link {
  display: block;
  width: 100%;
  padding: 0.8rem 1rem;
  margin-top: 1rem;
  font-size: 1.1rem;
  font-weight: bold;
  text-decoration: none;
  text-align: center;
  border-radius: 0.8rem;
  background: #2ab7ca; /* teal accent */
  color: #fff;
  box-shadow: 4px 4px 0 #000;
  transition: all 0.2s ease;
}

.download-link:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 #000;
}

/* Canvas preview styling */
#canvas {
  max-width: 100%;
  height: auto;
  border: 2px solid #ddd;
  border-radius: 0.8rem;
  margin: 1rem 0;
  display: none; /* Hidden by default */
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Show canvas when image is loaded */
#canvas.loaded {
  display: block;
}

/* Preview container for better spacing */
.preview-container {
  margin: 1rem 0;
  text-align: center;
}

.preview-label {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 0.5rem;
}

/* Info Section - Educational Content */
.info-section {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 1.5rem;
  padding: 2rem;
  margin: 2rem 0;
  max-width: 600px;
  width: 100%;
  box-shadow: 4px 4px 0 #000;
  color: #333;
}

.info-section h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.8rem;
  color: #006400;
  margin-bottom: 1.5rem;
  letter-spacing: 0.5px;
}

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

.info-item {
  text-align: left;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 0.8rem;
  border-left: 4px solid #ff4d6d;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.info-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.info-item strong {
  display: block;
  font-size: 1.1rem;
  font-weight: 600;
  color: #006400;
  margin-bottom: 0.5rem;
}

.info-item p {
  font-size: 0.9rem;
  line-height: 1.4;
  color: #555;
  margin: 0;
}

/* Notice */
.notice {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #444;
}

/* Ads container */
.ad-container {
  margin: 2rem 0;
  text-align: center;
}

/* Mobile responsive */
@media (max-width: 600px) {
  .converter-tabs {
    flex-direction: column;
  }
  
  header h1 {
    font-size: 2rem;
  }
  
  main.card {
    padding: 1.5rem;
  }
  
  .info-section {
    padding: 1.5rem;
  }
  
  .info-section h3 {
    font-size: 1.5rem;
  }
  
  .info-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .info-item {
    padding: 0.8rem;
    text-align: center;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
