/* AI Photo Stock - Main Stylesheet */

/* ===== CSS Variables ===== */
:root {
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-secondary: #10b981;
  --color-accent: #f59e0b;
  --color-text: #1f2937;
  --color-text-light: #6b7280;
  --color-bg: #ffffff;
  --color-bg-alt: #f9fafb;
  --color-border: #e5e7eb;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --transition: all 0.2s ease;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Hiragino Sans', 'Noto Sans JP', sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

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

.btn-primary:hover {
  background: var(--color-primary-dark);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

.btn-outline:hover {
  background: var(--color-bg-alt);
  border-color: var(--color-text-light);
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1rem;
  border-radius: var(--radius-lg);
  background: var(--color-primary);
  color: white;
}

.btn-large:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  background: white;
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
}

.logo-ai {
  color: var(--color-primary);
}

.logo-photo {
  color: var(--color-secondary);
  margin-left: 0.15em;
}

.logo-stock {
  color: var(--color-text);
  margin-left: 0.15em;
}

/* wakku.work logo styles */
.logo-wakku {
  color: #8b5cf6;
  font-weight: 800;
}

.logo-work {
  color: #6366f1;
  font-weight: 600;
}

.main-nav {
  display: flex;
  gap: 1.5rem;
}

.main-nav a {
  font-size: 0.9rem;
  color: var(--color-text-light);
  transition: var(--transition);
}

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

.header-actions {
  display: flex;
  gap: 0.75rem;
}

/* ===== Hero Section ===== */
.hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 4rem 1.5rem;
  text-align: center;
  color: white;
}

.hero-content {
  max-width: 700px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.125rem;
  opacity: 0.9;
  margin-bottom: 2rem;
}

.search-container {
  display: flex;
  max-width: 600px;
  margin: 0 auto 1.5rem;
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.search-input {
  flex: 1;
  padding: 1rem 1.25rem;
  border: none;
  font-size: 1rem;
  color: var(--color-text);
  outline: none;
}

.search-input::placeholder {
  color: var(--color-text-light);
}

.search-btn {
  padding: 1rem 1.25rem;
  background: var(--color-primary);
  border: none;
  color: white;
  cursor: pointer;
  transition: var(--transition);
}

.search-btn:hover {
  background: var(--color-primary-dark);
}

.popular-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.875rem;
}

.popular-tags span {
  opacity: 0.8;
}

.tag {
  padding: 0.375rem 0.75rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 9999px;
  transition: var(--transition);
}

.tag:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ===== Sections ===== */
.featured-section,
.categories-section,
.creators-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

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

.section-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
}

.view-all {
  font-size: 0.875rem;
  color: var(--color-primary);
  font-weight: 500;
}

.view-all:hover {
  text-decoration: underline;
}

/* ===== Image Grid ===== */
.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.image-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-bg-alt);
  aspect-ratio: 4/3;
  cursor: pointer;
  transition: var(--transition);
}

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

.image-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: white;
  opacity: 0;
  transition: var(--transition);
}

.image-card:hover .image-card-overlay {
  opacity: 1;
}

.image-card-title {
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.image-card-creator {
  font-size: 0.75rem;
  opacity: 0.8;
}

.image-card-actions {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: flex;
  gap: 0.5rem;
  opacity: 0;
  transition: var(--transition);
}

.image-card:hover .image-card-actions {
  opacity: 1;
}

.action-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.action-icon:hover {
  transform: scale(1.1);
}

/* ===== Categories Scroll ===== */
.categories-section {
  background: var(--color-bg-alt);
  overflow: hidden;
}

.categories-section h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.categories-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.categories-scroll {
  display: flex;
  gap: 0.75rem;
  width: max-content;
}

.categories-scroll.row-1 {
  animation: scroll-left 35s linear infinite;
}

.categories-scroll.row-2 {
  animation: scroll-right 40s linear infinite;
}

.categories-scroll:hover {
  animation-play-state: paused;
}

@keyframes scroll-left {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

@keyframes scroll-right {
  0% {
    transform: translateX(-50%);
  }
  100% {
    transform: translateX(0);
  }
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1rem;
  background: white;
  border-radius: var(--radius-lg);
  transition: var(--transition);
  text-align: center;
  width: 110px;
  height: 90px;
  flex-shrink: 0;
}

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

.category-icon {
  width: 28px;
  height: 28px;
  margin-bottom: 0.5rem;
  color: var(--color-primary);
}

.category-icon svg {
  width: 100%;
  height: 100%;
}

.category-card span {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
  line-height: 1.2;
}

/* ===== Creators Grid ===== */
.creators-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

.creator-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem;
  background: var(--color-bg-alt);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: var(--transition);
}

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

.creator-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
  border: 3px solid white;
  box-shadow: var(--shadow-sm);
}

