:root {
  --primary-color: #4285f4;
  --text-color: #f0f0f0;
  --bg-color: #0f1114;
  --card-bg: #1a1e23;
  --input-bg: #1a1e23;
  --input-border: #2a3037;
  --input-focus-border: #4285f4;
  --confirm-color: #34a853;
  --warning-color: #ea4335;
  --favorite-color: #ea4335;
  --like-color: #4285f4;
  --border-radius: 16px;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  --box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
  background-color: var(--bg-color);
  background-image: url('/Image2.jpg');
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
  color: var(--text-color);
  min-height: 100vh;
  overflow-x: hidden;
  width: 100%;
  line-height: 1.6;
}

html {
  scroll-behavior: smooth;
}

.section {
  min-height: 100vh;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  box-sizing: border-box;
  width: 100vw;
  max-width: 100%;
  overflow-x: hidden;
  opacity: 1;
  transition: opacity 0.3s ease, transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.input-section {
  background: linear-gradient(135deg, rgba(15, 17, 20, 0.92) 0%, rgba(26, 30, 35, 0.92) 100%);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 2rem;
  z-index: 2;
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.3s ease;
  min-height: 100vh;
  overflow-y: auto;
  backdrop-filter: blur(5px);
}

.input-section.shifted {
  transform: translateY(-100%);
}

.input-container {
  width: 100%;
  max-width: 1200px;
  text-align: center;
  padding: 2rem 1rem;
  box-sizing: border-box;
  margin: auto;
}

header {
  margin-bottom: 3rem;
}

header h1 {
  font-size: 4.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  background: linear-gradient(45deg, #4285f4, #34a853, #fbbc05, #ea4335);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: center;
  letter-spacing: -1px;
}

header p {
  font-size: 1.4rem;
  color: var(--text-color);
  opacity: 0.8;
  margin-bottom: 3rem;
  font-weight: 500;
}

.google-style-input {
  width: 100%;
  height: 120px;
  padding: 1.5rem;
  font-size: 1.3rem;
  color: var(--text-color);
  background: var(--input-bg);
  border: 2px solid var(--input-border);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: all 0.3s ease;
  margin-bottom: 2rem;
  resize: none;
  font-family: var(--font-family);
}

.google-style-input:hover {
  border-color: rgba(66, 133, 244, 0.5);
}

.google-style-input:focus {
  outline: none;
  border-color: var(--input-focus-border);
  box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.2);
}

.google-style-input::placeholder {
  color: rgba(240, 240, 240, 0.5);
}

.nsfw-warning {
  background-color: rgba(234, 67, 53, 0.1);
  border: 2px solid var(--warning-color);
  border-radius: var(--border-radius);
  padding: 1rem 1.5rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  text-align: left;
  animation: fadeIn 0.3s ease-out;
  box-shadow: var(--box-shadow);
}

.nsfw-warning i {
  font-size: 2rem;
  color: var(--warning-color);
  flex-shrink: 0;
}

.nsfw-message h4 {
  margin: 0 0 0.5rem;
  color: var(--warning-color);
  font-size: 1.2rem;
}

.nsfw-message p {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: var(--text-color);
}

.timeout-message {
  font-weight: 600;
  color: var(--warning-color) !important;
}

.hidden {
  display: none !important;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.generate-btn {
  background: linear-gradient(45deg, #4285f4, #5294ff);
  color: white;
  border: none;
  padding: 1.5rem 3rem;
  border-radius: 100px;
  font-size: 1.4rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  width: 100%;
  max-width: 400px;
  justify-content: center;
  margin-top: 2rem;
  box-shadow: 0 10px 30px -10px rgba(66, 133, 244, 0.5);
  font-family: var(--font-family);
  position: relative;
  overflow: hidden;
}

.generate-btn:hover {
  background: linear-gradient(45deg, #5294ff, #74abff);
  transform: translateY(-2px);
  box-shadow: 0 15px 30px -10px rgba(66, 133, 244, 0.6);
}

.generate-btn:before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: all 0.6s;
}

.generate-btn:hover:before {
  left: 100%;
}

.generate-btn:disabled {
  background: #666;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  opacity: 0.7;
}

.generate-btn:disabled i.ph-timer {
  animation: pulse 1s infinite alternate;
}

@keyframes pulse {
  from { opacity: 0.7; }
  to { opacity: 1; }
}

.result-section {
  background-color: rgba(15, 17, 20, 0.9);
  padding: 0;
  z-index: 1;
  overflow-y: auto;
}

.result-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem;
  box-sizing: border-box;
  width: 100%;
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1.2rem 2rem;
  background: var(--card-bg);
  border: 2px solid var(--input-border);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.back-button {
  background: none;
  border: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--text-color);
  padding: 0.5rem 1rem;
  border-radius: 100px;
  transition: all 0.3s ease;
  font-family: var(--font-family);
}

.back-button:hover {
  background: rgba(66, 133, 244, 0.2);
  color: var(--primary-color);
}

.action-buttons {
  display: flex;
  gap: 1rem;
}

.action-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border-radius: 100px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  background: var(--primary-color);
  color: white;
  box-shadow: 0 5px 15px -5px rgba(66, 133, 244, 0.5);
  font-family: var(--font-family);
}

.action-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -5px rgba(66, 133, 244, 0.6);
}

.action-button.confirm {
  background: var(--confirm-color);
  box-shadow: 0 5px 15px -5px rgba(52, 168, 83, 0.5);
}

.action-button.confirm:hover {
  background: #45b963;
  box-shadow: 0 8px 20px -5px rgba(52, 168, 83, 0.6);
}

.action-button.confirm:disabled {
  background-color: #2a7f3f;
  cursor: not-allowed;
  opacity: 0.7;
}

.action-button.confirm.saved {
  pointer-events: none;
  background-color: var(--confirm-color);
  position: relative;
}

.action-button.confirm.saved::after {
  content: ' Saved!';
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--confirm-color);
  color: white;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  white-space: nowrap;
  font-weight: 600;
}

.imdb-style {
  background-color: var(--card-bg);
  border: 2px solid var(--input-border);
  border-radius: var(--border-radius);
  padding: 2rem;
  display: flex;
  gap: 2rem;
  box-shadow: var(--box-shadow);
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  max-width: 1400px;
  margin: 0 auto;
}

.poster-section {
  flex: 0 0 400px;
  max-width: 400px;
  width: 100%;
}

.poster-section img {
  width: 100%;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
  box-shadow: var(--box-shadow);
}

.rating-box {
  background-color: var(--primary-color);
  padding: 1.2rem;
  border-radius: var(--border-radius);
  text-align: center;
  color: white;
  box-shadow: 0 5px 15px -5px rgba(66, 133, 244, 0.5);
}

.rating {
  font-size: 1.5rem;
  font-weight: bold;
}

.votes {
  font-size: 0.9rem;
  margin-top: 0.5rem;
  opacity: 0.9;
}

.info-section {
  flex: 1;
  min-width: 0; 
}

.info-section h2 {
  font-size: 2.5rem;
  margin: 0 0 1rem 0;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.meta-info {
  color: rgba(240, 240, 240, 0.7);
  margin-bottom: 1.5rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
  font-size: 1.1rem;
}

.separator {
  margin: 0 0.5rem;
}

.synopsis {
  margin-bottom: 1.5rem;
}

.synopsis h3 {
  margin-bottom: 0.8rem;
  font-size: 1.4rem;
  font-weight: 700;
}

.additional-info {
  margin-bottom: 1.5rem;
  background: rgba(26, 30, 35, 0.5);
  padding: 1.2rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--input-border);
}

.info-row {
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
}

.info-row strong {
  min-width: 100px;
  font-weight: 600;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  width: 100%;
  box-sizing: border-box;
}

