:root {
  /* Common Settings */
  --header-height: 70px;
  --radius-md: 12px;
  --radius-lg: 20px;
  
  /* Light Mode (Default/Normal) */
  --primary-color: #4f46e5; /* Indigo 600 - High contrast */
  --primary-glow: rgba(79, 70, 229, 0.3);
  --secondary-color: #9333ea; /* Purple 600 */
  --accent-color: #db2777; /* Pink 600 */
  --background-color: #f1f5f9; /* Slate 100 - Light gray, not harsh white */
  --surface-color: #ffffff; /* White surface */
  --surface-hover: #f8fafc; /* Slate 50 */
  --text-main: #0f172a; /* Slate 900 - Near black for max contrast */
  --text-muted: #475569; /* Slate 600 - Dark grey, readable */
  --white: #ffffff;
  --glass-bg: rgba(255, 255, 255, 0.95); /* High opacity for readability */
  --glass-border: rgba(148, 163, 184, 0.2); /* Subtle grey border */
  --card-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --input-bg: #ffffff;
  --input-border: #cbd5e1;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Dark Mode */
    --primary-color: #818cf8; /* Indigo 400 */
    --primary-glow: rgba(129, 140, 248, 0.4);
    --secondary-color: #c084fc; /* Purple 400 */
    --accent-color: #f472b6; /* Pink 400 */
    --background-color: #020617; /* Slate 950 - Very dark */
    --surface-color: #1e293b; /* Slate 800 */
    --surface-hover: #334155; /* Slate 700 */
    --text-main: #f8fafc; /* Slate 50 - Near white */
    --text-muted: #cbd5e1; /* Slate 300 - Light grey */
    --glass-bg: rgba(30, 41, 59, 0.98); /* Almost opaque */
    --glass-border: rgba(255, 255, 255, 0.15);
    --card-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.5), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --input-bg: rgba(15, 23, 42, 0.8);
    --input-border: #334155;
  }
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--background-color);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
  /* Subtle mesh gradient background */
  background-image: 
    radial-gradient(circle at 10% 20%, var(--primary-glow), transparent 20%),
    radial-gradient(circle at 90% 80%, rgba(236, 72, 153, 0.15), transparent 20%);
  background-attachment: fixed; /* Parallax-like fix */
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

/* Header */
header {
  background-color: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  transition: all 0.3s ease;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 30px;
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-color); /* Explicit color for readability */
  letter-spacing: -0.02em;
}

.logo img {
  border-radius: 8px;
}

.nav-links {
  display: flex;
  gap: 30px;
}

.nav-links a {
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
}

.nav-links a:hover {
  color: var(--primary-color);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

/* Footer */
footer {
  background-color: var(--surface-color);
  border-top: 1px solid var(--glass-border);
  padding: 60px 0 30px;
  margin-top: 80px;
  position: relative;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
  opacity: 0.3;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 50px;
}

.footer-section h3 {
  margin-bottom: 20px;
  font-size: 1.1rem;
  color: var(--text-main);
  font-weight: 700;
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: 12px;
}

.footer-section a {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.footer-section a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.copyright {
  text-align: center;
  margin-top: 60px;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding-top: 30px;
  border-top: 1px solid var(--glass-border);
}

/* Main Content */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 30px;
}

.hero {
  text-align: center;
  margin-bottom: 80px;
  padding: 100px 20px;
  background-color: var(--glass-bg); /* Use semi-opaque bg for readability */
  backdrop-filter: blur(8px);
  border-radius: 30px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  box-shadow: 0 10px 30px -5px rgba(0,0,0,0.1);
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 20px;
  color: var(--text-main);
  letter-spacing: -0.03em;
  position: relative;
  z-index: 2;
  font-weight: 800;
}

.hero p {
  color: var(--text-muted);
  font-size: 1.3rem;
  max-width: 700px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  font-weight: 500;
}

/* Main Grid Style */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

.card {
  background: var(--surface-color); /* Solid-ish background */
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.2);
  border-color: var(--primary-color);
}

.card-image {
  height: 220px;
  background-color: var(--surface-hover);
  overflow: hidden;
  position: relative;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card:hover .card-image img {
  transform: scale(1.05);
}

.card-content {
  padding: 24px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-category {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary-color);
  margin-bottom: 8px;
  font-weight: 700;
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: 10px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.4;
}

.card-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  flex-grow: 1;
  line-height: 1.6;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  background-color: var(--primary-color);
  color: #ffffff; /* Always white text on button */
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  transition: all 0.2s ease;
  border: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 0.9rem;
  width: 100%;
}

/* Page specific */
.page-title {
  margin-bottom: 40px;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-main);
}

.content-area {
  background: var(--surface-color);
  padding: 50px 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  border: 1px solid var(--glass-border);
}

.content-area h2 {
  margin: 40px 0 20px;
  font-size: 1.75rem;
  color: var(--text-main);
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 10px;
}

