
    html, body {
      margin: 0;
      padding: 0;
  height: 100%;
      max-width: 100vw;
      overflow-x: hidden;
      font-family: 'Inter', sans-serif;
      background: #f7f7f7;
      color: #222;
    }

    body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

    *, *::before, *::after {
      box-sizing: border-box;
    }

    /* Navbar */
    .navbar {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 1rem 1.5rem;
      background-color: #1f2937;
      color: white;
      flex-wrap: wrap;
    }

    .navbar .left {
      display: flex;
      align-items: center;
      gap: 1rem;
      cursor: pointer;
    }

    .navbar .right {
      display: flex;
      align-items: center;
      gap: 1rem;
    }

.logo img {
  display: block;
  max-height: 48px;
}

    .site-name {
      font-size: 1.25rem;
      font-weight: 600;
    }

/* Because about.css overwrites a, preserve navigation panel link  */
    .right a {
      color: #ccc;
      text-decoration: none;
      font-size: 0.9rem;
    }

    main {
      padding: 1rem 2rem;
      flex: 1;
      display: flex;
      flex-direction: column;
      gap: 1.5rem;
    }

    h1.template-name {
      font-size: 1.5rem;
      font-weight: 600;
      margin-top: 1rem;
    }

    .editor-container {
      display: flex;
      flex-wrap: wrap;
      gap: 2rem;
    }

    .left-panel {
      flex: 2;
      min-width: 280px;
      display: flex;
      flex-direction: column;
      gap: 1rem;
    }

    .right-panel {
      flex: 1;
      min-width: 220px;
      display: flex;
      flex-direction: column;
      gap: 1rem;
      background: white;
      border-radius: 8px;
      padding: 1rem;
      box-shadow: 0 0 10px rgba(0,0,0,0.05);
    }

.aspect-ratio {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.aspect-ratio label {
  flex: 0 0 auto;
 
}

.aspect-ratio select {
  flex: 1;
      padding: 0.4rem;
      border: 1px solid #ccc;
      border-radius: 4px;
}

	
#canvas {
  width: 100%;
  max-height: 70vh;
  height: auto;
  background-color: #111;
  border-radius: 8px;
  display: block;
  aspect-ratio: 16 / 9; /* Default aspect ratio */
  pointer-events:none;
  object-fit: contain; /* optional: makes it scale nicely */
  margin: 0 auto;       /* optional: center horizontally */
}


    .play-controls {
      display: flex;
      align-items: center;
      gap: 1rem;
      margin-top: 0.5rem;
    }

    .play-button {
      padding: 0.5rem 1rem;
      background: #007BFF;
      color: white;
      border: none;
      border-radius: 5px;
      cursor: pointer;
    }

    .timeline {
      margin-top: 0.5rem;
    }

    .timeline input[type="range"] {
      width: 100%;
    }
	
	
#timeline {
  -webkit-appearance: none;
  width: 100%;
  height: 12px;
  background: transparent;
  outline: none;
  margin: 10px 0;
}

/* --- WebKit (Chrome, Safari, Edge) --- */

/* Track with dynamic fill: blue for progress, light gray for remainder */
#timeline::-webkit-slider-runnable-track {
  height: 12px;
  background: linear-gradient(
    to right,
    #3b82f6 0%,
    #3b82f6 var(--progress),
    #e5e5e5 var(--progress),
    #e5e5e5 100%
  );
  border-radius: 6px;
}

/* Thumb styled as orange/red playhead */
#timeline::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 6px;
  height: 24px;
  background: #ef4444;
  border: none;
  border-radius: 2px;
  margin-top: -6px;
  cursor: pointer;
  box-shadow: 0 0 0 1px #0003;
  position: relative;
  z-index: 2;
}

/* --- Firefox Support --- */

#timeline::-moz-range-track {
  height: 12px;
  background: #e5e5e5;
  border-radius: 6px;
}

#timeline::-moz-range-progress {
  height: 12px;
  background: #3b82f6;
  border-radius: 6px;
}

#timeline::-moz-range-thumb {
  width: 6px;
  height: 24px;
  background: #ef4444;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  box-shadow: 0 0 0 1px #0003;
  position: relative;
  z-index: 2;
}

	
	
	
	

    .param {
      display: flex;
      flex-direction: column;
      gap: 0.3rem;
    }

    .param label {
      font-size: 0.9rem;
      font-weight: 500;
    }
	
	

    .param input, .param select {
      padding: 0.4rem;
      border: 1px solid #ccc;
      border-radius: 4px;
    }
	
input[type="color"] {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  width: 100%;
  height: 32px;
  padding: 0;
  border-radius: 6px;
  cursor: pointer;
  background-color: transparent;
  box-shadow: 0 0 0 1px #ccc inset;
}

/* Optional: add hover/focus effect */
input[type="color"]:hover,
input[type="color"]:focus {
  box-shadow: 0 0 0 2px #3b82f6 inset;
}


    .bottom-controls {
      margin-top: 2rem;
      display: flex;
      flex-wrap: wrap;
      gap: 1rem;
      align-items: center;
    }

    .bottom-controls input,
    .bottom-controls select {
      padding: 0.4rem;
    }

    .generate-button {
      padding: 0.5rem 1rem;
      background-color: #10b981;
      color: white;
      border: none;
      border-radius: 5px;
      cursor: pointer;
    }







    /* Grid */
    .grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
      gap: 1.5rem;
      padding: 2rem;
    }

    .item {
      background: white;
      border-radius: 12px;
      overflow: hidden;
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
      transition: transform 0.2s, box-shadow 0.2s;
      cursor: pointer;
    }

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

    .media-wrapper {
      position: relative;
      width: 100%;
      padding-top: 56.25%; /* 16:9 */
      background-color: #eee;
    }

    .media-wrapper img,
    .media-wrapper video {
      position: absolute;
      top: 0; left: 0;
      width: 100%; height: 100%;
      object-fit: cover;
      transition: opacity 0.3s ease-in-out;
    }

    .media-wrapper video {
      opacity: 0;
      pointer-events: none;
    }

    .item.selected video {
      opacity: 1;
    }

    .item.selected img {
      opacity: 0;
    }

    .content {
      padding: 1rem;
    }

    .item-title {
      font-size: 1.1rem;
      font-weight: 600;
      margin-bottom: 0.5rem;
      color: #222;
    }

    .edit-button {
      display: inline-block;
      padding: 0.5rem 0.9rem;
      font-size: 0.9rem;
      border: none;
      background-color: #007BFF;
      color: white;
      border-radius: 6px;
      cursor: pointer;
      transition: background 0.2s;
    }

    .edit-button:hover {
      background-color: #0056b3;
    }

    @media (hover: hover) {
      .item:hover video {
        opacity: 1;
      }
    }











footer {
  margin-top: 3rem;
  background: #1f2937;
  color: white;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between; /* Pushes left & right divs apart */
  align-items: center; /* Vertically centers items */
  flex-wrap: wrap;
}

.footer-left,
.footer-right {
  display: flex;
  gap: 1.5rem;
}
	
	
	
	
	

    footer a {
      color: #ddd;
      text-decoration: none;
    }

    footer a:hover {
      text-decoration: underline;
    }
	
.social-icon {
    width: 24px;
    height: 24px;
	fill: #ddd;
	transition: fill 0.3s;
  }
    .social-icon:hover {
    fill: #0077b5;
  }

    @media (max-width: 768px) {
      .grid {
        padding: 1rem;
      }
  .aspect-ratio {
    flex-direction: column;
    align-items: stretch;
  }
      .editor-container {
        flex-direction: column;
      }
    }
