:root {
  --primary-color: #0066cc;
  --secondary-color: #0052a3;
  --background-dark: #1e1e1e;
  --background-light: #2d2d2d;
  --text-color: #fff;
  --border-color: #444;
}

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: var(--background-dark);
  color: var(--text-color);
  min-height: 100vh;
}

.top-nav {
  background: var(--background-light);
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1rem;
  gap: 1rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.nav-links button {
  min-width: auto;
  padding: 10px 16px;
  background: transparent;
  color: var(--text-color);
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.nav-links button:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--primary-color);
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

#container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 20px;
}

h1 {
  color: var(--primary-color);
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 2rem;
}

ul {
  background: var(--background-light);
  padding: 20px 40px;
  border-radius: 8px;
  line-height: 1.6;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

textarea {
  width: 100%;
  padding: 15px;
  margin: 10px 0;
  background: var(--background-light);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 16px;
  resize: vertical;
}

.button-group {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

button {
  padding: 12px 24px;
  margin: 5px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
  min-width: 120px;
  justify-content: center;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

button:active::after {
  animation: ripple 0.6s ease-out;
}

@keyframes ripple {
  0% {
    transform: scale(0, 0);
    opacity: 0.5;
  }
  100% {
    transform: scale(40, 40);
    opacity: 0;
  }
}

button:disabled {
  background: #666;
  cursor: not-allowed;
}

.play-btn {
  background: #28a745;
  font-weight: bold;
  font-size: 1.1rem;
  padding: 14px 28px;
}

.play-btn:hover {
  background: #218838;
}

.publish-btn {
  background: #007bff;
  font-weight: bold;
  font-size: 1.1rem;
  padding: 14px 28px;
}

.publish-btn:hover {
  background: #0056b3;
}

.multiplayer-btn {
  background: #9c27b0;
  font-weight: bold;
}

.multiplayer-btn:hover {
  background: #7b1fa2;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  background: var(--background-light);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.preview-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.preview-actions button {
  min-width: auto;
  white-space: nowrap;
}

.title-input {
  font-size: 1.5rem;
  padding: 1rem;
  background: var(--background-dark);
  border: 2px solid var(--border-color);
  color: var(--text-color);
  border-radius: 8px;
  width: 300px;
  transition: all 0.3s ease;
}

.title-input:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 2px rgba(0,102,204,0.2);
}

.privacy-toggle {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.5rem 1rem;
  background: var(--background-dark);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.privacy-toggle input[type="checkbox"] {
  width: 1.2rem;
  height: 1.2rem;
  cursor: pointer;
}

.privacy-toggle label {
  cursor: pointer;
  user-select: none;
}

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

.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  font-size: 1.2rem;
  color: var(--primary-color);
  animation: pulse 1.5s infinite;
}

.success-message {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #d4edda;
  color: #155724;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  animation: slideIn 0.3s ease-out;
  z-index: 1000;
  font-weight: bold;
  transition: opacity 0.5s ease;
}

.success-message.fade-out {
  opacity: 0;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

#game-container {
  position: relative !important;
  width: 100% !important;
  min-height: 600px !important;
  background: var(--background-light) !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2) !important;
  overflow: hidden !important;
  margin: 2rem 0 !important;
}

#game-container iframe {
  border: none;
  width: 100%;
  height: 100%;
  background: white;
}

.game-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.project-visibility {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #888;
}

#code-preview {
  background: var(--background-light);
  padding: 2rem;
  border-radius: 12px;
  margin: 2rem 0;
  font-family: 'Monaco', 'Consolas', monospace;
  font-size: 14px;
  line-height: 1.6;
  overflow-x: auto;
  border: 1px solid var(--border-color);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

#preview-section, #game-section, #explore-section {
  background: var(--background-dark);
  padding: 2rem;
  border-radius: 12px;
  margin-top: 2rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.fullscreen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 9999 !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  background: black !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.fullscreen iframe {
  width: 100% !important;
  height: 100% !important;
  background: white !important;
  border: none !important;
}

