/* Computational Art Gallery Styles */

.art-gallery-container {
  margin: 2rem 0;
}

.art-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin: 24px 0;
}

.art-piece {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #f8fafc;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.art-piece:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

[data-md-color-scheme="slate"] .art-piece {
  background: #1e293b;
}

.art-canvas-wrapper {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 75%; /* 4:3 aspect ratio */
}

.computational-art-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.art-piece-info {
  padding: 16px;
  background: white;
  border-top: 1px solid #e2e8f0;
}

[data-md-color-scheme="slate"] .art-piece-info {
  background: #0f172a;
  border-top-color: #334155;
}

.art-piece-title {
  font-weight: 600;
  font-size: 16px;
  margin: 0 0 8px 0;
  color: #1e293b;
}

[data-md-color-scheme="slate"] .art-piece-title {
  color: #e2e8f0;
}

.art-piece-description {
  font-size: 13px;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

[data-md-color-scheme="slate"] .art-piece-description {
  color: #94a3b8;
}

.art-controls {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.art-control-btn {
  padding: 6px 12px;
  font-size: 12px;
  border: 1px solid #e2e8f0;
  background: white;
  color: #64748b;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.art-control-btn:hover {
  background: #f8fafc;
  border-color: #667eea;
  color: #667eea;
}

[data-md-color-scheme="slate"] .art-control-btn {
  background: #334155;
  border-color: #475569;
  color: #94a3b8;
}

[data-md-color-scheme="slate"] .art-control-btn:hover {
  background: #475569;
  border-color: #667eea;
  color: #667eea;
}

/* Hero Art Canvas (for landing page) */
.hero-art-container {
  position: relative;
  width: 100%;
  height: 400px;
  margin: 2rem 0;
  border-radius: 16px;
  overflow: hidden;
  background-image: url('../assets/hero-pattern.svg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-art-canvas {
  width: 100%;
  height: 100%;
}

.hero-art-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
  pointer-events: none;
}

.hero-art-text {
  text-align: center;
  color: #1e293b;
  text-shadow: 0 2px 8px rgba(255, 255, 255, 0.8);
}

[data-md-color-scheme="slate"] .hero-art-text {
  color: #e2e8f0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.hero-art-text h2 {
  font-size: 2rem;
  margin: 0;
  font-weight: 700;
}

.hero-art-text p {
  font-size: 1.1rem;
  margin: 12px 0 0 0;
  opacity: 0.9;
}

/* Fullscreen Modal for Art Pieces */
.art-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.art-modal.active {
  display: flex;
}

.art-modal-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  background: white;
  border-radius: 16px;
  overflow: hidden;
}

[data-md-color-scheme="slate"] .art-modal-content {
  background: #1e293b;
}

.art-modal-canvas {
  width: 100%;
  height: 80vh;
}

.art-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.2s;
}

.art-modal-close:hover {
  background: white;
  transform: scale(1.1);
}

/* Responsive Design */
@media (max-width: 768px) {
  .art-gallery-grid {
    grid-template-columns: 1fr;
  }

  .hero-art-container {
    height: 300px;
  }

  .hero-art-text h2 {
    font-size: 1.5rem;
  }

  .hero-art-text p {
    font-size: 1rem;
  }
}

/* Loading Animation */
.art-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #94a3b8;
}

.art-loading::after {
  content: '';
  width: 40px;
  height: 40px;
  border: 3px solid #e2e8f0;
  border-top-color: #667eea;
  border-radius: 50%;
  animation: art-spin 0.8s linear infinite;
}

@keyframes art-spin {
  to {
    transform: rotate(360deg);
  }
}