.content-area p {
  margin-bottom: 1.8em;
  font-size: 1.05rem;
  color: var(--text-muted);
}

/* Contact Form */
.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: var(--text-main);
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px;
  border: 2px solid var(--input-border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  background-color: var(--input-bg);
  color: var(--text-main);
  transition: all 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-group textarea {
  resize: vertical;
  min-height: 180px;
}

button.btn {
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  width: 100%;
}

/* Pagination */
.pagination {
  margin-top: 60px;
  text-align: center;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.page-link,
.page-dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 45px;
  min-width: 45px;
  padding: 0 15px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--text-main);
  background-color: var(--surface-color);
  font-weight: 600;
  transition: all 0.2s;
}

.page-link:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
}

.page-link.current {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.page-dots {
  border: none;
  background: none;
}

/* External Profiles List */
.external-profile-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.external-profile-list li {
  margin: 0;
}

.external-profile-list a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 25px;
  background-color: var(--surface-color);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  font-weight: 700;
  color: var(--primary-color);
  transition: all 0.3s ease;
  min-height: 90px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.external-profile-list a:hover {
  background-color: var(--surface-hover);
  border-color: var(--primary-color);
  transform: translateY(-4px);
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.1);
  text-decoration: none;
}

/* Header Search Form */
.nav-container form {
  display: flex;
  gap: 0;
  flex-grow: 1;
  max-width: 450px;
  margin: 0 30px;
  position: relative;
  background: var(--surface-color);
  border-radius: 50px;
  padding: 4px;
  border: 1px solid var(--glass-border);
  transition: all 0.3s;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.nav-container form:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.nav-container input[type="text"] {
  flex-grow: 1;
  padding: 10px 20px;
  border: none;
  border-radius: 50px;
  font-size: 0.95rem;
  outline: none;
  background: transparent;
  color: var(--text-main);
}

.nav-container input[type="text"]::placeholder {
  color: var(--text-muted);
}

.nav-container button {
  padding: 8px 24px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 40px;
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s;
}

.nav-container button:hover {
  background-color: var(--secondary-color);
  transform: scale(1.05);
}

/* Responsive Design */
@media (max-width: 768px) {
  :root {
    --header-height: auto;
  }

  header {
    height: auto;
    padding: 20px 0;
    position: relative; 
  }

  .nav-container {
    flex-direction: column;
    gap: 20px;
  }

  /* Make search full width on mobile */
  .nav-container form {
    width: 100%;
    max-width: none;
    margin: 0;
  }

  .logo {
    font-size: 1.4rem;
  }

  .nav-links {
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-links a {
    font-size: 0.95rem;
  }
}

/* AdSense */
.adsbygoogle {
  display: block;
  text-align: center;
  margin: 40px auto;
  background: var(--surface-color);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
}

/* Share Section */
#share-section {
  padding: 60px 0;
  background-color: var(--surface-color); /* Reliable bg */
  border-top: 1px solid var(--glass-border);
  margin-top: 80px;
  position: relative;
}

#share-section h2 {
  text-align: center;
  font-size: 1.75rem;
  margin-bottom: 40px;
  color: var(--text-main);
}

.share-copy-container {
  text-align: center;
  margin: 30px 0;
}

.btn-copy-title {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  width: 90%;
  max-width: 450px;
  font-weight: 700;
}

.btn-copy-title:hover {
  background-color: var(--primary-color);
  color: #ffffff;
  transform: scale(1.02);
  box-shadow: 0 4px 15px var(--primary-glow);
}

.share-sns-container {
  text-align: center;
  margin: 40px 0;
}

.share-sns-title {
  margin-bottom: 20px;
  font-size: 1.1rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.share-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.btn-share {
  color: white;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 140px;
  justify-content: center;
  border: none;
  font-weight: 600;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn-share:hover {
  transform: translateY(-4px);
  filter: brightness(1.1);
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.2);
}

.btn-share-x {
  background-color: #000000;
}

.btn-share-facebook {
  background-color: #1877f2;
}

.btn-share-instagram {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.btn-share-line {
  background-color: #06c755;
}

.btn-share-icon {
  font-size: 1.3rem;
  display: flex;
  align-items: center;
}

.btn-share-icon img {
  width: 1.3rem;
  height: 1.3rem;
  object-fit: contain;
}

#copyStatus {
  margin-top: 15px;
  font-size: 0.95rem;
  color: var(--text-muted);
  min-height: 1.5em;
  font-weight: 600;
}

/* Share Modal */
.share-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6); /* Standard dim overlay */
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  font-family: inherit;
  opacity: 0;
  animation: sm-fadeIn 0.3s forwards;
}

@keyframes sm-fadeIn {
  to { opacity: 1; }
}