.fullscreen-controls {
  position: fixed !important;
  top: 1rem !important;
  right: 1rem !important;
  z-index: 10000 !important;
  background: rgba(0, 0, 0, 0.5) !important;
  color: white !important;
  border: none !important;
  border-radius: 50% !important;
  width: 44px !important;
  height: 44px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  opacity: 0.7 !important;
  padding: 0 !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
  font-size: 18px !important;
}

.fullscreen-controls:hover,
.fullscreen-controls:active {
  opacity: 1 !important;
  background: rgba(0, 0, 0, 0.8) !important;
  transform: scale(1.1) !important;
}

.fullscreen .fullscreen-controls {
  display: flex !important;
}

#game-container:not(.fullscreen) .fullscreen-controls {
  position: absolute !important;
  bottom: 1rem !important;
  top: auto !important;
}

#game-container:not(:hover) .fullscreen-controls {
  opacity: 0.3;
}

#game-container:hover .fullscreen-controls {
  opacity: 0.7;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal-content {
  background: var(--background-light);
  padding: 2rem;
  border-radius: 12px;
  width: 90%;
  max-width: 1000px;
  margin: 4vh auto;
  position: relative;
  animation: modalSlideIn 0.3s ease-out;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  border: 1px solid var(--border-color);
}

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

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1rem;
}

#projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  padding: 2rem 0;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--background-light);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

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

.project-card h3 {
  margin: 0;
  color: var(--primary-color);
  font-size: 1.4rem;
}

.project-instructions {
  background: rgba(0,0,0,0.05);
  padding: 0.8rem;
  border-radius: 6px;
  font-size: 0.9rem;
  border-left: 3px solid var(--primary-color);
  margin: 0.5rem 0;
}

.project-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
}

.project-actions button {
  flex: 1;
  font-size: 0.9rem;
  padding: 10px 15px;
  min-width: auto;
}

.remix-project {
  background: #9c27b0;
}

.remix-project:hover {
  background: #7b1fa2;
}

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

.project-meta {
  display: flex;
  gap: 0.8rem;
  font-size: 0.9rem;
}

.project-version {
  background: var(--primary-color);
  color: white;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: bold;
}

.project-type {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(0,102,204,0.1);
  color: var(--primary-color);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: bold;
}

.projects-stats {
  display: flex;
  justify-content: space-around;
  padding: 1.5rem;
  background: var(--background-light);
  border-radius: 8px;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.stat {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 1.2rem;
  color: var(--primary-color);
}

.projects-sort {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.sort-btn {
  background: var(--background-light);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  padding: 0.8rem 1.2rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.project-actions {
  display: flex;
  gap: 1rem;
  margin-top: auto;
}

.play-project {
  flex: 1;
}

.like-project {
  background: transparent;
  color: #ff4757;
  border: 1px solid currentColor;
  min-width: auto;
  padding: 0.8rem;
}

.like-project.liked {
  background: #ff4757;
  color: white;
  border-color: #ff4757;
}

.visibility-public,
.visibility-private {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  padding: 0.5rem 0.8rem;
  border-radius: 4px;
}

.visibility-public {
  background: rgba(40, 167, 69, 0.1);
  color: #28a745;
}

.visibility-private {
  background: rgba(255, 71, 87, 0.1);
  color: #ff4757;
}

.no-projects,
.error {
  text-align: center;
  padding: 3rem;
  font-size: 1.2rem;
  color: #888;
}

.no-projects i,
.error i {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.error i {
  color: #ff4757;
}

.light-mode {
  --background-dark: #f0f0f0;
  --background-light: #ffffff;
  --text-color: #333;
  --border-color: #ddd;
}

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

.settings-modal {
  background: var(--background-dark);
  border: 1px solid var(--border-color);
  max-width: 500px;
  margin: 10vh auto;
}

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

.settings-header button {
  background: transparent;
  padding: 8px;
  color: var(--text-color);
}

.settings-header button:hover {
  background: rgba(255,255,255,0.1);
  transform: none;
}

.settings-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  background: var(--background-light);
  transition: all 0.2s ease;
  margin: 1.5rem 0;
}

.settings-option:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

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

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--primary-color);
}

input:checked + .slider:before {
  transform: translateX(26px);
}

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

.fa-spinner {
  animation: loading 1s linear infinite;
}

#ai-templates-section {
  padding: 1.5rem;
  background: var(--background-dark);
  border-radius: 8px;
  margin-top: 1rem;
  border: 1px solid var(--border-color);
  display: none;
}