.creator-name {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.creator-stats {
  font-size: 0.75rem;
  color: var(--color-text-light);
}

/* ===== CTA Section ===== */
.cta-section {
  text-align: center;
  padding: 4rem 1.5rem;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.cta-section h2 {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

.cta-section p {
  opacity: 0.9;
  margin-bottom: 1.5rem;
}

.cta-section .btn-large {
  background: white;
  color: var(--color-secondary);
}

.cta-section .btn-large:hover {
  background: #f0fdf4;
}

/* ===== Page Content (About, Terms, License) ===== */
.page-content {
  padding: 3rem 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.page-content h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.page-content .last-updated {
  font-size: 0.875rem;
  color: var(--color-text-light);
  margin-bottom: 2rem;
}

.content-section {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--color-border);
}

.content-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.content-section h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-primary);
  display: inline-block;
}

.content-section h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.content-section p {
  margin-bottom: 1rem;
  line-height: 1.8;
  color: var(--color-text);
}

.content-section p:last-child {
  margin-bottom: 0;
}

.content-section ul,
.content-section ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
  line-height: 1.8;
}

.content-section li {
  margin-bottom: 0.5rem;
}

.content-section li ul,
.content-section li ol {
  margin-top: 0.5rem;
  margin-bottom: 0;
}

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

.content-section a:hover {
  color: var(--color-primary-dark);
}

.content-section code {
  background: var(--color-bg-alt);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-family: 'Consolas', 'Monaco', monospace;
  color: var(--color-text);
}

.content-section strong {
  font-weight: 600;
  color: var(--color-text);
}

/* Features List */
.features-list {
  display: grid;
  gap: 1.5rem;
}

.feature-item {
  padding: 1.5rem;
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--color-primary);
}

.feature-item h3 {
  margin-bottom: 0.5rem;
}

.feature-item p {
  margin-bottom: 0;
  font-size: 0.9375rem;
}

/* Info Table */
.info-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.info-table th,
.info-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.info-table th {
  width: 30%;
  font-weight: 600;
  background: var(--color-bg-alt);
  color: var(--color-text);
}

.info-table td {
  color: var(--color-text);
}

/* CTA Buttons in content */
.cta-buttons {
  margin-top: 1.5rem;
}

/* Notice text */
.notice {
  text-align: center;
  font-weight: 500;
  color: var(--color-text-light);
  margin-top: 1rem;
}

/* License specific styles */
.license-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.license-item {
  padding: 1.5rem;
  border-radius: var(--radius-md);
}

.license-item.allowed {
  background: #f0fdf4;
  border: 1px solid #86efac;
}

.license-item.prohibited {
  background: #fef2f2;
  border: 1px solid #fca5a5;
}

.license-item h3 {
  margin-bottom: 1rem;
  font-size: 1rem;
}

.license-item.allowed h3 {
  color: #166534;
}

.license-item.prohibited h3 {
  color: #991b1b;
}

.license-item ul {
  margin-bottom: 0;
  padding-left: 1.25rem;
}

.license-item li {
  font-size: 0.9375rem;
  margin-bottom: 0.375rem;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--color-text);
  color: white;
  padding: 3rem 1.5rem 1rem;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
}

.footer-brand {
  font-size: 1.25rem;
  font-weight: 700;
}

.footer-brand p {
  font-size: 0.875rem;
  font-weight: 400;
  opacity: 0.7;
  margin-top: 0.5rem;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.footer-column h4 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
  opacity: 0.9;
}

.footer-column a {
  display: block;
  font-size: 0.875rem;
  opacity: 0.7;
  margin-bottom: 0.5rem;
  transition: var(--transition);
}

.footer-column a:hover {
  opacity: 1;
}

.footer-bottom {
  max-width: 1400px;
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.75rem;
  opacity: 0.6;
  text-align: center;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .header-container {
    flex-wrap: wrap;
  }

  .main-nav {
    order: 3;
    width: 100%;
    justify-content: center;
    padding-top: 0.75rem;
    border-top: 1px solid var(--color-border);
    margin-top: 0.75rem;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .search-container {
    flex-direction: column;
  }

  .search-btn {
    padding: 0.75rem;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-links {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .header-actions {
    display: none;
  }

  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-links {
    grid-template-columns: 1fr;
  }
}