.share-modal-content {
  background: var(--surface-color);
  padding: 40px;
  border-radius: 20px;
  text-align: center;
  max-width: 450px;
  width: 90%;
  margin: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  transform: scale(0.9);
  animation: sm-scaleIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes sm-scaleIn {
  to { transform: scale(1); }
}

.share-modal-icon {
  font-size: 3.5rem;
  margin-bottom: 20px;
}

.share-modal-title {
  margin: 0 0 15px 0;
  color: var(--text-main);
  font-size: 1.5rem;
  font-weight: 700;
}

.share-modal-text {
  margin: 0 0 30px 0;
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 1.05rem;
}

.share-modal-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.btn-modal {
  padding: 12px 30px;
  border-radius: 50px;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  font-weight: 600;
  transition: opacity 0.2s, transform 0.2s;
  color: white;
  text-decoration: none;
  display: inline-block;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.btn-modal:hover {
  text-decoration: none;
  color: white;
  transform: translateY(-2px);
}

.btn-modal-instagram {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.btn-modal-line {
  background-color: #06c755;
}

.btn-modal-close {
  background-color: var(--surface-hover);
  color: var(--text-muted);
}

.btn-modal-close:hover {
  background-color: #475569;
  color: white;
}

/* Global Tag Styles */
.tag-chip {
  display: inline-block;
  background-color: var(--surface-hover);
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 0.95rem;
  color: var(--text-main);
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid var(--glass-border);
  font-weight: 500;
}

.tag-chip:hover {
  background-color: var(--primary-color);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-color);
}

/* Item Page Specifics */
.item-image-container {
  background-color: var(--surface-hover); /* Adaptive background */
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding-bottom: 10px;
  border: 1px solid var(--glass-border);
}

.item-meta-text {
  margin-top: 10px;
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 500;
  background-color: var(--surface-color);
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
}

/* Kling Promo Section */
.kling-promo-section {
  margin-bottom: 40px;
  padding: 30px;
  background: var(--surface-hover);
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  text-align: center;
}

.kling-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.kling-cta-btn {
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  width: auto;
  min-width: 260px;
  font-weight: 700;
  color: white;
  border: none;
}

.kling-code-box {
  background: var(--surface-color);
  padding: 8px 10px 8px 20px;
  border-radius: 50px;
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
  max-width: 100%;
  flex-wrap: wrap;
  justify-content: center;
  transition: all 0.3s ease;
}

.kling-code-box:hover {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.kling-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}

.kling-code-text {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: 1px;
  font-family: monospace;
}

.kling-copy-btn {
  min-width: auto;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  margin-left: 0;
  background-color: var(--surface-hover);
  color: var(--text-main);
  border: 1px solid var(--glass-border);
}

.kling-copy-btn:hover {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

#kling-msg {
  height: 20px;
  font-size: 0.9rem;
  color: #10b981;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.3s;
  margin-top: -10px;
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .kling-code-box {
    border-radius: 12px;
    padding: 15px;
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }
  
  .kling-cta-btn {
    width: 100%;
    min-width: 0;
  }
}

/* Enhanced Mobile Adjustments */
@media (max-width: 768px) {
  /* Header adjustment */
  .nav-container {
    padding: 0 16px;
  }

  /* Reduce general padding to utilize screen width */
  .container {
    padding: 16px;
  }
  
  .content-area {
    /* padding: 20px !important; /* Force override user's desktop edit */
    border-radius: var(--radius-md);
  }
  
  /* Fix Hero typography */
  .hero {
    padding: 60px 20px;
  }

  .hero h1 {
    font-size: 1.8rem;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word; /* Ensure long words/names wrap */
  }
  
  .hero p {
    font-size: 0.95rem;
  }
  
  /* Item Page Specifics */
  .item-header h1 {
    font-size: 1.5rem !important;
    line-height: 1.4;
    overflow-wrap: break-word;
  }
  
  .item-image-container {
    max-height: none !important;
    padding: 0 !important; /* Remove internal padding to show image larger */
    border: none; /* Clean up border on mobile if desired, or keep it */
    background: transparent; /* Seamless look */
  }
  
  .item-image-container img {
    border-radius: 8px; /* Add radius directly to image */
    max-height: 400px !important;
    width: 100%; /* Full width */
    height: auto;
    object-fit: contain;
  }
  
  /* Optimize buttons stack */
  .action-area .btn {
    width: 100%;
    margin-bottom: 10px;
  }
  
  .action-area > div {
    flex-direction: column;
    width: 100%;
  }

  /* Kling Promo Mobile */
  .kling-promo-section {
    padding: 20px !important;
  }
}

/* Type Badges */
.type-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 800;
  color: #fff;
  z-index: 10;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

.type-badge-movie {
  background-color: rgba(239, 68, 68, 0.9);
  backdrop-filter: blur(4px);
}

.type-badge-image {
  background-color: rgba(16, 185, 129, 0.9);
  backdrop-filter: blur(4px);
}