#ai-templates-section h4 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

#ai-behavior-template {
  width: 100%;
  padding: 1rem;
  background: var(--background-light);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 1rem;
  font-family: inherit;
}

.template-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1rem;
}

.template-preset {
  background: var(--background-light);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: auto;
}

.template-preset:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.model-dropdown {
  padding: 0.8rem 1rem;
  background: var(--background-light);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 1rem;
  width: 200px;
}

.rooms-list {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.room-card {
  background: var(--background-light);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  margin-bottom: 1rem;
}

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

.room-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.room-title {
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--primary-color);
  margin: 0;
}

.room-type {
  background: rgba(0,102,204,0.1);
  color: var(--primary-color);
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.room-info {
  margin: 1rem 0;
  color: #888;
  font-size: 0.9rem;
}

.room-players {
  background: rgba(40, 167, 69, 0.1);
  color: #28a745;
  padding: 0.5rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.room-actions {
  margin-top: auto;
  display: flex;
  gap: 0.8rem;
}

.join-room-btn {
  background: #28a745;
  color: white;
  font-weight: bold;
  padding: 12px 20px;
  cursor: pointer;
  border: none;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
  width: 100%;
  margin-top: auto;
}

.join-room-btn:hover {
  background: #218838;
  transform: translateY(-2px);
}

.multiplayer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  background: var(--background-light);
  padding: 1.5rem;
  border-radius: 8px;
  flex-wrap: wrap;
  gap: 1rem;
}

.multiplayer-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.game-players-list {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0,0,0,0.7);
  padding: 10px;
  border-radius: 8px;
  z-index: 100;
  color: white;
  max-width: 200px;
}

.player-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
  font-size: 14px;
}