.tag {
  background-color: var(--input-bg);
  padding: 0.7rem 1.2rem;
  border-radius: 100px;
  font-size: 0.9rem;
  color: var(--text-color);
  border: 1px solid var(--input-border);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--primary-color);
  color: #000;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--box-shadow);
  transition: all 0.3s ease;
  opacity: 0;
  pointer-events: none;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: all;
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px -5px rgba(66, 133, 244, 0.5);
}

.loading-indicator {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 100;
  background: rgba(15, 17, 20, 0.92);
  color: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  backdrop-filter: blur(8px);
  border: 1px solid var(--input-border);
  animation: fadeIn 0.3s ease forwards;
}

.loading-dots::after {
  content: '';
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
}

.loading-message {
  font-size: 0.9rem;
  opacity: 0.7;
  margin-top: 0.5rem;
}

.loading-progress {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 0.5rem;
  animation: fadeInOut 2s infinite alternate;
}

@keyframes fadeInOut {
  0% { opacity: 0.5; }
  100% { opacity: 1; }
}

.comments-section {
  background-color: var(--card-bg);
  border: 2px solid var(--input-border);
  border-radius: var(--border-radius);
  padding: 2rem;
  margin-top: 2rem;
  box-shadow: var(--box-shadow);
}

.comments-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.comments-header h3 {
  font-size: 1.5rem;
  margin: 0;
  font-weight: 700;
}

.comment-container {
  background-color: var(--bg-color);
  border: 1px solid var(--input-border);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-bottom: 1.2rem;
  width: 100%;
  box-sizing: border-box;
  transition: transform 0.2s ease;
}

.comment-container:hover {
  transform: translateY(-3px);
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: white;
  font-size: 1.1rem;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.username-date {
  display: flex;
  flex-direction: column;
}

.username {
  font-weight: 600;
  color: var(--text-color);
  font-size: 1.05rem;
}

.comment-date {
  font-size: 0.85rem;
  color: rgba(240, 240, 240, 0.6);
}

.comment-rating {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.star-rating {
  color: #ffd700;
  letter-spacing: 2px;
  font-size: 1.1rem;
}

.rating-number {
  color: rgba(240, 240, 240, 0.7);
  font-size: 0.9rem;
  font-weight: 600;
}

.comment-content {
  margin: 1.2rem 0;
  line-height: 1.7;
  color: rgba(240, 240, 240, 0.9);
}

.comment-footer {
  display: flex;
  gap: 1rem;
  margin-top: 1.2rem;
}

.like-button, .reply-button {
  background: none;
  border: 1px solid var(--input-border);
  border-radius: 100px;
  padding: 0.6rem 1.2rem;
  color: var(--text-color);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
  font-family: var(--font-family);
}

.like-button:hover, .reply-button:hover {
  background-color: var(--input-bg);
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

.filters-section {
  width: 100%;
  max-width: 1400px;
  margin: 2.5rem auto;
  background: var(--card-bg);
  border: 2px solid var(--input-border);
  border-radius: var(--border-radius);
  padding: 1.5rem 2rem;
  transition: all 0.3s ease;
  margin-bottom: 1.5rem;
  box-shadow: var(--box-shadow);
}

.filters-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.filters-header h3 {
  font-size: 1.3rem;
  margin: 0;
  color: var(--text-color);
  font-weight: 700;
  display: flex;
  align-items: center;
}

.toggle-filters {
  background: none;
  border: 1px solid var(--input-border);
  color: var(--text-color);
  padding: 0.7rem 1.2rem;
  border-radius: 100px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: all 0.2s ease;
  font-family: var(--font-family);
  font-weight: 500;
}

.toggle-filters:hover {
  background: var(--input-bg);
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  transition: all 0.3s ease;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.filter-group label {
  font-size: 0.95rem;
  color: var(--text-color);
  opacity: 0.8;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  width: 100%;
  box-sizing: border-box;
}

.filter-chip {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--text-color);
  padding: 0.7rem 1.2rem;
  border-radius: 100px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
  font-family: var(--font-family);
}

.filter-chip:hover {
  background: rgba(66, 133, 244, 0.15);
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

.filter-chip.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  font-weight: 600;
  box-shadow: 0 5px 15px -5px rgba(66, 133, 244, 0.5);
}

.filter-chip[data-filter="studio"] {
  background-color: var(--input-bg);
  border: 1px solid var(--input-border);
}

.filter-chip[data-filter="studio"].active {
  background: var(--primary-color);
  border-color: var(--primary-color);
}

.filter-chip[data-filter="studio"][data-value="mixed"] {
  background: linear-gradient(45deg, #4285f4, #34a853, #fbbc05, #ea4335);
  color: white;
  border: none;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.filter-chip[data-filter="studio"][data-value="mixed"]:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}

.filter-chip[data-filter="studio"][data-value="mixed"].active {
  background: linear-gradient(45deg, #4285f4, #34a853, #fbbc05, #ea4335);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.filters-grid.collapsed {
  display: none;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  min-width: 150px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  cursor: pointer;
}

.toggle-inner {
  position: relative;
  display: block;
  width: 50px;
  height: 26px;
  background-color: var(--input-border);
  border-radius: 50px;
  transition: 0.3s;
}

.toggle-inner:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.3s;
}

input:checked + .toggle-label .toggle-inner {
  background-color: var(--primary-color);
}

input:checked + .toggle-label .toggle-inner:before {
  transform: translateX(24px);
}

.toggle-switch-label {
  color: var(--text-color);
  font-size: 0.95rem;
  font-weight: 500;
}

#extremeModeToggle + .toggle-label .toggle-inner {
  background-color: var(--warning-color);
  opacity: 0.5;
}

#extremeModeToggle:checked + .toggle-label .toggle-inner {
  background-color: var(--warning-color);
  opacity: 1;
}

.community-section, .favorites-section {
  padding: 2rem 1rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  margin-top: 3rem;
}

.community-header, .favorites-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
}

.community-header h2, .favorites-header h2 {
  font-size: 2.2rem;
  color: var(--text-color);
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.community-grid, .favorites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  width: 100%;
}

.view-tabs {
  display: flex;
  background: rgba(26, 30, 35, 0.85);
  border-radius: var(--border-radius);
  margin: 2.5rem auto 0;
  overflow: hidden;
  border: 2px solid rgba(66, 133, 244, 0.3);
  width: 100%;
  max-width: 1400px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
}

.view-tabs:hover {
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  transform: translateY(-2px);
}

.view-tab {
  flex: 1;
  padding: 1.2rem 1rem;
  background: none;
  border: none;
  color: var(--text-color);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  border-bottom: 3px solid transparent;
  position: relative;
  font-weight: 600;
  font-size: 1.05rem;
  font-family: var(--font-family);
  overflow: hidden;
}

.view-tab:before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), background 0.3s ease;
}

.view-tab:hover:before {
  transform: scaleX(1);
  background: rgba(66, 133, 244, 0.5);
}

.view-tab.active:before {
  transform: scaleX(1);
  background: var(--primary-color);
}

.view-tab:hover {
  background: rgba(66, 133, 244, 0.15);
  transform: translateY(-3px);
}

.view-tab.active {
  border-bottom: 3px solid var(--primary-color);
  background: rgba(66, 133, 244, 0.2);
  font-weight: 700;
}

.tab-icon-wrapper {
  background: rgba(66, 133, 244, 0.2);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 5px;
  transition: all 0.3s ease;
}

.view-tab:hover .tab-icon-wrapper {
  background: rgba(66, 133, 244, 0.4);
  transform: scale(1.1);
}

.view-tab.active .tab-icon-wrapper {
  background: var(--primary-color);
  box-shadow: 0 4px 10px rgba(66, 133, 244, 0.4);
}

.view-tab i {
  font-size: 1.4rem;
  transition: all 0.3s ease;
}

.view-tab.active i {
  color: white;
}

.view-tab .favorites-count {
  position: absolute;
  top: 5px;
  right: 35%;
  background: var(--favorite-color);
  color: white;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.creations-section {
  padding: 2rem 1rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  margin-top: 1rem;
}

.creations-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
}

