* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Comic Sans MS', cursive, sans-serif;
  background-color: #f0f0f0;
  line-height: 1.6;
  background-image: linear-gradient(45deg, #f0f0f0 25%, #e8e8e8 25%, #e8e8e8 50%, #f0f0f0 50%, #f0f0f0 75%, #e8e8e8 75%, #e8e8e8 100%);
  background-size: 40px 40px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

h1 {
  text-align: center;
  color: #333;
  margin-bottom: 30px;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.input-section {
  margin-bottom: 30px;
  background: white;
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

textarea {
  width: 100%;
  height: 150px;
  padding: 15px;
  border: 2px solid #ccc;
  border-radius: 8px;
  font-size: 16px;
  margin-bottom: 15px;
  resize: vertical;
  transition: border-color 0.3s ease;
}

textarea:focus {
  border-color: #4CAF50;
  outline: none;
  box-shadow: 0 0 5px rgba(76,175,80,0.3);
}

button {
  display: block;
  width: 200px;
  margin: 0 auto;
  padding: 12px 24px;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 25px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

button:hover {
  background-color: #45a049;
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0,0,0,0.2);
}

button:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
  transform: none;
}

.comic-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

@media (min-width: 2000px) {
  .comic-container {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (min-width: 2400px) {
  .comic-container {
    grid-template-columns: repeat(7, 1fr);
  }
}

@media (min-width: 2800px) {
  .comic-container {
    grid-template-columns: repeat(8, 1fr);
  }
}

.comic-panel {
  position: relative;
  background-color: white;
  border-radius: 15px;
  padding: 15px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
  border: 1px solid #ddd;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.comic-panel.loading {
  opacity: 0.5;
}

.comic-panel img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  transition: transform 0.3s ease;
  min-height: 200px;
}

.comic-panel:hover {
  transform: translateY(-5px);
}

.comic-panel:hover::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.3);
  z-index: 90;
  border-radius: 15px;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.panel-actions {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.95);
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 100;
  min-width: 200px;
}

.panel-actions.visible {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translate(-50%, -40%); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

.action-button {
  display: block;
  width: 100%;
  padding: 10px;
  margin: 8px 0;
  border: none;
  border-radius: 8px;
  background: #4CAF50;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
}

.action-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.action-button.regenerate {
  background: #2196F3;
}

.action-button.regenerate-text {
  background: #9C27B0;
}

.action-button.cancel {
  background: #666;
}

.action-button svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.action-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin: 20px 0;
}

.action-button {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #6200ea;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s ease;
}

.action-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.action-button svg {
  width: 24px;
  height: 24px;
}

.image-container {
  position: relative;
  padding-top: 133.33%; /* 3:4 aspect ratio */
  overflow: hidden;
  border-radius: 10px;
  background-color: #f8f8f8;
}

.comic-panel:hover img {
  transform: scale(1.02);
}

.comic-panel .caption {
  margin-top: 15px;
  text-align: center;
  font-size: 16px;
  color: #333;
  padding: 10px;
  background-color: #f8f8f8;
  border-radius: 8px;
  font-weight: bold;
}

.style-selector {
  margin-bottom: 20px;
}

.style-selector h3 {
  margin-bottom: 15px;
  color: #333;
  font-size: 1.2em;
}

.style-options {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.style-option {
  cursor: pointer;
}

.style-option input[type="radio"] {
  display: none;
}

.style-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 15px;
  border: 3px solid #ddd;
  border-radius: 12px;
  transition: all 0.3s ease;
  overflow: hidden;
  border-radius: 10px;
  position: relative;
}

.style-preview::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.5));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.style-option input[type="radio"]:checked + .style-preview {
  border-color: #4CAF50;
  background-color: #f0f8f0;
  transform: scale(1.05);
}

.style-preview svg {
  margin-bottom: 10px;
  transition: transform 0.3s ease;
}

.style-preview:hover svg {
  transform: scale(1.1);
}

.style-preview span {
  font-size: 0.9em;
  font-weight: bold;
  color: #555;
}

.style-preview.cartoon svg {
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.2));
}

.style-preview.realistic svg {
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.3));
}

.style-preview.manga svg {
  background: white;
  filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.4));
}

.styleG-preview.pixel svg {
  image-rendering: pixelated;
  transform: scale(0.9);
  background: #000;
  padding: 2px;
  border-radius: 4px;
}