.player-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.template-section {
  background: var(--background-light);
  padding: 1.5rem;
  border-radius: 10px;
  margin: 2rem 0;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.template-card {
  background: var(--background-dark);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

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

.template-card h3 {
  color: var(--primary-color);
  margin-top: 0;
  margin-bottom: 1rem;
}

.template-card p {
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.template-btn {
  background: var(--primary-color);
  color: white;
  font-weight: bold;
  width: 100%;
}

.template-btn:hover {
  background: var(--secondary-color);
}

.generate-btn {
  background: #4CAF50;
  color: white;
  font-weight: bold;
  font-size: 1.1rem;
  padding: 14px 28px;
  min-width: 200px;
}

.generate-btn:hover {
  background: #3e8e41;
}

.error-message {
  background: #f8d7da;
  color: #721c24;
  padding: 1rem;
  border-radius: 8px;
  margin: 1rem 0;
  border: 1px solid #f5c6cb;
}

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

.loading-spinner {
  display: inline-block;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top: 4px solid var(--primary-color);
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
  margin-right: 8px;
}

@media (max-width: 768px) {
  .preview-header {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  
  .preview-actions {
    justify-content: space-between;
    flex-wrap: wrap;
  }
  
  .title-input {
    width: 100%;
  }
  
  button {
    padding: 12px 16px;
    min-width: auto;
  }
  
  .nav-content {
    position: relative;
  }
  
  .mobile-menu-btn {
    display: block;
    background: transparent;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
  }
  
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--background-light);
    flex-direction: column;
    width: 200px;
    z-index: 100;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    border-radius: 0 0 8px 8px;
    padding: 1rem;
  }
  
  .nav-links.show-mobile {
    display: flex;
  }
  
  .nav-links button {
    width: 100%;
    text-align: left;
    padding: 12px;
  }
  
  .fullscreen-controls {
    width: 48px;
    height: 48px;
    opacity: 0.8 !important;
  }
  
  .fullscreen iframe {
    width: 100% !important;
    height: 100% !important;
  }
  
  .multiplayer-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .multiplayer-actions {
    width: 100%;
    justify-content: space-between;
  }
}

.versions-panel {
  background: var(--background-light);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-top: 1rem;
  overflow: hidden;
}

.versions-header {
  padding: 1rem;
  background: var(--primary-color);
  color: white;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.versions-list {
  max-height: 300px;
  overflow-y: auto;
  padding: 0.5rem;
}

.version-item {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.2s ease;
}

.version-item:last-child {
  border-bottom: none;
}

.version-item:hover {
  background: rgba(0,102,204,0.1);
}

.version-item.active {
  background: rgba(0,102,204,0.2);
  border-left: 3px solid var(--primary-color);
}

.version-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.3rem;
}

.version-number {
  font-weight: bold;
  color: var(--primary-color);
}

.version-date {
  font-size: 0.8rem;
  color: #888;
}

.version-desc {
  font-size: 0.9rem;
}

.version-pin-btn {
  background: var(--background-light);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  padding: 0.5rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
}

.version-pin-btn:hover {
  background: rgba(0,102,204,0.1);
}

.comments-section {
  margin-top: 2rem;
  background: var(--background-light);
  border-radius: 8px;
  padding: 1.5rem;
  border: 1px solid var(--border-color);
}

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

.comments-input {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.comments-input textarea {
  flex: 1;
  min-height: 80px;
  border-radius: 8px;
  padding: 1rem;
  border: 1px solid var(--border-color);
  background: var(--background-dark);
  color: var(--text-color);
  resize: vertical;
}

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

.comment {
  background: var(--background-dark);
  border-radius: 8px;
  padding: 1.5rem;
  position: relative;
}

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

.comment-author {
  font-weight: bold;
  color: var(--primary-color);
}

.comment-date {
  font-size: 0.8rem;
  color: #888;
}

.comment-content {
  line-height: 1.6;
}

.comment-actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.5rem;
}

.comment-actions button,
.comment-owner-actions button {
  background: transparent;
  color: var(--text-color);
  border: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  min-width: auto;
}

.comment-actions button:hover,
.comment-owner-actions button:hover {
  background: rgba(0,102,204,0.1);
}

.comment-owner-actions {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  gap: 0.5rem;
}

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

.comment-reply {
  padding: 1rem;
  background: rgba(0,0,0,0.1);
  border-radius: 6px;
  margin-bottom: 0.8rem;
}

.reply-form {
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(0,0,0,0.1);
  border-radius: 6px;
}

.reply-form textarea {
  width: 100%;
  min-height: 60px;
  border-radius: 6px;
  padding: 0.8rem;
  background: var(--background-dark);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  resize: vertical;
}

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

.no-comments {
  padding: 2rem;
  text-align: center;
  color: #888;
}

.ai-modal-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.ai-prompt-container {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.ai-prompt-container label {
  font-weight: bold;
}

.ai-prompt-container textarea {
  min-height: 120px;
  padding: 1rem;
  border-radius: 8px;
  background: var(--background-dark);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  font-size: 1rem;
  line-height: 1.5;
}

.ai-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 0.5rem;
}

.ai-suggestion {
  background: rgba(0,102,204,0.1);
  color: var(--primary-color);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.ai-suggestion:hover {
  background: rgba(0,102,204,0.2);
  border-color: var(--primary-color);
}

.feedback-section {
  background: var(--background-dark);
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.feedback-section h4 {
  color: var(--primary-color);
  margin-top: 0;
  margin-bottom: 1rem;
}

.feedback-section ul {
  box-shadow: none;
  margin: 0;
  padding-left: 1.5rem;
}

.feedback-section li {
  margin-bottom: 0.8rem;
}

@media (max-width: 480px) {
  .project-card {
    padding: 1rem;
  }
  
  .project-actions {
    flex-wrap: wrap;
  }
  
  .project-actions button {
    padding: 8px 12px;
    font-size: 0.8rem;
  }
  
  .comments-input {
    flex-direction: column;
  }
  
  .fullscreen-controls {
    width: 40px !important;
    height: 40px !important;
  }
}