.creations-header h2 {
  font-size: 2.2rem;
  color: var(--text-color);
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.creations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  width: 100%;
}

.anime-card {
  position: relative;
  background: var(--card-bg);
  border: 2px solid var(--input-border);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  cursor: pointer;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: var(--box-shadow);
  transform: translateY(0);
}

.anime-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px -10px rgba(0,0,0,0.5);
  border-color: rgba(66, 133, 244, 0.4);
}

.anime-card-poster {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.anime-card:hover .anime-card-poster {
  transform: scale(1.05);
}

.anime-card-info {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
  pointer-events: none;
}

.anime-card-info > * {
  pointer-events: auto;
}

.anime-card-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 0.8rem 0;
  color: var(--text-color);
  letter-spacing: -0.3px;
}

.anime-card-meta {
  font-size: 0.95rem;
  color: rgba(240, 240, 240, 0.7);
  margin-bottom: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(240, 240, 240, 0.1);
  width: 100%;
  pointer-events: auto;
}

.anime-card-creator {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.creator-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.creator-name {
  font-size: 0.9rem;
  color: rgba(240, 240, 240, 0.8);
  font-weight: 500;
}

.card-controls {
  position: absolute;
  top: 15px;
  right: 15px;
  display: flex;
  gap: 10px;
  z-index: 2;
}

.card-controls button {
  pointer-events: auto;
}

.favorite-btn {
  background: rgba(26, 30, 35, 0.8);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-right: 0.5rem;
  box-shadow: 0 3px 8px rgba(0,0,0,0.3);
  backdrop-filter: blur(5px);
}

.favorite-btn:hover {
  background: rgba(234, 67, 53, 0.8);
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 8px 15px rgba(0,0,0,0.3);
}

.favorite-btn.favorited {
  background: var(--favorite-color);
  color: white;
  animation: heartBeat 1s ease-in-out;
  box-shadow: 0 5px 12px rgba(234, 67, 53, 0.5);
}

.favorite-btn i {
  font-size: 1.3rem;
}

.edit-btn {
  background: rgba(66, 133, 244, 0.8);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.3);
}

.edit-btn:hover {
  background: #4285f4;
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 8px 15px rgba(66, 133, 244, 0.4);
}

.edit-btn i {
  font-size: 1.3rem;
}

.delete-btn {
  background: rgba(234, 67, 53, 0.8);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.3);
}

.delete-btn:hover {
  background: #ea4335;
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 8px 15px rgba(234, 67, 53, 0.4);
}

.delete-btn i {
  font-size: 1.3rem;
}

.pin-btn {
  background: rgba(255, 193, 7, 0.8);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.3);
}

.pin-btn:hover {
  background: #ffc107;
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 8px 15px rgba(255, 193, 7, 0.4);
}

.pin-btn.pinned {
  background: #ffc107;
  box-shadow: 0 5px 12px rgba(255, 193, 7, 0.5);
}

.pin-btn i {
  font-size: 1.3rem;
}

.anime-card[data-pinned="true"] {
  border-color: #ffc107;
  box-shadow: 0 10px 25px rgba(255, 193, 7, 0.3);
  position: relative;
}

.anime-card[data-pinned="true"]::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: #ffc107;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.admin-controls {
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  background: var(--card-bg);
  border: 2px solid var(--input-border);
  display: none; 
  box-shadow: var(--box-shadow);
}

.admin-controls.visible {
  display: block;
}

.admin-button {
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 100px;
  padding: 0.8rem 1.5rem;
  margin-right: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  font-family: var(--font-family);
  box-shadow: 0 5px 15px -5px rgba(66, 133, 244, 0.5);
}

.admin-button:hover {
  background: #5294ff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -5px rgba(66, 133, 244, 0.6);
}

.admin-button.danger {
  background: #ea4335;
  box-shadow: 0 5px 15px -5px rgba(234, 67, 53, 0.5);
}

.admin-button.danger:hover {
  background: #ff5246;
  box-shadow: 0 8px 20px -5px rgba(234, 67, 53, 0.6);
}