.style-preview.pixel:hover svg {
  transform: scale(1);
}

.style-preview.microscopic svg {
  background: #000;
  border-radius: 50%;
  padding: 4px;
  filter: drop-shadow(0 0 4px rgba(0,255,0,0.4));
}

.style-preview.microscopic:hover {
  background: rgba(0,255,0,0.1);
}

.style-preview.mixed svg {
  background: linear-gradient(45deg, #fff, #f0f0f0);
  border-radius: 8px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.style-preview.mixed:hover {
  background: rgba(76,175,80,0.1);
}

.style-preview.stick-figure svg {
  background: #fff;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
}

.style-preview.stick-figure:hover svg {
  transform: scale(1.1);
}

.style-preview.popart {
  background: white;
}

.style-preview.popart svg {
  filter: url(#popArtFilter);
  background: 
    radial-gradient(circle at 30% 30%, #ff0000 25%, transparent 25%),
    radial-gradient(circle at 70% 70%, #0000ff 25%, transparent 25%),
    radial-gradient(circle at 30% 70%, #ffff00 25%, transparent 25%),
    radial-gradient(circle at 70% 30%, #00ff00 25%, transparent 25%),
    white;
  background-size: 20px 20px;
}

.style-preview.retro {
  background: #fff6e5;
}

.style-preview.retro svg {
  filter: sepia(0.3) saturate(1.2);
  background: linear-gradient(45deg, #ffd700, #ff6b6b);
}

.style-preview.minimalist {
  filter: grayscale(1);
}

.style-preview.low-poly {
  background: #4a90e2;
}

.style-preview.low-poly svg {
  filter: none;
  background: linear-gradient(135deg, #4a90e2, #357abd);
}

.style-preview.high-poly {
  filter: drop-shadow(0 0 8px rgba(33,150,243,0.5));
  background: linear-gradient(135deg, #1565C0, #2196F3);
}

.style-preview.fairytale {
  filter: drop-shadow(0 0 8px rgba(255,215,0,0.6));
  background: radial-gradient(circle at center, #FFF8E1, #FFE0B2);
}

.style-preview.minecraft {
  background: #8B4513;
  image-rendering: pixelated;
}

.style-preview.minecraft svg {
  background: #8B4513;
}

.style-preview.minecraft path {
  fill: #50C878;
}

.style-preview.stopmotion {
  background: #f4f4f4;
}

.style-preview.stopmotion svg {
  filter: url(#clay);
  animation: clayMove 3s infinite alternate;
}

@keyframes clayMove {
  0% { transform: scale(1) rotate(0deg); }
  100% { transform: scale(1.05) rotate(2deg); }
}

.style-preview.chipdale2022 {
  background: linear-gradient(135deg, #ffd700, #ffa500);
}

.style-preview.chipdale2022 svg {
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
  animation: modernBounce 2s infinite alternate;
}

@keyframes modernBounce {
  0% { transform: translateY(0); }
  100% { transform: translateY(-5px); }
}

.style-preview.retro-8bit svg,
.style-preview.retro-16bit svg,
.style-preview.retro-32bit svg,
.style-preview.arcade svg,
.style-preview.gameboy svg,
.style-preview.commodore64 svg {
  image-rendering: pixelated;
  background: #000;
  padding: 2px;
  border-radius: 4px;
}

.style-preview.gameboy svg {
  filter: sepia(100%) hue-rotate(90deg) saturate(200%);
}

.style-preview.commodore64 svg {
  filter: brightness(1.2) contrast(1.1);
}

.style-preview.retro-32bit svg {
  filter: contrast(1.2);
}

.style-preview.pixelation-low svg,
.style-preview.pixelation-medium svg,
.style-preview.pixelation-high svg {
  image-rendering: pixelated;
  background: white;
  border: 2px solid #ddd;
}

.style-preview.pixelation-low:hover svg,
.style-preview.pixelation-medium:hover svg,
.style-preview.pixelation-high:hover svg {
  transform: scale(1.1);
  border-color: #4CAF50;
}

.style-preview.pixelation-medium svg {
  image-rendering: pixelated;
  filter: contrast(1.2);
  background: 
    linear-gradient(45deg, #000 25%, transparent 25%),
    linear-gradient(-45deg, #000 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #000 75%),
    linear-gradient(-45deg, transparent 75%, #000 75%);
  background-size: 4px 4px;
  background-position: 0 0, 0 2px, 2px -2px, -2px 0px;
}

.style-preview.pixelation-high svg {
  image-rendering: pixelated;
  filter: contrast(1.4) brightness(1.1);
  background: 
    linear-gradient(45deg, #000 25%, transparent 25%),
    linear-gradient(-45deg, #000 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #000 75%),
    linear-gradient(-45deg, transparent 75%, #000 75%);
  background-size: 2px 2px;
  background-position: 0 0, 0 1px, 1px -1px, -1px 0px;
}

.style-preview.peppa {
  background: #FFB6C1;
}

.style-preview.peppa svg {
  fill: #FF69B4;
}

.panel-count-selector {
  margin: 20px 0;
  padding: 20px;
  background: white;
  border-radius: 15px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.panel-count-selector h3 {
  margin-bottom: 15px;
  color: #333;
  font-size: 1.2em;
}

.panel-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 1000px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .panel-options {
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 8px;
  }
}

.panel-option {
  cursor: pointer;
  min-width: 80px;
}

.panel-option input[type="radio"] {
  display: none;
}

.panel-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 15px;
  border: 3px solid #ddd;
  border-radius: 12px;
  transition: all 0.3s ease;
  color: #666;
}

.panel-option input[type="radio"]:checked + .panel-preview {
  border-color: #4CAF50;
  background-color: #f0f8f0;
  transform: scale(1.05);
  color: #4CAF50;
}

.panel-preview:hover {
  border-color: #4CAF50;
  transform: translateY(-2px);
}

.panel-preview span {
  margin-top: 8px;
  font-size: 14px;
  font-weight: bold;
}

@media (max-width: 768px) {
  .panel-options {
    gap: 10px;
  }
  
  .panel-preview {
    padding: 10px;
  }
  
  .panel-preview svg {
    width: 30px;
    height: 30px;
  }
}

.custom-panel-input {
  margin: 20px 0;
  text-align: center;
}

#customPanelCount {
  width: 200px;
  padding: 10px;
  font-size: 16px;
  border: 2px solid #ccc;
  border-radius: 8px;
  text-align: center;
}

#customPanelCount::-webkit-inner-spin-button,
#customPanelCount::-webkit-outer-spin-button {
  opacity: 1;
}

.style-preview.watercolor svg {
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
  background: linear-gradient(45deg, #fff8f8, #fff);
}

.style-preview.watercolor:hover svg {
  background: #fff0f0;
}

.style-preview.cyberpunk svg {
  background: #120458;
  box-shadow: 0 0 10px rgba(0,255,159,0.5);
}

.style-preview.cyberpunk:hover svg {
  box-shadow: 0 0 15px rgba(0,255,159,0.8);
}

.style-preview.horror svg {
  background: #1a0f0f;
  box-shadow: 0 0 10px rgba(139,0,0,0.5);
}

.style-preview.horror:hover svg {
  box-shadow: 0 0 15px rgba(139,0,0,0.8);
}

.error-message {
  text-align: center;
  padding: 20px;
  background: #FFF3F3;
  border: 1px solid #FFD7D7;
  border-radius: 8px;
  margin: 20px 0;
}

.error-message button {
  margin-top: 10px;
  background: #DC3545;
}

.error-message button:hover {
  background: #C82333;
}

.loading {
  display: none;
  text-align: center;
  margin-top: 30px;
  padding: 20px;
  background: rgba(255,255,255,0.9);
  border-radius: 15px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  backdrop-filter: blur(5px);
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #f3f3f3;
  border-top: 5px solid #4CAF50;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
}

.modal-content {
  position: relative;
  background-color: white;
  margin: 50px auto;
  padding: 30px;
  width: 90%;
  max-width: 600px;
  border-radius: 15px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.modal-content h2 {
  margin-bottom: 20px;
  color: #333;
}

.modal-content input[type="text"] {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 2px solid #ccc;
  border-radius: 8px;
  font-size: 16px;
}

.modal-content textarea {
  height: 120px;
}

.modal-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 20px;
}

.modal-buttons button {
  width: auto;
  min-width: 120px;
}

#cancelStyle {
  background-color: #666;
}

.style-preview-container {
  margin-top: 20px;
  text-align: center;
}

.style-preview-container img {
  max-width: 200px;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.custom.style-preview svg {
  transition: all 0.3s ease;
}

.custom.style-preview:hover svg {
  transform: scale(1.1);
  background-color: #f0f0f0;
  border-radius: 8px;
}

.marketplace-button-container {
  text-align: center;
  margin: 20px 0;
}

.marketplace-button {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 auto;
  background-color: #6200ea;
  padding: 12px 24px;
}

.marketplace-icon {
  transition: transform 0.3s ease;
}

.marketplace-button:hover .marketplace-icon {
  transform: rotate(180deg);
}

.marketplace-content {
  width: 95%;
  max-width: 1000px;
  max-height: 90vh;
  overflow-y: auto;
}

.marketplace-header {
  position: sticky;
  top: 0;
  background: white;
  padding: 20px 0;
  border-bottom: 1px solid #eee;
}

.marketplace-tabs {
  display: flex;
  gap: 10px;
  margin: 20px 0;
}

.tab-button {
  background: #f0f0f0;
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tab-button.active {
  background: #6200ea;
  color: white;
}

.tab-content {
  padding: 20px 0;
}

.tab-content.hidden {
  display: none;
}

.marketplace-search {
  margin-bottom: 20px;
}

.marketplace-search input {
  width: 100%;
  padding: 12px 20px;
  border: 2px solid #eee;
  border-radius: 25px;
  font-size: 16px;
  transition: all 0.3s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='%23999' d='M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 10px center;
  padding-left: 40px;
}

.marketplace-search input:focus {
  border-color: #6200ea;
  box-shadow: 0 0 0 3px rgba(98, 0, 234, 0.1);
  outline: none;
}

.style-card {
  animation: fadeInUp 0.5s ease forwards;
  opacity: 0;
  transform: translateY(20px);
  background: white;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
  cursor: pointer;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.style-card:hover .style-preview::after {
  opacity: 1;
}

.style-card:hover {
  transform: translateY(-5px);
}

.style-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 15px;
}

.style-card h3 {
  margin: 10px 0;
  color: #333;
}

.style-card p {
  color: #666;
  font-size: 14px;
  margin-bottom: 15px;
}

.style-card .creator {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #888;
  font-size: 14px;
}

.creator img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  margin: 0;
}

.close-modal {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  padding: 5px;
  color: #666;
  transition: color 0.3s ease;
  z-index: 1000;
}

.close-modal:hover {
  color: #ff0000;
}

.publish-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.publish-preview {
  min-height: 200px;
  background: #f8f8f8;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 20px 0;
}

.publish-preview img {
  max-width: 100%;
  max-height: 300px;
  border-radius: 10px;
}

.style-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.style-actions button {
  flex: 1;
  font-size: 14px;
  padding: 8px;
}

.no-results {
  text-align: center;
  padding: 40px 20px;
  color: #666;
}

.no-results-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.no-results svg {
  color: #999;
}

.no-results p {
  font-size: 18px;
  margin: 0;
}

.no-results span {
  font-size: 14px;
  color: #999;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #666;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.empty-state svg {
  color: #999;
}

.empty-state p {
  font-size: 18px;
  margin: 0;
}

.empty-state span {
  font-size: 14px;
  color: #999;
}

.add-style-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #6200ea;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
}

.add-style-btn:hover {
  background: #7c4dff;
  transform: translateY(-2px);
}

.marketplace-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

#publishStyle {
  background-color: #000000;
  color: white;
  font-weight: bold;
  width: 100%;
  padding: 15px;
  margin-top: 15px;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

#publishStyle:hover {
  background-color: #333333;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

#publishStyle:disabled {
  background-color: #666666;
  transform: none;
  cursor: not-allowed;
}

.remove-style-btn {
  background: #dc3545;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.remove-style-btn:hover {
  background: #c82333;
  transform: translateY(-2px);
}

.empty-my-styles {
  text-align: center;
  padding: 40px;
  color: #666;
  border: 2px dashed #ddd;
  border-radius: 15px;
  margin: 20px 0;
}

.empty-my-styles svg {
  width: 64px;
  height: 64px;
  color: #999;
  margin-bottom: 20px;
}

.empty-my-styles h3 {
  margin-bottom: 10px;
  color: #333;
}

.empty-my-styles p {
  color: #666;
  max-width: 400px;
  margin: 0 auto;
}

.my-styles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  padding: 20px 0;
}

.mode-selector {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin: 20px 0;
  background: white;
  padding: 15px;
  border-radius: 15px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.mode-button {
  padding: 10px 20px;
  border: 2px solid #4CAF50;
  border-radius: 25px;
  background: white;
  color: #4CAF50;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.mode-button.active {
  background: #4CAF50;
  color: white;
}

.comic-panel.memorization {
  position: relative;
}

.comic-panel.memorization::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: white;
  animation: fadeIn 0.5s forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.text-settings {
  background: white;
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}

.text-settings h3 {
  margin-bottom: 15px;
  color: #333;
  font-size: 1.2em;
}

.text-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  align-items: start;
}

.text-option {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.text-option label {
  font-weight: bold;
  color: #555;
  display: flex;
  align-items: center;
  gap: 10px;
}

.text-option select,
.text-option input {
  padding: 8px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
}

.text-option select:focus,
.text-option input:focus {
  border-color: #4CAF50;
  outline: none;
  box-shadow: 0 0 5px rgba(76,175,80,0.3);
}

.color-preview {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #ddd;
}

.font-preview {
  padding: 8px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f8f8;
}

#fontPreview {
  transition: all 0.3s ease;
}

#sizePreview {
  transition: font-size 0.3s ease;
}

#colorPreview {
  transition: color 0.3s ease;
}

#bgColorPreview {
  transition: background-color 0.3s ease;
}

.save-comic-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 20px auto;
  background-color: #4CAF50;
  width: auto;
  min-width: 200px;
}

.save-comic-btn svg {
  width: 24px;
  height: 24px;
}

.comic-card {
  background: white;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  display: grid;
  grid-template-columns: 250px 1fr 200px;
  gap: 20px;
  margin-bottom: 20px;
  transition: transform 0.3s ease;
}

.comic-card:hover {
  transform: translateY(-5px);
}

.comic-preview img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
}

.comic-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comic-meta {
  display: flex;
  gap: 15px;
  color: #666;
  font-size: 14px;
}

.comic-stats {
  display: flex;
  gap: 10px;
}

.comic-stats button {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #f0f0f0;
  color: #333;
  width: auto;
  font-size: 14px;
  box-shadow: none;
}

.comic-stats button:hover {
  background: #e0e0e0;
  transform: translateY(-2px);
}

.like-btn.liked {
  background: #ff4081;
  color: white;
}

.view-btn {
  margin-top: 10px;
  background: #4CAF50;
  color: white;
  padding: 10px 20px;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.view-btn:hover {
  background: #45a049;
  transform: translateY(-2px);
}

.fun-facts {
  background: #f8f8f8;
  padding: 15px;
  border-radius: 10px;
}

.fun-facts h4 {
  margin-bottom: 10px;
  color: #333;
}

.fun-facts ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.fun-facts li {
  margin-bottom: 8px;
  font-size: 14px;
  color: #666;
}

.fun-facts .random-fact {
  font-style: italic;
  color: #4CAF50;
}

.comment {
  background: white;
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 15px;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.comment-header img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.comment-time {
  color: #666;
  font-size: 12px;
  margin-left: auto;
}

.comment-content {
  color: #333;
  line-height: 1.4;
}

.add-comment {
  margin-top: 20px;
}

.add-comment textarea {
  width: 100%;
  height: 80px;
  padding: 10px;
  border: 2px solid #ddd;
  border-radius: 10px;
  margin-bottom: 10px;
  resize: vertical;
}

.add-comment button {
  background: #4CAF50;
  color: white;
  padding: 8px 16px;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.add-comment button:hover {
  background: #45a049;
  transform: translateY(-2px);
}

#browseModal .modal-content,
#viewComicModal .modal-content {
  width: 95%;
  max-width: 1200px;
  max-height: 90vh;
  overflow-y: auto;
}

#savedComicsList {
  padding: 20px 0;
}

.empty-state {
  text-align: center;
  padding: 40px;
  color: #666;
}

.empty-state svg {
  margin-bottom: 20px;
}

@media (max-width: 1200px) {
  .comic-card {
    grid-template-columns: 1fr;
  }
  
  .comic-preview img {
    height: 300px;
  }
}

.browse-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.browse-filters {
  display: flex;
  gap: 15px;
}

.filter-select {
  padding: 8px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
}

.browse-search {
  display: flex;
  gap: 10px;
  flex: 1;
  max-width: 400px;
}

.browse-search input {
  flex: 1;
  padding: 8px 15px;
  border: 2px solid #ddd;
  border-radius: 20px;
  font-size: 14px;
}

.browse-search button {
  padding: 8px 15px;
  background: #4CAF50;
  color: white;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.browse-search button:hover {
  background: #45a049;
  transform: translateY(-2px);
}

.deadpool-rating {
  background: white;
  border-radius: 15px;
  padding: 20px;
  margin: 20px 0;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  border: 2px solid #ff0000;
  animation: slideIn 0.5s ease;
}

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

.deadpool-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

.deadpool-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid #ff0000;
}

.deadpool-header h3 {
  color: #ff0000;
  margin: 0;
  font-size: 1.5em;
}

.rating-score {
  font-size: 24px;
  font-weight: bold;
  color: #ff0000;
  margin-bottom: 15px;
}

.rating-comment {
  font-style: italic;
  color: #333;
  margin-bottom: 20px;
  padding: 10px;
  background: #f8f8f8;
  border-radius: 8px;
  border-left: 4px solid #ff0000;
}

.plot-twist {
  margin-bottom: 20px;
}

.plot-twist h4 {
  color: #ff0000;
  margin-bottom: 10px;
}

.plot-twist p {
  background: #fff4f4;
  padding: 15px;
  border-radius: 8px;
  border: 1px dashed #ff0000;
}

.fun-facts h4 {
  color: #ff0000;
  margin-bottom: 10px;
}

.fun-facts ul {
  list-style: none;
  padding: 0;
}

.fun-facts li {
  margin-bottom: 10px;
  padding: 10px;
  background: #f8f8f8;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.fun-facts li::before {
  content: "💭";
  font-size: 1.2em;
}

.inspiration-image-section {
  background: white;
  padding: 20px;
  border-radius: 15px;
  margin-bottom: 20px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.inspiration-image-section h3 {
  margin-bottom: 15px;
  color: #333;
  font-size: 1.2em;
}

.image-upload-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.image-preview {
  width: 100%;
  max-width: 400px;
  height: 200px;
  border: 2px dashed #ddd;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  transition: all 0.3s ease;
}

.image-preview:hover {
  border-color: #4CAF50;
  cursor: pointer;
}

.image-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: #666;
}

.upload-placeholder svg {
  color: #999;
}

.upload-btn, .remove-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
}

.upload-btn {
  background: #4CAF50;
  color: white;
}

.remove-btn {
  background: #dc3545;
  color: white;
}

.upload-btn:hover, .remove-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.style-mix-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.style-mix-select {
  background: white;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.style-mix-select h3 {
  margin-bottom: 10px;
  color: #333;
}

.style-mix-select select {
  width: 100%;
  padding: 10px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
}

.mix-preview {
  background: #f8f8f8;
  padding: 20px;
  border-radius: 10px;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 20px 0;
}

.story-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.option-section {
  background: white;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.option-section h3 {
  margin-bottom: 10px;
  color: #333;
}

.option-section select {
  width: 100%;
  padding: 10px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
}

.character-builder {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#addCharacterBtn {
  background: #4CAF50;
  color: white;
  border: none;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
}

#addCharacterBtn:hover {
  background: #45a049;
  transform: translateY(-2px);
}

.character-card {
  background: #f8f8f8;
  padding: 15px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.character-card img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.character-info {
  flex: 1;
}

.character-card button {
  background: #dc3545;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 5px;
  cursor: pointer;
}

#mixStylesModal .modal-content,
#storyOptionsModal .modal-content {
  max-width: 800px;
}

#roomItemsGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  padding: 20px;
}

.room-item {
  background: white;
  padding: 15px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: transform 0.3s ease;
}

.room-item:hover {
  transform: translateY(-5px);
}

.room-item img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 10px;
}

.wolverine-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  background: #1a1a1a;
  padding: 15px;
  border-radius: 10px;
}

.wolverine-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid #ffd700;
}

.wolverine-header h3 {
  color: #ffd700;
  margin: 0;
}

#wolverineRating {
  background: #f5f5f5;
  padding: 20px;
  border-radius: 10px;
  font-family: 'Comic Sans MS', cursive;
}

.beer-rating {
  font-size: 24px;
  color: #8b4513;
  margin-bottom: 15px;
}

.beer-comment {
  font-style: italic;
  color: #666;
  margin-bottom: 15px;
}