/* Kobiki Styles - Paper & Crayon Theme */

:root {
  --primary-color: #FF6B6B;
  --secondary-color: #4ECDC4;
  --accent-color: #FFE66D;
  --text-dark: #2D3436;
  --text-light: #636E72;
  --bg-light: #FAFAFA;
  --bg-white: #FFFFFF;
  --shadow-soft: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.12);
  --border-radius: 24px;
  --border-radius-lg: 28px;
}

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

body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-light);
  background-image: 
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 10px,
      rgba(255, 255, 255, 0.1) 10px,
      rgba(255, 255, 255, 0.1) 20px
    ),
    radial-gradient(
      ellipse at top,
      rgba(255, 235, 205, 0.3),
      transparent 70%
    );
  background-size: 100px 100px, 100% 100%;
  min-height: 100vh;
}

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

/* Header */
header {
  background: var(--bg-white);
  box-shadow: var(--shadow-soft);
  position: sticky;
  top: 0;
  z-index: 100;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 20px;
}

.logo {
  height: 45px;
  width: auto;
  display: block;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}


nav {
  display: flex;
  gap: 2rem;
}

nav a {
  font-family: 'Patrick Hand', cursive;
  font-size: 1.2rem;
  color: var(--text-dark);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

/* Hero Section */
.hero {
  padding: 4rem 0;
  text-align: center;
}

.crayon-divider {
  width: 100%;
  height: 20px;
  margin: 2rem 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 20'%3E%3Cpath d='M0,10 Q50,5 100,10 T200,10' stroke='%23FF6B6B' stroke-width='3' fill='none' stroke-linecap='round' /%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: 200px 20px;
}

.hero h2 {
  font-family: 'Patrick Hand', cursive;
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-light);
  margin-bottom: 2rem;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  font-family: 'Patrick Hand', cursive;
  font-size: 1.1rem;
  text-decoration: none;
  border-radius: var(--border-radius);
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
  box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn-secondary {
  background: var(--secondary-color);
  color: white;
  box-shadow: var(--shadow-soft);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

/* Gallery Section */
.gallery-section {
  padding: 4rem 0;
}

.gallery-section h2 {
  font-family: 'Patrick Hand', cursive;
  font-size: 2.5rem;
  text-align: center;
  color: var(--primary-color);
  margin-bottom: 3rem;
}

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

.gallery-item {
  background: var(--bg-white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: all 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-4px) rotate(1deg);
  box-shadow: var(--shadow-hover);
}

@media (prefers-reduced-motion: reduce) {
  .gallery-item:hover {
    transform: translateY(-4px);
  }
}

.gallery-item img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  border-radius: var(--border-radius);
  transition: filter 0.3s ease;
  filter: blur(5px);
}

.gallery-item img.loaded {
  filter: blur(0);
}

/* Lightbox */
.lightbox {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: none;
  border-radius: var(--border-radius-lg);
  padding: 0;
  max-width: 90vw;
  max-height: 90vh;
  background: var(--bg-white);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  margin: 0;
}

.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.8);
}

.lightbox-content {
  position: relative;
  padding: 2rem;
}

.close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border: none;
  background: var(--bg-light);
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.close-btn:hover {
  background: var(--primary-color);
  color: white;
  transform: rotate(90deg);
}

#lightbox-image {
  max-width: 100%;
  max-height: 60vh;
  display: block;
  margin: 0 auto 2rem;
  border-radius: var(--border-radius);
}

.lightbox-info {
  text-align: center;
}

#lightbox-title {
  font-family: 'Patrick Hand', cursive;
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.license-note {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.lightbox-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* Community Page */
.community-section {
  padding: 4rem 0;
}

.community-section h2 {
  font-family: 'Patrick Hand', cursive;
  font-size: 2.5rem;
  text-align: center;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.community-section > .container > p {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 3rem;
}

.community-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.card {
  background: var(--bg-white);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  color: var(--text-dark);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.card h3 {
  font-family: 'Patrick Hand', cursive;
  font-size: 1.8rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--text-light);
}

/* Remixes Page */
.remixes-section {
  padding: 4rem 0;
}

.remixes-section h2 {
  font-family: 'Patrick Hand', cursive;
  font-size: 2.5rem;
  text-align: center;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.remixes-section > .container > p {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 3rem;
}

.remixes-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 600px;
  margin: 0 auto;
}

.tweet-embed-container {
  background: var(--bg-white);
  border-radius: var(--border-radius);
  padding: 1rem;
  box-shadow: var(--shadow-soft);
  min-height: 300px;
}

.remixes-grid .twitter-tweet {
  margin: 0 auto !important;
}

/* Loading state for tweets */
.tweet-embed-container:has(.twitter-tweet-rendered) {
  padding: 0;
  background: transparent;
  box-shadow: none;
}

/* Footer */
footer {
  background: var(--bg-light);
  margin-top: 4rem;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

footer .container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.ca-section {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: color 0.3s ease;
  font-size: 0.9rem;
  color: var(--text-light);
}

.ca-section:hover {
  color: var(--primary-color);
}

.copy-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  cursor: pointer;
  color: var(--text-light);
  transition: color 0.3s ease;
}

.copy-icon:hover {
  color: var(--primary-color);
}

.copy-icon svg {
  width: 16px;
  height: 16px;
}

.social-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.social-links a {
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

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

.separator {
  color: var(--text-light);
  font-size: 0.8rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  header .container {
    flex-direction: column;
    gap: 1rem;
  }
  
  .logo {
    font-size: 2rem;
  }
  
  nav {
    gap: 1.5rem;
  }
  
  nav a {
    font-size: 1rem;
  }
  
  .hero h2 {
    font-size: 2rem;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
  }
  
  .ca-section {
    flex-direction: column;
  }
  
  #ca-address {
    font-size: 0.8rem;
  }
}

/* Focus styles for accessibility */
:focus {
  outline: 3px solid var(--secondary-color);
  outline-offset: 2px;
}

/* Canvas for confetti (hidden by default) */
#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
}