@media (min-width: 1024px) {
  .card-controls {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
  }

  .anime-card:hover .card-controls {
    opacity: 1;
    transform: scale(1);
  }
  
  /* Always show favorite button */
  .favorite-btn {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 768px) {
  .filters-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .header-controls {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
  }
  
  .toggle-switch {
    min-width: auto;
    width: 100%;
    margin-bottom: 0.5rem;
  }
  
  .toggle-label {
    justify-content: flex-end;
  }
  
  .edit-notification i {
    font-size: 1.2rem;
  }

  /* Mobile dropdown filters */
  .filter-group {
    position: relative;
    margin-bottom: 1rem;
  }
  
  .filter-group label {
    background: var(--input-bg);
    padding: 0.8rem 1rem;
    border-radius: var(--border-radius);
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    border: 1px solid var(--input-border);
    box-sizing: border-box;
    position: relative;
  }
  
  .filter-group label::after {
    content: "\25BC";
    font-size: 0.7rem;
    transition: transform 0.3s ease;
  }
  
  .filter-group.expanded label::after {
    transform: rotate(180deg);
  }
  
  .filter-options {
    display: none;
    background: var(--card-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--border-radius);
    padding: 0.8rem;
    margin-top: 0.5rem;
    z-index: 10;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  }
  
  .filter-group.expanded .filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  /* Adjusted dropdown styles for very small screens */
  .filter-group label {
    font-size: 0.9rem;
    padding: 0.7rem 0.8rem;
  }
  
  .filter-options {
    padding: 0.6rem;
  }
  
  .filter-chip {
    font-size: 0.85rem;
    padding: 0.6rem 0.9rem;
  }
  
  .community-header, .favorites-header {
    flex-direction: column;
    gap: 1rem;
  }
}

@media (min-width: 1200px) {
  .community-grid, .favorites-grid, .creations-grid {
    grid-template-columns: repeat(4, 1fr); 
    max-width: 1200px;
    margin: 0 auto;
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .community-grid, .favorites-grid, .creations-grid {
    grid-template-columns: repeat(3, 1fr); 
  }
}

@media (min-width: 1400px) {
  .community-grid, .favorites-grid, .creations-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 2.5rem;
  }
}

@media (min-width: 1600px) {
  .input-container,
  .result-content,
  .community-section,
  .favorites-section,
  .creations-section {
    max-width: 1600px;
  }
  
  .community-grid, .favorites-grid, .creations-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 768px) {
  header h1 {
    font-size: 2.5rem;
  }
  
  header p {
    font-size: 1.1rem;
  }
  
  .google-style-input {
    height: 100px;
    font-size: 1.1rem;
    padding: 1.2rem;
  }
  
  .generate-btn {
    padding: 1.2rem 2rem;
    font-size: 1.2rem;
  }
  
  .input-section {
    padding-top: 1rem;
  }

  .input-container {
    padding: 1rem;
  }
  
  .imdb-style {
    flex-direction: column;
    padding: 1.5rem;
  }
  
  .poster-section {
    flex: 0 0 100%;
    max-width: 100%;
  }
  
  .info-section {
    width: 100%;
  }
  
  .comment-container {
    padding: 1.2rem;
  }
  
  .user-info {
    flex-wrap: wrap;
  }
  
  .comment-header {
    flex-direction: column;
  }
  
  .filter-options {
    padding-bottom: 0;
    flex-wrap: wrap;
    overflow-x: visible;
  }
  
  .filter-chip {
    flex: 0 1 auto;
  }

  .input-container {
    padding: 0 0.5rem;
  }

  .result-content {
    padding: 0.5rem;
  }

  .filters-section {
    margin: 1.5rem 0;
    width: 100%;
    box-sizing: border-box;
  }

  .filters-grid {
    width: 100%;
  }

  .filter-group {
    width: 100%;
  }
  
  header {
    margin-bottom: 2rem;
  }

  .filters-section {
    margin-bottom: 0.5rem;
  }
  
  .community-section, .favorites-section, .creations-section {
    margin-top: 1rem;
  }
  
  .generate-btn {
    margin-top: 1.5rem;
  }
  
  .result-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .action-buttons {
    width: 100%;
    justify-content: space-between;
  }
  
  .action-button {
    padding: 0.7rem 1.2rem;
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  header h1 {
    font-size: 2rem;
  }
  
  .result-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .filters-section {
    padding: 1.2rem 1rem;
  }

  .google-style-input {
    padding: 1rem;
  }

  .generate-btn {
    padding: 1.2rem 2rem;
    font-size: 1.2rem;
    width: 100%;
  }
  
  .input-section {
    padding-top: 0.5rem;
  }

  .input-container {
    padding: 0.5rem;
  }

  .filter-chip {
    padding: 0.7rem 1rem;
    margin: 0.2rem;
  }
  
  .action-buttons {
    flex-direction: column;
    width: 100%;
  }
  
  .action-button {
    width: 100%;
    justify-content: center;
  }
}

@media screen and (max-height: 700px) {
  .input-section {
    align-items: flex-start;
    padding-top: 1rem;
  }

  header {
    margin-bottom: 1.5rem;
  }

  .google-style-input {
    height: 100px;
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 1400px) {
  .community-grid, .favorites-grid, .creations-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

@supports (-webkit-touch-callout: none) {
  .section {
    min-height: -webkit-fill-available;
  }
  
  .input-section {
    min-height: -webkit-fill-available;
  }
}

.editable-field-container {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.edit-field-btn {
  background: rgba(66, 133, 244, 0.2);
  color: var(--primary-color);
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.edit-field-btn:hover {
  background: rgba(66, 133, 244, 0.3);
  transform: scale(1.1);
}

.edit-input-container {
  display: flex;
  align-items: center;
  width: 100%;
  margin-bottom: 0.5rem;
  gap: 0.8rem;
  position: relative;
}

.edit-input {
  flex-grow: 1;
  background: var(--input-bg);
  border: 2px solid var(--input-border);
  border-radius: var(--border-radius);
  padding: 0.8rem 1rem;
  color: var(--text-color);
  font-size: 1.2rem;
  font-family: var(--font-family);
  transition: all 0.2s ease;
}

.edit-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
}

.edit-button-container {
  display: flex;
  gap: 0.5rem;
}

.edit-save-btn, .edit-cancel-btn {
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.edit-save-btn {
  background: var(--confirm-color);
  color: white;
}

.edit-save-btn:hover {
  background: #45b963;
  transform: scale(1.1);
}

.edit-cancel-btn {
  background: var(--warning-color);
  color: white;
}

.edit-cancel-btn:hover {
  background: #ff5246;
  transform: scale(1.1);
}

.custom-studio-input.hidden {
  display: none;
}

.studio-select {
  flex-grow: 1;
  background: var(--input-bg);
  border: 2px solid var(--input-border);
  border-radius: var(--border-radius);
  padding: 0.8rem 1rem;
  color: var(--text-color);
  font-size: 1rem;
  font-family: var(--font-family);
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f0f0f0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1rem;
}

.studio-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
}

.studio-select option {
  background: var(--card-bg);
  color: var(--text-color);
}

#animeSynopsis.regenerating {
  opacity: 0.7;
  position: relative;
}

.edit-success-message {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--confirm-color);
  color: white;
  padding: 6px 12px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  animation: fadeInOut 2s ease-in-out forwards;
  box-shadow: 0 5px 15px -8px rgba(66, 133, 244, 0.3);
}

@media (max-width: 768px) {
  .editable-field-container {
    flex-wrap: wrap;
  }
  
  .edit-input-container {
    flex-wrap: wrap;
  }
  
  .edit-button-container {
    margin-top: 0.5rem;
  }
  
  .edit-field-btn {
    width: 26px;
    height: 26px;
  }
  
  .edit-input {
    font-size: 1.1rem;
    padding: 0.7rem 0.9rem;
  }
}

/* Mobile improvements */
@media (max-width: 480px) {
  .editable-field-container {
    gap: 0.5rem;
  }
  
  .edit-field-btn {
    width: 24px;
    height: 24px;
  }
  
  .edit-button-container {
    width: 100%;
    justify-content: flex-end;
  }
}

.lazy-load-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.9rem 1.6rem;
  border-radius: 100px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: var(--box-shadow);
}

.rainbow-text {
  margin-top: -1.5rem;
  margin-bottom: 1rem;
  font-size: 1.2rem;
  font-weight: 600;
  display: inline-block;
  background: linear-gradient(45deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #8b00ff);
  background-size: 400% 400%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: rainbow 10s ease infinite;
}

@keyframes rainbow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.empty-state {
  text-align: center;
  padding: 3.5rem;
  color: var(--text-color);
  opacity: 0.7;
  background: rgba(26, 30, 35, 0.5);
  border-radius: var(--border-radius);
  border: 1px solid var(--input-border);
}

.empty-state i {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  opacity: 0.8;
}

.poster-container {
  position: relative;
  width: 100%;
  margin-bottom: 1rem;
  overflow: hidden;
  border-radius: var(--border-radius);
}

#animePoster {
  width: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

#animePoster.generating {
  opacity: 0.6;
  filter: blur(3px);
}

#animePoster.generating::before {
  content: "Generating new poster...";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-weight: bold;
  text-align: center;
  z-index: 2;
  text-shadow: 0 0 5px rgba(0,0,0,0.8);
}

.poster-controls {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 10;
  display: flex;
  gap: 10px;
}

.poster-btn {
  background: rgba(66, 133, 244, 0.85);
  color: white;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 3px 8px rgba(0,0,0,0.3);
  backdrop-filter: blur(3px);
}

.poster-btn:hover {
  background: var(--primary-color);
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 8px 15px rgba(0,0,0,0.3);
}

.poster-btn:disabled {
  background: rgba(100, 100, 100, 0.7);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.poster-btn i {
  font-size: 1.5rem;
}

.poster-success-message {
  position: absolute;
  top: 70px;
  right: 15px;
  background: var(--confirm-color);
  color: white;
  padding: 8px 15px;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 600;
  animation: fadeInOut 2s ease-in-out forwards;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  z-index: 10;
}

@keyframes fadeInOut {
  0% { opacity: 0; transform: translateY(-10px); }
  15% { opacity: 1; transform: translateY(0); }
  85% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-10px); }
}

.comment-error {
  padding: 1.5rem;
  text-align: center;
  color: var(--text-color);
  opacity: 0.7;
  background: rgba(26, 30, 35, 0.5);
  border-radius: var(--border-radius);
}

@keyframes heartBeat {
  0% { transform: scale(1); }
  14% { transform: scale(1.3); }
  28% { transform: scale(1); }
  42% { transform: scale(1.3); }
  70% { transform: scale(1); }
}

.favorite-btn.favorited {
  animation: heartBeat 1s ease-in-out;
}

.favorites-empty-message {
  text-align: center;
  padding: 3.5rem;
  color: var(--text-color);
  opacity: 0.7;
  background: rgba(26, 30, 35, 0.5);
  border-radius: var(--border-radius);
  border: 1px solid var(--input-border);
}

.japanese-title {
  font-size: 1.3rem;
  color: rgba(240, 240, 240, 0.7);
  margin-top: 0.8rem;
  font-weight: normal;
  font-style: italic;
}

.edit-notification {
  position: relative;
  background-color: rgba(66, 133, 244, 0.1);
  border: 1px solid var(--primary-color);
  border-radius: var(--border-radius);
  padding: 1.2rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  text-align: left;
  color: var(--text-color);
  animation: slideInDown 0.3s ease-out;
  width: 100%;
  box-sizing: border-box;
  box-shadow: 0 5px 15px -8px rgba(66, 133, 244, 0.3);
}

.edit-notification i {
  font-size: 1.5rem;
  color: var(--primary-color);
  flex-shrink: 0;
}

.edit-notification span {
  flex-grow: 1;
  font-weight: 500;
}

.close-notification {
  background: none;
  border: none;
  color: var(--text-color);
  opacity: 0.7;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.close-notification:hover {
  opacity: 1;
  background-color: rgba(255, 255, 255, 0.1);
}

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

.edit-notification.closing {
  animation: slideOutUp 0.3s ease-out forwards;
}

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

@media (max-width: 768px) {
  .header-controls {
    flex-direction: column;
    align-items: flex-end;
    gap: 0.8rem;
  }
  
  .toggle-switch {
    min-width: auto;
    width: 100%;
    margin-bottom: 0.5rem;
  }
  
  .toggle-label {
    justify-content: flex-end;
  }
  
  .japanese-title {
    font-size: 1.1rem;
  }
  
  .edit-notification {
    padding: 1rem;
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .filters-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .header-controls {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
  }
  
  .toggle-switch-label {
    font-size: 0.85rem;
  }
  
  .toggle-inner {
    width: 40px;
    height: 22px;
  }
  
  .toggle-inner:before {
    height: 16px;
    width: 16px;
  }
  
  input:checked + .toggle-label .toggle-inner:before {
    transform: translateX(18px);
  }
  
  .edit-notification i {
    font-size: 1.2rem;
  }
}

.detail-favorite-btn {
  position: relative;
  background: rgba(26, 30, 35, 0.8);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-right: 0.5rem;
  box-shadow: 0 3px 8px rgba(0,0,0,0.3);
}

.detail-favorite-btn:hover {
  background: rgba(234, 67, 53, 0.8);
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 8px 15px rgba(0,0,0,0.3);
}

.detail-favorite-btn.favorited {
  background: var(--favorite-color);
  color: white;
  animation: heartBeat 1s ease-in-out;
  box-shadow: 0 5px 12px rgba(234, 67, 53, 0.5);
}

.detail-favorite-btn i {
  font-size: 1.3rem;
}

.favorite-feedback {
  position: absolute;
  bottom: -35px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--favorite-color);
  color: white;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  white-space: nowrap;
  z-index: 10;
  animation: fadeIn 0.3s ease;
  font-weight: 600;
  box-shadow: 0 3px 8px rgba(0,0,0,0.3);
}

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

.like-counter {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(26, 30, 35, 0.6);
  border-radius: 50px;
  padding: 5px 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  color: var(--text-color);
  font-weight: 500;
  border: 1px solid transparent;
  pointer-events: auto;
}

.like-counter:hover {
  background: rgba(66, 133, 244, 0.2);
  border-color: var(--like-color);
  transform: translateY(-2px);
}

.like-counter.liked {
  background: rgba(66, 133, 244, 0.3);
  color: white;
}

.like-counter i {
  font-size: 1.1rem;
}

.like-counter.liked i {
  color: var(--like-color);
}

.like-animation {
  animation: likePopEffect 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes likePopEffect {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.detail-like-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(26, 30, 35, 0.8);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 0 15px 0 12px;
  height: 40px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 3px 8px rgba(0,0,0,0.3);
}

.detail-like-btn:hover {
  background: rgba(66, 133, 244, 0.8);
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(0,0,0,0.3);
}

.detail-like-btn.liked {
  background: var(--like-color);
  box-shadow: 0 5px 12px rgba(66, 133, 244, 0.5);
}

.detail-like-btn i {
  font-size: 1.3rem;
}

.detail-like-btn .like-count {
  font-size: 0.95rem;
  font-weight: 600;
}

.like-feedback {
  position: absolute;
  bottom: -35px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--like-color);
  color: white;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  white-space: nowrap;
  z-index: 10;
  animation: fadeIn 0.3s ease;
  font-weight: 600;
  box-shadow: 0 3px 8px rgba(0,0,0,0.3);
}

@media (max-width: 768px) {
  .card-footer {
    flex-wrap: wrap;
    gap: 0.8rem;
  }
  
  .like-counter {
    padding: 3px 8px;
    font-size: 0.85rem;
  }
  
  .like-counter i {
    font-size: 1rem;
  }
  
  .detail-like-btn {
    height: 38px;
    padding: 0 12px 0 10px;
  }
  
  .detail-like-btn i {
    font-size: 1.2rem;
  }
  
  .detail-like-btn .like-count {
    font-size: 0.9rem;
  }
  
  .like-feedback {
    font-size: 0.7rem;
    padding: 4px 8px;
    bottom: -30px;
  }
}

.community-filter-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 100px;
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  transition: all 0.3s ease;
  box-shadow: var(--box-shadow);
  font-family: var(--font-family);
}

.community-filter-btn:hover {
  background: #5294ff;
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(66, 133, 244, 0.4);
}

.community-filter-btn.active {
  background: #34a853;
}

.customize-icon {
  width: 30px;
  height: 30px;
  vertical-align: middle;
  margin-left: 10px;
  border-radius: 5px;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  backdrop-filter: blur(5px);
  visibility: hidden;
}

.modal-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.filter-modal {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
  transform: translateY(30px);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.3s ease;
  overflow: hidden;
  border: 2px solid var(--input-border);
}

.filter-modal.visible {
  transform: translateY(0);
  opacity: 1;
}

.filter-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--input-border);
}

.filter-modal-header h3 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
}

.close-modal-btn {
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.close-modal-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.filter-modal-content {
  padding: 1.5rem;
  overflow-y: auto;
  flex-grow: 1;
}

.filter-section {
  margin-bottom: 1.5rem;
}

.filter-section h4 {
  margin: 0 0 0.8rem 0;
  font-size: 1.1rem;
  color: var(--text-color);
  font-weight: 600;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.filter-modal-chip {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--text-color);
  padding: 0.7rem 1.2rem;
  border-radius: 100px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  font-weight: 500;
  font-family: var(--font-family);
}

.filter-modal-chip:hover {
  background: rgba(66, 133, 244, 0.15);
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

.filter-modal-chip.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  font-weight: 600;
  box-shadow: 0 5px 15px -5px rgba(66, 133, 244, 0.5);
}

.filter-modal-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--input-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.active-filter-count {
  font-size: 0.95rem;
  color: var(--text-color);
  opacity: 0.8;
}

.filter-modal-actions {
  display: flex;
  gap: 1rem;
}

.clear-filters-btn {
  background: none;
  border: 1px solid var(--input-border);
  color: var(--text-color);
  padding: 0.8rem 1.2rem;
  border-radius: 100px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  font-weight: 500;
  font-family: var(--font-family);
}

.clear-filters-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.apply-filters-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 100px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s ease;
  font-family: var(--font-family);
  box-shadow: 0 5px 15px -5px rgba(66, 133, 244, 0.5);
}

.apply-filters-btn:hover {
  background: #5294ff;
  transform: translateY(-2px);
  box-shadow: 0 8px 15px -5px rgba(66, 133, 244, 0.6);
}

.anime-card.filtered-out {
  display: none;
}

.anime-card.filter-animation {
  animation: filterAppear 0.5s ease forwards;
}

@keyframes filterAppear {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.clear-filter-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 100px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s ease;
  margin-top: 1rem;
  font-family: var(--font-family);
}

.clear-filter-btn:hover {
  background: #5294ff;
  transform: translateY(-2px);
}

.studio-info-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(5px);
}

.studio-info-modal.visible {
  opacity: 1;
}

.studio-info-content {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  width: 90%;
  max-width: 700px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  overflow: hidden;
  border: 2px solid var(--input-border);
}

.studio-info-modal.visible .studio-info-content {
  transform: translateY(0);
  opacity: 1;
}

.studio-info-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--input-border);
}

.studio-info-header h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.close-studio-info {
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.close-studio-info:hover {
  background: rgba(255, 255, 255, 0.1);
}

.studio-info-body {
  padding: 1.5rem;
  overflow-y: auto;
  max-height: 60vh;
  line-height: 1.7;
}

.studio-info-body p {
  margin-bottom: 1rem;
}

.studio-info-modal.closing {
  opacity: 0;
}

.studio-info-modal.closing .studio-info-content {
  transform: translateY(20px);
  opacity: 0;
}

@media (max-width: 768px) {
  .studio-info-content {
    width: 95%;
    max-height: 80vh;
  }
  
  .studio-info-header {
    padding: 1.2rem;
  }
  
  .studio-info-body {
    padding: 1.2rem;
    max-height: 70vh;
  }
}

.episodes-section {
  background-color: var(--card-bg);
  border: 2px solid var(--input-border);
  border-radius: var(--border-radius);
  padding: 2rem;
  margin-top: 2rem;
  box-shadow: var(--box-shadow);
}

.episodes-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.episodes-header h3 {
  font-size: 1.5rem;
  margin: 0;
  font-weight: 700;
}

.episodes-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.episode-container {
  background-color: var(--bg-color);
  border: 1px solid var(--input-border);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  transition: transform 0.2s ease;
}

.episode-container:hover {
  transform: translateY(-3px);
}

.episode-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.episode-number {
  background-color: var(--primary-color);
  color: white;
  font-weight: bold;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.episode-title {
  font-size: 1.2rem;
  margin: 0;
  font-weight: 700;
}

.episode-description {
  color: rgba(240, 240, 240, 0.9);
  line-height: 1.6;
}

.movie-plot-container {
  background-color: var(--bg-color);
  border: 1px solid var(--input-border);
  border-radius: var(--border-radius);
  padding: 1.8rem;
}

.movie-title {
  font-size: 1.4rem;
  margin: 0 0 1.2rem 0;
  font-weight: 700;
  color: var(--text-color);
}

.movie-description {
  color: rgba(240, 240, 240, 0.9);
  line-height: 1.7;
  white-space: pre-line;
}

.episodes-placeholder {
  background-color: var(--bg-color);
  border: 1px solid var(--input-border);
  border-radius: var(--border-radius);
  padding: 2rem;
  text-align: center;
  color: rgba(240, 240, 240, 0.6);
  margin-bottom: 1.5rem;
}

.generate-episodes-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 1rem 1.5rem;
  border-radius: 100px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  transition: all 0.3s ease;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  box-shadow: var(--box-shadow);
  font-family: var(--font-family);
}

.generate-episodes-btn:hover {
  background: #5294ff;
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(66, 133, 244, 0.4);
}

.generate-episodes-btn:disabled {
  background: #666;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  opacity: 0.7;
}

@media (max-width: 768px) {
  .episodes-section {
    padding: 1.5rem;
  }
  
  .episode-container {
    padding: 1.2rem;
  }
  
  .episode-header {
    flex-wrap: wrap;
  }
  
  .movie-plot-container {
    padding: 1.5rem;
  }
  
  .movie-title {
    font-size: 1.3rem;
  }
  
  .episodes-placeholder {
    padding: 1.5rem;
  }
}

.comment-replies {
  margin-top: 1.2rem;
  padding-left: 2rem;
  border-left: 2px solid var(--input-border);
}

.comment-reply {
  background-color: rgba(26, 30, 35, 0.6);
  border: 1px solid var(--input-border);
  border-radius: var(--border-radius);
  padding: 1rem;
  margin-bottom: 0.8rem;
}

.reply-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.8rem;
}

.reply-content {
  color: rgba(240, 240, 240, 0.9);
  line-height: 1.6;
}

.reply-form {
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}

.reply-textarea {
  width: 100%;
  height: 80px;
  padding: 0.8rem;
  font-size: 1rem;
  color: var(--text-color);
  background: var(--input-bg);
  border: 2px solid var(--input-border);
  border-radius: var(--border-radius);
  resize: none;
  font-family: var(--font-family);
  margin-bottom: 0.8rem;
}

.reply-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

.reply-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.8rem;
}

.cancel-reply-btn, .submit-reply-btn {
  padding: 0.6rem 1.2rem;
  border-radius: 100px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-family);
  font-weight: 500;
}

.cancel-reply-btn {
  background: none;
  border: 1px solid var(--input-border);
  color: var(--text-color);
}

.cancel-reply-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.submit-reply-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  box-shadow: 0 5px 15px -5px rgba(66, 133, 244, 0.5);
}

.submit-reply-btn:hover {
  background: #5294ff;
  transform: translateY(-2px);
  box-shadow: 0 8px 15px -5px rgba(66, 133, 244, 0.6);
}

.music-toggle {
  position: fixed;
  top: 20px;
  left: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(66, 133, 244, 0.9);
  color: white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  z-index: 1000;
  backdrop-filter: blur(4px);
  transition: all 0.3s ease;
}

.music-toggle:hover {
  transform: scale(1.1);
  background: var(--primary-color);
  box-shadow: 0 6px 20px rgba(66, 133, 244, 0.6);
}

.music-toggle.playing i {
  animation: pulse 1.5s infinite alternate;
}

@keyframes pulse {
  from { opacity: 0.7; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1.1); }
}

.music-selection-panel {
  position: fixed;
  top: 80px;
  left: 20px;
  background: rgba(26, 30, 35, 0.9);
  border: 2px solid var(--primary-color);
  border-radius: 16px;
  width: 220px;
  padding: 15px;
  z-index: 999;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(calc(100% - 50px));
  pointer-events: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.music-selection-panel.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.music-selection-header {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  display: flex;
  align-items: center;
  gap: 8px;
}

.music-selection-header i {
  font-size: 1.3rem;
  color: var(--primary-color);
}

.music-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.3s ease;
  margin-bottom: 6px;
  position: relative;
}

.music-option:hover {
  background: rgba(66, 133, 244, 0.2);
  transform: translateX(5px);
}

.music-option.active {
  background: rgba(66, 133, 244, 0.3);
  border-left: 3px solid var(--primary-color);
}

.music-option i {
  color: var(--primary-color);
  font-size: 1.2rem;
}

.music-option span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
  flex: 1;
}

.music-info-btn {
  background: none;
  border: none;
  color: var(--text-color);
  opacity: 0.7;
  font-size: 1rem;
  padding: 4px;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.music-info-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  opacity: 1;
  color: var(--primary-color);
}

.music-info-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  backdrop-filter: blur(5px);
}

.music-info-modal.visible {
  opacity: 1;
  visibility: visible;
}

.music-info-content {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  width: 90%;
  max-width: 700px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  overflow: hidden;
  border: 2px solid var(--input-border);
}

.music-info-modal.visible .music-info-content {
  transform: translateY(0);
  opacity: 1;
}

.music-info-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--input-border);
}

.music-info-header h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.close-music-info {
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.close-music-info:hover {
  background: rgba(255, 255, 255, 0.1);
}

.music-info-body {
  padding: 1.5rem;
  overflow-y: auto;
  max-height: 60vh;
  line-height: 1.7;
}

.music-info-body p {
  margin-bottom: 1rem;
}

.music-artist {
  font-size: 1.1rem;
  color: var(--primary-color);
  display: block;
  margin-bottom: 1rem;
}

.music-info-image {
  float: right;
  max-width: 200px;
  border-radius: var(--border-radius);
  margin: 0 0 1rem 1rem;
  box-shadow: var(--box-shadow);
  border: 1px solid var(--input-border);
}

.music-info-details {
  margin-top: 1.5rem;
  border-top: 1px solid var(--input-border);
  padding-top: 1.5rem;
}

.music-info-details h4 {
  margin: 0 0 0.5rem 0;
  color: var(--text-color);
}

@media (max-width: 768px) {
  .music-info-content {
    width: 95%;
    max-height: 80vh;
  }
  
  .music-info-header {
    padding: 1.2rem;
  }
  
  .music-info-body {
    padding: 1.2rem;
    max-height: 70vh;
  }
  
  .music-info-image {
    max-width: 150px;
    float: none;
    display: block;
    margin: 0 auto 1rem auto;
  }
}

@media (max-width: 480px) {
  .music-info-image {
    max-width: 120px;
  }
}

.popular-section {
  padding: 2rem 1rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  margin-top: 1rem;
}

.popular-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
}

.popular-header h2 {
  font-size: 2.2rem;
  color: var(--text-color);
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.popular-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  width: 100%;
}

.rank-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  z-index: 2;
  box-shadow: 0 3px 8px rgba(0,0,0,0.3);
  backdrop-filter: blur(5px);
}

.rank-badge.gold {
  background: linear-gradient(135deg, #ffd700, #f8bc50);
  width: 42px;
  height: 42px;
  box-shadow: 0 5px 15px rgba(255, 215, 0, 0.5);
}

.rank-badge.silver {
  background: linear-gradient(135deg, #c0c0c0, #e0e0e0);
  width: 40px;
  height: 40px;
  box-shadow: 0 5px 15px rgba(192, 192, 192, 0.5);
}

.rank-badge.bronze {
  background: linear-gradient(135deg, #cd7f32, #e59866);
  box-shadow: 0 5px 15px rgba(205, 127, 50, 0.5);
}

.rank-badge i {
  font-size: 1.2rem;
}

.gold-rank {
  border-color: rgba(255, 215, 0, 0.5);
  box-shadow: 0 10px 25px rgba(255, 215, 0, 0.3);
}

.silver-rank {
  border-color: rgba(192, 192, 192, 0.5);
  box-shadow: 0 10px 25px rgba(192, 192, 192, 0.3);
}

.bronze-rank {
  border-color: rgba(205, 127, 50, 0.5);
  box-shadow: 0 10px 25px rgba(205, 127, 50, 0.3);
}

@media (min-width: 1200px) {
  .community-grid, .favorites-grid, .creations-grid, .popular-grid {
    grid-template-columns: repeat(4, 1fr); 
    max-width: 1200px;
    margin: 0 auto;
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .community-grid, .favorites-grid, .creations-grid, .popular-grid {
    grid-template-columns: repeat(3, 1fr); 
  }
}

@media (min-width: 1400px) {
  .community-grid, .favorites-grid, .creations-grid, .popular-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 2.5rem;
  }
}

@media (min-width: 1600px) {
  .input-container,
  .result-content,
  .community-section,
  .favorites-section,
  .creations-section,
  .popular-section {
    max-width: 1600px;
  }
  
  .community-grid, .favorites-grid, .creations-grid, .popular-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.multiverse-chat-panel {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 300px;
  height: 400px;
  background: var(--card-bg);
  border-radius: var(--border-radius);
  border: 2px solid var(--input-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 900;
  box-shadow: var(--box-shadow);
  transition: all 0.3s ease;
  transform: translateY(calc(100% - 50px));
}

.multiverse-chat-panel.expanded {
  transform: translateY(0);
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  background: rgba(66, 133, 244, 0.2);
  border-bottom: 1px solid var(--input-border);
}

.chat-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-color);
}

.toggle-chat-btn {
  background: none;
  border: none;
  color: var(--text-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  transition: all 0.2s ease;
}

.toggle-chat-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.chat-messages {
  flex-grow: 1;
  overflow-y: auto;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-input-area {
  display: flex;
  align-items: center;
  padding: 10px;
  border-top: 1px solid var(--input-border);
  background: var(--card-bg);
}

#chatInput {
  flex-grow: 1;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text-color);
  border-radius: 20px;
  padding: 8px 15px;
  font-family: var(--font-family);
  resize: none;
  height: 36px;
  max-height: 100px;
  font-size: 0.95rem;
}

#chatInput:focus {
  outline: none;
  border-color: var(--primary-color);
}

.send-chat-btn, .image-upload-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.send-chat-btn {
  background: var(--primary-color);
  color: white;
}

.send-chat-btn:hover {
  background: #5294ff;
  transform: translateY(-2px);
}

.send-chat-btn:disabled {
  background: #6c757d;
  cursor: not-allowed;
}

.image-upload-btn {
  background: var(--card-bg);
  color: var(--text-color);
  border: 1px solid var(--input-border);
}

.image-upload-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.image-upload-btn:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.message-image {
  margin-bottom: 8px;
  max-width: 100%;
}

.message-image img {
  max-width: 100%;
  max-height: 200px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid var(--input-border);
}

.chat-message {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  max-width: 85%;
}

.chat-message.current-user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  flex-shrink: 0;
  overflow: hidden;
}

.message-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.message-content {
  background: rgba(26, 30, 35, 0.6);
  border-radius: 12px;
  padding: 8px 12px;
  position: relative;
}

.chat-message.current-user .message-content {
  background: rgba(66, 133, 244, 0.2);
}

.message-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
  font-size: 0.8rem;
}

.message-username {
  font-weight: 600;
  color: var(--text-color);
}

.message-time {
  color: rgba(240, 240, 240, 0.6);
  font-size: 0.75rem;
}

.message-text {
  word-break: break-word;
  font-size: 0.95rem;
  line-height: 1.4;
}

.empty-chat-message {
  text-align: center;
  padding: 20px;
  color: rgba(240, 240, 240, 0.6);
  font-style: italic;
}

.system-message {
  justify-content: center;
  margin: 8px 0;
}

.system-message-content {
  background: rgba(66, 133, 244, 0.1);
  border-radius: 12px;
  padding: 6px 12px;
  font-size: 0.85rem;
  color: rgba(240, 240, 240, 0.8);
  display: flex;
  align-items: center;
  gap: 8px;
  font-style: italic;
}

.system-message-content i {
  color: var(--primary-color);
}

.system-message-content .message-time {
  margin-left: auto;
  font-size: 0.75rem;
}

.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(15, 17, 20, 0.95) 0%, rgba(26, 30, 35, 0.95) 100%);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s ease, visibility 0.8s ease;
  backdrop-filter: blur(10px);
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

.loading-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  animation: fadeInUp 1s ease forwards;
}

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

.cat-button {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  z-index: 1000;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.cat-button:hover {
  transform: scale(1.1);
}

.cat-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.cooldown-message {
  position: absolute;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: fadeIn 0.3s ease;
  box-shadow: 0 3px 10px rgba(0,0,0,0.3);
  white-space: nowrap;
  z-index: 10;
}

.cooldown-message i {
  color: var(--primary-color);
}

.cooldown-message.fade-out {
  animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeOut {
  from { opacity: 1; transform: translateX(-50%) translateY(0); }
  to { opacity: 0; transform: translateX(-50%) translateY(10px); }
}

.system-message {
  justify-content: center;
  margin: 8px 0;
}

.system-message-content {
  background: rgba(66, 133, 244, 0.1);
  border-radius: 12px;
  padding: 6px 12px;
  font-size: 0.85rem;
  color: rgba(240, 240, 240, 0.8);
  display: flex;
  align-items: center;
  gap: 8px;
  font-style: italic;
}

.system-message-content i {
  color: var(--primary-color);
}

.system-message-content .message-time {
  margin-left: auto;
  font-size: 0.75rem;
}

.review-sites-section {
  margin: 1.5rem 0;
}

.review-sites-section h3 {
  margin-bottom: 1rem;
  font-size: 1.4rem;
  font-weight: 700;
}

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

.review-site-card {
  background: rgba(26, 30, 35, 0.5);
  border: 1px solid var(--input-border);
  border-radius: var(--border-radius);
  padding: 1rem;
  transition: transform 0.2s ease;
}

.review-site-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.review-site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.8rem;
}

.review-site-name {
  font-weight: 700;
  font-size: 1.1rem;
}

.review-site-score {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary-color);
}

.review-site-comment {
  font-size: 0.9rem;
  line-height: 1.5;
  color: rgba(240, 240, 240, 0.9);
}

@media (max-width: 768px) {
  .review-sites-grid {
    grid-template-columns: 1fr;
  }
}

.jump-scare {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10001;
  background-color: black;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: flash-scare 0.5s cubic-bezier(0.19, 1, 0.22, 1);
  visibility: hidden;
}

.jump-scare.hidden {
  visibility: hidden;
  opacity: 0;
}

.jump-scare:not(.hidden) {
  visibility: visible;
  opacity: 1;
}

@keyframes flash-scare {
  0% { opacity: 0; transform: scale(0.95); }
  10% { opacity: 1; transform: scale(1.05); }
  20% { transform: scale(0.98); }
  30% { transform: scale(1.02); }
  50% { transform: scale(1); }
  90% { opacity: 1; }
  100% { opacity: 0; }
}

.jump-scare img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  max-width: 100vw;
  max-height: 100vh;
}

.random-anime-btn {
  background: var(--card-bg);
  color: var(--text-color);
  border: 2px solid var(--primary-color);
  padding: 1.2rem 2rem;
  border-radius: 100px;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.3s ease;
  width: 100%;
  max-width: 400px;
  justify-content: center;
  margin-top: 1rem;
  box-shadow: var(--box-shadow);
  font-family: var(--font-family);
}

.random-anime-btn:hover {
  background: rgba(66, 133, 244, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 15px 30px -10px rgba(66, 133, 244, 0.4);
}

.random-anime-btn:disabled {
  background: #333;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  opacity: 0.7;
}

@media (max-width: 768px) {
  .random-anime-btn {
    padding: 1rem 1.8rem;
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .random-anime-btn {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1rem;
  }
}

/* Trailer modal */

.trailer-modal {
  position: fixed;
  inset: 0;
  z-index: 11000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.trailer-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(0,0,0,0.6), rgba(0,0,0,0.95));
  backdrop-filter: blur(6px);
}

.trailer-content {
  position: relative;
  width: min(900px, 100vw);
  aspect-ratio: 16 / 9;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.8);
  border: 2px solid rgba(255,255,255,0.2);
}

.trailer-player {
  width: 100%;
  height: 100%;
  background-color: #000;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.trailer-player::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.6) 60%, rgba(0,0,0,0.9) 100%);
}

.trailer-scene-text {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 80%;
  margin: 0 auto;
  color: #fff;
}

.trailer-tagline {
  font-size: 1.1rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  opacity: 0.8;
}

.trailer-title {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  text-shadow: 0 0 20px rgba(0,0,0,0.7);
}

.trailer-subtext {
  font-size: 1rem;
  opacity: 0.9;
}

.trailer-player.scene-enter .trailer-scene-text {
  animation: trailerSceneFade 0.9s ease-out;
}

@keyframes trailerSceneFade {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  40% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.close-trailer-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: none;
  background: rgba(0,0,0,0.7);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  transition: all 0.2s ease;
}

.close-trailer-btn:hover {
  background: rgba(255,255,255,0.15);
  transform: translateY(-1px);
}

.close-trailer-btn i {
  font-size: 1.3rem;
}

@media (max-width: 768px) {
  .trailer-content {
    width: 95vw;
  }
  .trailer-title {
    font-size: 1.7rem;
  }
  .trailer-tagline {
    font-size: 0.9rem;
  }
  .trailer-subtext {
    font-size: 0.9rem;
  }
}

/* Trailer modal */

.trailer-modal {
  position: fixed;
  inset: 0;
  z-index: 11000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.trailer-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(0,0,0,0.6), rgba(0,0,0,0.95));
  backdrop-filter: blur(6px);
}

.trailer-content {
  position: relative;
  width: min(900px, 100vw);
  aspect-ratio: 16 / 9;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.8);
  border: 2px solid rgba(255,255,255,0.2);
}

.trailer-player {
  width: 100%;
  height: 100%;
  background-color: #000;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.trailer-player::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.6) 60%, rgba(0,0,0,0.9) 100%);
}

.trailer-scene-text {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 80%;
  margin: 0 auto;
  color: #fff;
}

.trailer-tagline {
  font-size: 1.1rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  opacity: 0.8;
}

.trailer-title {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  text-shadow: 0 0 20px rgba(0,0,0,0.7);
}

.trailer-subtext {
  font-size: 1rem;
  opacity: 0.9;
}

.trailer-player.scene-enter .trailer-scene-text {
  animation: trailerSceneFade 0.9s ease-out;
}

@keyframes trailerSceneFade {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  40% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.close-trailer-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: none;
  background: rgba(0,0,0,0.7);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  transition: all 0.2s ease;
}

.close-trailer-btn:hover {
  background: rgba(255,255,255,0.15);
  transform: translateY(-1px);
}

.close-trailer-btn i {
  font-size: 1.3rem;
}

@media (max-width: 768px) {
  .trailer-content {
    width: 95vw;
  }
  .trailer-title {
    font-size: 1.7rem;
  }
  .trailer-tagline {
    font-size: 0.9rem;
  }
  .trailer-subtext {
    font-size: 0.9rem;
  }
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(26, 30, 35, 0.5);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: rgba(66, 133, 244, 0.5);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(66, 133, 244, 0.7);
}

.loading-spinner {
  border: 8px solid #f3f3f3; /* Light grey background */
  border-top: 8px solid #ff69b4; /* Pink top to spin */
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

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

.welcome-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(15, 17, 20, 0.98) 0%, rgba(26, 30, 35, 0.98) 100%);
  background-image: url('/Image2.jpg');
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s ease, visibility 0.8s ease;
  backdrop-filter: blur(10px);
}

.welcome-menu.hidden {
  opacity: 0;
  visibility: hidden;
}

.welcome-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
  animation: welcomeSlideIn 1.2s ease forwards;
}

.welcome-title {
  font-size: 6rem;
  font-weight: 900;
  margin: 0;
  background: linear-gradient(45deg, #4285f4, #34a853, #fbbc05, #ea4335);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -2px;
  text-shadow: 0 0 30px rgba(66, 133, 244, 0.3);
  animation: titleGlow 3s ease-in-out infinite alternate;
}

.play-button {
  background: linear-gradient(45deg, #4285f4, #5294ff);
  color: white;
  border: none;
  padding: 2rem 4rem;
  border-radius: 100px;
  font-size: 2rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 1.5rem;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 15px 40px -10px rgba(66, 133, 244, 0.6);
  font-family: var(--font-family);
  position: relative;
  overflow: hidden;
  letter-spacing: 2px;
}

.play-button:hover {
  background: linear-gradient(45deg, #5294ff, #74abff);
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 25px 50px -10px rgba(66, 133, 244, 0.8);
}

.play-button:before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: all 0.8s;
}

.play-button:hover:before {
  left: 100%;
}

.play-button i {
  font-size: 2.5rem;
  animation: playPulse 2s ease-in-out infinite;
}

@keyframes welcomeSlideIn {
  0% {
    opacity: 0;
    transform: translateY(50px) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes titleGlow {
  0% {
    filter: drop-shadow(0 0 20px rgba(66, 133, 244, 0.5));
  }
  100% {
    filter: drop-shadow(0 0 40px rgba(66, 133, 244, 0.8));
  }
}

@keyframes playPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

@media (max-width: 768px) {
  .welcome-title {
    font-size: 4rem;
    letter-spacing: -1px;
  }
  
  .play-button {
    padding: 1.5rem 3rem;
    font-size: 1.5rem;
    gap: 1rem;
  }
  
  .play-button i {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .welcome-title {
    font-size: 3rem;
  }
  
  .play-button {
    padding: 1.2rem 2.5rem;
    font-size: 1.3rem;
  }
  
  .welcome-content {
    gap: 2rem;
  }
}