/* Enhanced Growing World CSS */
:root {
  --primary-color: #4CAF50;
  --secondary-color: #45a049;
  --background-color: #1a1a1a;
  --panel-color: #2d2d2d;
  --text-color: #ffffff;
  --border-color: #555555;
  --success-color: #4CAF50;
  --warning-color: #ff9800;
  --error-color: #f44336;
  --info-color: #2196F3;
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: var(--text-color);
  overflow: hidden;
  height: 100vh;
}

#container {
  display: flex;
  width: 100vw;
  height: 100vh;
  background: var(--background-color);
}

/* Game Area */
#game-container {
  flex: 3;
  display: flex;
  flex-direction: column;
  background: linear-gradient(45deg, #1e3c72, #2a5298);
  position: relative;
  overflow: hidden;
}

#gameCanvas {
  flex: 1;
  display: block;
  background: linear-gradient(to bottom, #87CEEB 0%, #7ec850 30%, #7ec850 100%);
  cursor: crosshair;
  border: 2px solid var(--border-color);
}

#status-bar {
  background: var(--panel-color);
  color: var(--text-color);
  padding: 8px 15px;
  font-size: 14px;
  border-top: 2px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.status {
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: bold;
}

.status.connected {
  background-color: var(--success-color);
  color: white;
}

.status.disconnected {
  background-color: var(--error-color);
  color: white;
}

.status.error {
  background-color: var(--warning-color);
  color: white;
}

/* Enhanced Sidebar */
#sidebar {
  flex: 1;
  padding-bottom: 30px; 
  background: var(--panel-color);
  border-left: 3px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 15px;
  overflow-y: auto;
  min-width: 300px;
  max-width: 400px;
}

#sidebar h2 {
  margin: 0 0 20px 0;
  text-align: center;
  font-size: 24px;
  color: var(--primary-color);
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* Player List */
#player-list {
  flex: 1;
  margin-bottom: 20px;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  padding: 10px;
  border: 1px solid var(--border-color);
}

#player-list h3 {
  margin: 0 0 10px 0;
  font-size: 16px;
  color: var(--info-color);
  border-bottom: 2px solid var(--info-color);
  padding-bottom: 5px;
}

#player-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#player-list li {
  padding: 8px 12px;
  margin: 2px 0;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  font-size: 14px;
  border-left: 3px solid var(--primary-color);
  transition: background-color 0.2s;
}

#player-list li:hover {
  background: rgba(255,255,255,0.2);
}



#chat h3 {
    margin: 0;
    padding: 8px 15px;
    background: var(--primary-color);
    color: white;
    font-size: 14px;
}

#messages {
    flex: 1;
    padding: 8px;
    overflow-y: auto;
    font-size: 12px;
    line-height: 1.3;
    background: transparent;
    min-height: 0;  /* This is important for flex to work properly */
}

#chat-input {
    display: flex;
    padding: 8px;
    background: rgba(0,0,0,0.2);
    border-top: 1px solid var(--border-color);
}

#chat-input input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px 0 0 4px;
    font-size: 12px;
    background: var(--background-color);
    color: var(--text-color);
}

#chat-input button {
    padding: 6px 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 12px;
}

.hint {
    font-size: 10px;
    color: #888;
    padding: 4px 8px;
    background: rgba(0,0,0,0.1);
}


.resource-bar {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 20px;
  background: rgba(0, 0, 0, 0.8);
  padding: 10px 20px;
  border-radius: 25px;
  z-index: 100;
}

.resource-item {
  display: flex;
  align-items: center;
  gap: 5px;
  color: white;
  font-weight: bold;
}

.resource-icon {
  font-size: 20px;
}

.build-menu {
  position: fixed;
  right: 20px;
  top: 100px;
  width: 400px;
  background: rgba(0, 0, 0, 0.95);
  border-radius: 10px;
  padding: 20px;
  z-index: 1000;
}

.build-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 20px 0;
}

.building-card {
  background: rgba(76, 175, 80, 0.2);
  border: 2px solid #4CAF50;
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
}

.building-card:hover {
  background: rgba(76, 175, 80, 0.4);
  transform: scale(1.05);
}

.building-card.locked {
  opacity: 0.5;
  border-color: #666;
  cursor: not-allowed;
}

.trade-panel {
  position: fixed;
  left: 20px;
  top: 100px;
  width: 300px;
  background: rgba(0, 0, 0, 0.95);
  border-radius: 10px;
  padding: 20px;
  z-index: 1000;
}

.trade-item {
  background: rgba(255, 193, 7, 0.2);
  border: 2px solid #FFC107;
  border-radius: 8px;
  padding: 15px;
  margin: 10px 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.trade-btn {
  background: #FFC107;
  color: black;
  border: none;
  padding: 5px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
}



/* Game UI Panels */
.game-panel {
  position: absolute;
  background: rgba(45, 45, 45, 0.95);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 15px;
  color: var(--text-color);
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  backdrop-filter: blur(10px);
}

/* Inventory UI */
#inventory {
  margin-bottom: 20px;
}

#inventory h3 {
  color: var(--primary-color);
  margin-bottom: 10px;
  font-size: 16px;
}

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.inventory-item {
  background: rgba(255,255,255,0.1);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 8px;
  text-align: center;
  transition: all 0.2s;
}

.inventory-item:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-2px);
}

.item-icon {
  width: 30px;
  height: 30px;
  border-radius: 4px;
  margin: 0 auto 4px;
}

.item-name {
  font-size: 10px;
  color: #ccc;
  margin-bottom: 2px;
}

.item-quantity {
  font-size: 12px;
  font-weight: bold;
  color: var(--primary-color);
}

/* Quest UI */
#quest {
  margin-bottom: 20px;
}

#quest h3 {
  color: #ffdd44;
  margin-bottom: 10px;
  font-size: 16px;
}

.quest-content {
  background: rgba(255,255,255,0.05);
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 10px;
}

.quest-content h4 {
  color: #ffdd44;
  margin-bottom: 5px;
  font-size: 14px;
}

.quest-content p {
  font-size: 12px;
  line-height: 1.4;
  color: #ddd;
}

.quest-difficulty {
  font-size: 11px;
  color: #888;
  margin-top: 5px;
}

.quest-progress {
  margin-top: 5px;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(0,0,0,0.3);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 5px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ffdd44, #ffa500);
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 11px;
  text-align: center;
  color: #ccc;
}

/* Weather UI */
#weather {
  margin-bottom: 20px;
}

#weather h3 {
  color: #87CEEB;
  margin-bottom: 10px;
  font-size: 16px;
}

.weather-info, .season-info {
  background: rgba(255,255,255,0.05);
  padding: 8px;
  border-radius: 6px;
  margin-bottom: 5px;
}

.weather-current, .season-current {
  font-size: 14px;
  font-weight: bold;
  color: #87CEEB;
  text-transform: capitalize;
}

.weather-temp, .season-day {
  font-size: 12px;
  color: #ccc;
}

.weather-humidity {
  font-size: 11px;
  color: #888;
}

/* Market UI */
#market {
  margin-bottom: 20px;
}

#market h3 {
  color: #FFD700;
  margin-bottom: 10px;
  font-size: 16px;
}

.market-prices {
  max-height: 150px;
  overflow-y: auto;
  background: rgba(255,255,255,0.05);
  border-radius: 6px;
  padding: 8px;
}

.market-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

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

.item-name {
  font-size: 12px;
  color: #ddd;
  text-transform: capitalize;
}

.item-price {
  font-size: 12px;
  color: #FFD700;
  font-weight: bold;
}

.market-actions {
  margin-top: 10px;
}

.market-actions button {
  width: 100%;
  padding: 8px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: background-color 0.2s;
}

.market-actions button:hover {
  background: var(--secondary-color);
}

/* Minimap */
#minimap {
  position: absolute;
  top: 200px;
  right: 15px;
  background: rgba(0,0,0,0.7);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 5px;
}

#minimap-canvas {
  border-radius: 4px;
}

/* Tooltips */
.tooltip {
  position: absolute;
  background: rgba(0,0,0,0.9);
  color: white;
  padding: 5px 8px;
  border-radius: 4px;
  font-size: 12px;
  pointer-events: none;
  z-index: 1000;
  white-space: nowrap;
}

/* Notifications */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--primary-color);
  color: white;
  padding: 10px 15px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 1001;
  animation: slideIn 0.3s ease;
}

.notification.error {
  background: var(--error-color);
}

.notification.warning {
  background: var(--warning-color);
}

.notification.info {
  background: var(--info-color);
}

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

/* Context Menu */
.context-menu {
  position: absolute;
  background: var(--panel-color);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  z-index: 1000;
  min-width: 120px;
}

.context-menu-item {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

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

.context-menu-item:hover {
  background: rgba(255,255,255,0.1);
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-color);
}

/* Loading Screen */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--background-color);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(76, 175, 80, 0.3);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

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

.loading-text {
  color: var(--text-color);
  font-size: 18px;
  margin-bottom: 10px;
}

.loading-progress {
  width: 300px;
  height: 8px;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  overflow: hidden;
}

.loading-progress-bar {
  height: 100%;
  background: var(--primary-color);
  transition: width 0.3s ease;
}

/* Modal Dialogs */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1002;
}

.modal-content {
  background: var(--panel-color);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
  max-width: 500px;
  max-height: 600px;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.modal-title {
  font-size: 18px;
  color: var(--primary-color);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 20px;
  cursor: pointer;
  padding: 5px;
}

.modal-close:hover {
  color: var(--error-color);
}

/* Responsive Design */
@media (max-width: 1200px) {
  #sidebar {
    min-width: 250px;
    max-width: 300px;
  }
}

@media (max-width: 768px) {
  #container {
    flex-direction: column;
  }

  #game-container {
    flex: 2;
  }

  #sidebar {
    flex: 1;
    max-width: none;
    min-width: none;
    max-height: 300px;
    border-left: none;
    border-top: 3px solid var(--border-color);
  }

  .inventory-grid {
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
  }
}

@media (max-width: 480px) {
  #sidebar {
    padding: 10px;
  }

  #sidebar h2 {
    font-size: 20px;
  }

  .inventory-item {
    padding: 5px;
  }

  .item-icon {
    width: 25px;
    height: 25px;
  }
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.fade-in {
  animation: fadeIn 0.3s ease;
}

.slide-up {
  animation: slideUp 0.3s ease;
}

.pulse {
  animation: pulse 2s infinite;
}

/* Game-specific UI elements */
.floating-text {
  position: absolute;
  pointer-events: none;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
  z-index: 100;
}

.particle {
  position: absolute;
  pointer-events: none;
  z-index: 99;
}

.health-bar {
  background: rgba(0,0,0,0.5);
  border-radius: 2px;
  overflow: hidden;
}

.health-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff0000, #00ff00);
  transition: width 0.3s ease;
}

/* Debug Panel */
.debug-panel {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(0,0,0,0.8);
  color: #00ff00;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  padding: 10px;
  border-radius: 4px;
  border: 1px solid #333;
}

/* Help Panel */
.help-panel {
  max-width: 600px;
  background: var(--panel-color);
  padding: 20px;
  border-radius: 8px;
}

.help-section {
  margin-bottom: 15px;
}

.help-section h4 {
  color: var(--primary-color);
  margin-bottom: 8px;
  font-size: 14px;
}

.help-section p, .help-section ul {
  font-size: 12px;
  line-height: 1.4;
  color: #ddd;
}

.help-section ul {
  padding-left: 15px;
}

.help-section li {
  margin-bottom: 3px;
}

/* Settings Panel */
.settings-panel {
  width: 400px;
}

.setting-group {
  margin-bottom: 15px;
}

.setting-label {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
  color: var(--text-color);
}

.setting-input {
  width: 100%;
  padding: 6px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: var(--background-color);
  color: var(--text-color);
  font-size: 12px;
}

.setting-checkbox {
  margin-right: 8px;
}

.setting-range {
  width: 100%;
}

/* Button Styles */
.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  transition: all 0.2s;
}

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

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

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

.btn-secondary:hover {
  background: #777;
}

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

.btn-danger:hover {
  background: #d32f2f;
}

.btn:active {
  transform: translateY(1px);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-10 { margin-bottom: 10px; }
.mb-15 { margin-bottom: 15px; }
.mb-20 { margin-bottom: 20px; }

.p-10 { padding: 10px; }
.p-15 { padding: 15px; }
.p-20 { padding: 20px; }

.hidden { display: none !important; }
.visible { display: block !important; }

.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }

.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }

.user-select-none { 
  -webkit-user-select: none; 
  -moz-user-select: none; 
  -ms-user-select: none; 
  user-select: none; 
}

/* Missing animation for mobile touch feedback */
@keyframes touchFeedback {
  0% { 
    transform: translate(-50%, -50%) scale(1); 
    opacity: 0.8; 
  }
  50% { 
    transform: translate(-50%, -50%) scale(1.2); 
    opacity: 1; 
  }
  100% { 
    transform: translate(-50%, -50%) scale(1.5); 
    opacity: 0; 
  }
}

/* =================== MOBILE ENHANCEMENTS =================== */

/* Mobile Detection and Base Styles */
.mobile-device {
  touch-action: manipulation;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Mobile Layout Improvements */
@media (max-width: 768px) {
  body {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100vh;
  }

  #container {
    flex-direction: column;
    height: 100vh;
  }

  #game-container {
    flex: 1;
    position: relative;
    min-height: 60vh;
  }

  #sidebar {
    flex: none;
    height: 40vh;
    max-height: 40vh;
    border-left: none;
    border-top: 3px solid var(--border-color);
    overflow-y: auto;
    padding: 10px;
  }

  /* Mobile Status Bar */
  #status-bar {
    padding: 5px 10px;
    font-size: 12px;
    flex-wrap: wrap;
  }

  .status-right {
    display: none; /* Hide debug info on mobile */
  }
}

/* Mobile Touch Controls */
.mobile-controls {
  position: absolute;
  bottom: 20px;
  left: 20px;
  z-index: 1000;
  display: none;
}

.mobile-joystick {
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.3);
  border: 3px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  position: relative;
  touch-action: none;
}

.mobile-joystick-knob {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.1s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Mobile Action Buttons */
.mobile-action-buttons {
  position: absolute;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  display: none;
  flex-direction: column;
  gap: 10px;
}

.mobile-action-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary-color);
  color: white;
  border: none;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  touch-action: manipulation;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.mobile-action-btn:active {
  transform: scale(0.95);
  background: var(--secondary-color);
}

.mobile-action-btn.secondary {
  background: var(--border-color);
}

/* Mobile Chat Enhancements */
@media (max-width: 768px) {
  #chat {
    max-height: 250px;    /* INCREASED FROM 150px */
  }

  #messages {
    font-size: 11px;
    line-height: 1.2;
  }

  #chat-input input {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 10px;
  }

  #chat-input button {
    padding: 10px 12px;
    font-size: 12px;
  }
}

/* Mobile Inventory */
@media (max-width: 768px) {
  .inventory-grid {
    grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
    gap: 5px;
  }

  .inventory-item {
    padding: 5px;
    min-height: 50px;
  }

  .item-icon {
    width: 25px;
    height: 25px;
  }

  .item-name {
    font-size: 9px;
  }

  .item-quantity {
    font-size: 10px;
  }
}

/* Mobile Quest Panel */
@media (max-width: 768px) {
  #quest {
    margin-bottom: 10px;
  }

  .quest-content {
    padding: 8px;
  }

  .quest-content h4 {
    font-size: 12px;
  }

  .quest-content p {
    font-size: 10px;
  }
}

/* Touch-Friendly Buttons */
@media (max-width: 768px) {
  .btn {
    min-height: 44px; /* iOS touch target recommendation */
    padding: 12px 16px;
    font-size: 14px;
  }

  .market-actions button{
    min-height: 44px;
  }
}

/* Mobile Modal Improvements */
@media (max-width: 768px) {
  .modal-content {
    margin: 20px;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 40px);
  }

  .help-section ul {
    padding-left: 10px;
  }

  .help-section li {
    font-size: 11px;
  }
}

/* Mobile Minimap */
@media (max-width: 768px) {
  #minimap {
    top: 10px;
    right: 10px;
    transform: scale(0.8);
  }

  #minimap-canvas {
    width: 100px;
    height: 100px;
  }
}

/* Mobile HUD Adjustments */
@media (max-width: 768px) {
  .drawInventoryHUD {
    font-size: 10px;
  }

  .drawXPBar {
    height: 15px;
  }
}

/* Landscape vs Portrait Optimizations */
@media (max-width: 768px) and (orientation: landscape) {
  #container {
    flex-direction: row;
  }

  #game-container {
    flex: 2;
  }

  #sidebar {
    flex: 1;
    height: 100vh;
    max-height: 100vh;
    max-width: 300px;
    border-top: none;
    border-left: 3px solid var(--border-color);
  }
}

/* Show mobile controls on mobile devices */
@media (max-width: 768px) {
  .mobile-controls,
  .mobile-action-buttons {
    display: flex;
  }

  /* Better scaling for different screen sizes */
  .mobile-joystick {
    width: min(15vw, 100px);
    height: min(15vw, 100px);
  }

  .mobile-action-btn {
    width: min(12vw, 60px);
    height: min(12vw, 60px);
    font-size: min(4vw, 20px);
  }

  /* Prevent UI overlap on small screens */
  #sidebar {
    max-height: 35vh;
  }
}

@media (max-height: 600px) {
  .mobile-controls {
    bottom: 10px;
  }

  .mobile-action-buttons {
    bottom: 10px;
  }

  #sidebar {
    max-height: 30vh;
  }
}

/* Prevent zoom on double tap */
* {
  touch-action: manipulation;
}

/* Mobile scrollbar styling */
@media (max-width: 768px) {
  ::-webkit-scrollbar {
    width: 4px;
  }

  ::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 2px;
  }
}

/* =================== LAND MANAGEMENT & NEW UI =================== */

/* Player Info Panel */
#player-info {
  margin-bottom: 20px;
}

#player-info h3 {
  color: #4ECDC4;
  margin-bottom: 10px;
  font-size: 16px;
}

#player-details {
  background: rgba(255,255,255,0.05);
  padding: 10px;
  border-radius: 6px;
}

.player-stat {
  font-size: 12px;
  color: #ddd;
  margin-bottom: 3px;
}

/* Land Management Panel */
#land-management {
  margin-bottom: 20px;
}

#land-management h3 {
  color: #FFD700;
  margin-bottom: 10px;
  font-size: 16px;
}

#land-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

#land-options .btn {
  flex: 1;
  min-width: 100px;
  padding: 8px 12px;
  font-size: 12px;
}

/* Money Display */
#money {
  color: #FFD700;
  font-weight: bold;
  margin-left: 15px;
}

/* Land Purchase Modal */
.land-options {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.land-option {
  background: rgba(255,255,255,0.05);
  padding: 15px;
  border-radius: 8px;
  border: 2px solid transparent;
  transition: border-color 0.2s;
}

.land-option:hover {
  border-color: #4CAF50;
}

.land-option h4 {
  color: #4CAF50;
  margin: 0 0 10px 0;
  font-size: 16px;
}

.land-option p {
  margin: 0 0 15px 0;
  color: #ccc;
  font-size: 14px;
}

.terrain-selection {
  margin-bottom: 15px;
}

.terrain-selection label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #fff;
}

.terrain-selection select {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: var(--background-color);
  color: var(--text-color);
  font-size: 14px;
}

.land-instructions {
  margin-top: 20px;
  padding: 15px;
  background: rgba(255,255,255,0.05);
  border-radius: 6px;
  border-left: 4px solid #4CAF50;
}

.land-instructions p {
  margin: 0 0 10px 0;
  font-weight: bold;
  color: #4CAF50;
}

.land-instructions ul {
  margin: 0;
  padding-left: 20px;
  color: #ccc;
}

.land-instructions li {
  margin-bottom: 5px;
  font-size: 13px;
}

/* Building Modal */
.building-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
  margin-bottom: 20px;
}

.building-option {
  background: rgba(255,255,255,0.05);
  padding: 15px;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.building-option:hover {
  border-color: #4CAF50;
  background: rgba(255,255,255,0.1);
}

.building-option.selected {
  border-color: #4CAF50;
  background: rgba(76, 175, 80, 0.2);
}

.building-option h4 {
  color: #4CAF50;
  margin: 0 0 8px 0;
  font-size: 16px;
}

.building-option p {
  margin: 0 0 5px 0;
  color: #ccc;
  font-size: 13px;
}

.building-instructions {
  padding: 15px;
  background: rgba(255,255,255,0.05);
  border-radius: 6px;
  border-left: 4px solid #FFD700;
}

.building-instructions p {
  margin: 0 0 10px 0;
  font-weight: bold;
  color: #FFD700;
}

.building-instructions ul {
  margin: 0;
  padding-left: 20px;
  color: #ccc;
}

.building-instructions li {
  margin-bottom: 5px;
  font-size: 13px;
}

/* Enhanced Status Bar */
#status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 15px;
  background: var(--panel-color);
  border-top: 2px solid var(--border-color);
  font-size: 14px;
  flex-wrap: wrap;
  gap: 10px;
}

.status-left {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.status-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-right .btn {
  padding: 4px 8px;
  font-size: 12px;
  min-height: auto;
}

/* Enhanced Notifications */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--primary-color);
  color: white;
  padding: 12px 18px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 1001;
  animation: slideIn 0.3s ease;
  max-width: 300px;
  word-wrap: break-word;
}

.notification.error {
  background: var(--error-color);
}

.notification.warning {
  background: var(--warning-color);
}

.notification.info {
  background: var(--info-color);
}

.notification.success {
  background: var(--success-color);
}

/* Mobile Responsive Updates */
@media (max-width: 768px) {
  #land-options {
    flex-direction: column;
  }

  .land-options {
    gap: 15px;
  }

  .building-options {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .status-left {
    gap: 10px;
  }

  #status-bar {
    padding: 5px 10px;
    font-size: 12px;
  }

  .notification {
    top: 10px;
    right: 10px;
    max-width: calc(100vw - 20px);
    font-size: 14px;
  }
}

/* Logout Button Styling */
.status-right .btn-secondary {
  background: #666;
  color: white;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

.status-right .btn-secondary:hover {
  background: #777;
}


/* Tutorial System */
.tutorial-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--panel-color);
  border: 3px solid var(--primary-color);
  border-radius: 12px;
  padding: 0;
  z-index: 2000;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.tutorial-content {
  padding: 20px;
}

.tutorial-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-color);
}

.tutorial-header h3 {
  margin: 0;
  color: var(--primary-color);
  font-size: 18px;
}

.tutorial-close {
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tutorial-message {
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 20px;
  color: var(--text-color);
}

.tutorial-progress {
  background: rgba(255,255,255,0.1);
  height: 8px;
  border-radius: 4px;
  margin-bottom: 20px;
  overflow: hidden;
}

.tutorial-progress-bar {
  background: var(--primary-color);
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
  width: 0%;
}

.tutorial-controls {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.tutorial-controls .btn {
  flex: 1;
  padding: 10px;
  font-size: 14px;
}

.tutorial-highlight {
  box-shadow: 0 0 20px var(--primary-color) !important;
  border: 3px solid var(--primary-color) !important;
  animation: pulse 2s infinite;
}


/* Beginner Helper Panel */
.beginner-helper {
  margin-bottom: 20px;
  background: rgba(76, 175, 80, 0.1);
  border: 2px solid var(--primary-color);
  border-radius: 8px;
  padding: 15px;
}

.beginner-helper h3 {
  color: var(--primary-color);
  margin-bottom: 10px;
  font-size: 16px;
}

.helper-content {
  font-size: 12px;
}

.helper-step {
  margin-bottom: 8px;
  color: #ddd;
  line-height: 1.4;
}

.helper-step strong {
  color: var(--primary-color);
}

.helper-buttons {
  margin-top: 15px;
  display: flex;
  gap: 8px;
}

.btn-small {
  padding: 6px 12px;
  font-size: 11px;
  flex: 1;
}

/* Hide helper panel for experienced players */
.hide-beginner-helper .beginner-helper {
  display: none;
}


/* Progress Indicators */
.progress-indicator {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(76, 175, 80, 0.9);
  color: white;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 14px;
  z-index: 1500;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    transform: translateX(-50%) translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

.achievement-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #000;
  padding: 20px 30px;
  border-radius: 15px;
  font-size: 18px;
  font-weight: bold;
  z-index: 2500;
  text-align: center;
  box-shadow: 0 8px 32px rgba(255, 215, 0, 0.5);
  animation: achievementPop 3s ease;
}

@keyframes achievementPop {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
  20% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
  80% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(0.9); opacity: 0; }
}

/* Quick Commands */
.quick-commands {
  display: flex;
  gap: 5px;
  padding: 5px 8px;
  background: rgba(0,0,0,0.2);
  border-bottom: 1px solid var(--border-color);
}

.quick-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 4px 8px;
  font-size: 10px;
  cursor: pointer;
  flex: 1;
  min-width: 0;
}

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

.hide-beginner-helper .quick-commands {
  display: none;
}


/* Hide complex features for new players */
.hide-advanced .land-management,
.hide-advanced .market-actions,
.hide-advanced #weather {
  opacity: 0.3;
  pointer-events: none;
}

/* Action Panel System */
.action-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--panel-color);
  border: 3px solid var(--primary-color);
  border-radius: 12px;
  padding: 0;
  z-index: 2000;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: var(--primary-color);
  color: white;
  border-radius: 8px 8px 0 0;
}

.panel-close {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
}

.action-mode {
  padding: 20px;
}

.crop-selection, .building-selection {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.crop-option, .building-option {
  background: rgba(255,255,255,0.05);
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 15px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.crop-option:hover, .building-option:hover {
  border-color: var(--primary-color);
  background: rgba(76, 175, 80, 0.1);
}

.crop-option.selected, .building-option.selected {
  border-color: var(--primary-color);
  background: rgba(76, 175, 80, 0.2);
}

.crop-option.no-seeds {
  opacity: 0.3;
  cursor: not-allowed;
}

.crop-icon, .building-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 8px;
  border-radius: 4px;
}

.berry-icon { background: #ff1493; }
.corn-icon { background: #ffd700; }
.wheat-icon { background: #deb887; }
.potato-icon { background: #8b4513; }
.carrot-icon { background: #ff8c00; }
.tomato-icon { background: #ff6347; }
.barn-icon { background: #8b4513; }
.shed-icon { background: #a0522d; }
.fence-icon { background: #daa520; }
.well-icon { background: #4682b4; }
.clear-icon { background: #8b4513; }

.seed-count, .building-cost {
  font-size: 12px;
  color: #888;
  margin-top: 5px;
}

.seed-count {
  background: var(--primary-color);
  color: white;
  padding: 2px 6px;
  border-radius: 10px;
  display: inline-block;
}

#chat {
  position: absolute !important;
  bottom: 10px;
  left: 10px;
  width: 380px;
  height: 360px;
  min-height: 180px;  /* Minimum height */
  max-height: 600px;  /* Maximum height */
  resize: vertical;   /* Allow vertical resizing */
  overflow: auto;     /* Required for resize to work */
  background: rgba(45, 45, 45, 0.95);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

/* Style the resize handle */
#chat::-webkit-resizer {
  background: transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid var(--primary-color);
  cursor: ns-resize;
}

/* Game Toolbar */
.game-toolbar {
  position: fixed;
  bottom: 10px;
  left: calc(75% - 335px);  /* Increased by 50px (from 285 to 335) */
  display: flex;
  flex-direction: row;
  gap: 10px;
  z-index: 1500;
}

.toolbar-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  font-size: 12px;
  font-weight: bold;
  min-width: 80px;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.toolbar-btn:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
}

.toolbar-btn.active {
  background: #ff9800;
}

.btn-icon {
  font-size: 16px;
}

/* Mode indicators */
.planting-mode .canvas-cursor {
  cursor: crosshair;
}

.building-mode .canvas-cursor {
  cursor: pointer;
}

.tile-highlight {
  box-shadow: 0 0 20px #00ff00 !important;
  border: 3px solid #00ff00 !important;
}

.tile-invalid {
  box-shadow: 0 0 20px #ff0000 !important;
  border: 3px solid #ff0000 !important;
}

.hide-advanced .land-management::after,
.hide-advanced .market-actions::after {
  content: "🔒 Unlock at Level 3";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.8);
  color: white;
  padding: 5px 10px;
  border-radius: 10px;
  font-size: 10px;
  pointer-events: none;
}

/* Emergency help button pulse for new players */
.emergency-help-pulse {
  animation: helpPulse 2s infinite;
}

@keyframes helpPulse {
  0%, 100% { 
    background-color: var(--primary-color);
    transform: scale(1);
  }
  50% { 
    background-color: #45a049;
    transform: scale(1.05);
  }
}


.purchase-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.8);
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}

.purchase-content {
  background: var(--panel-color);
  border: 3px solid var(--primary-color);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

.purchase-options {
  display: flex;
  gap: 15px;
  margin: 15px 0;
}

.purchase-option {
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 15px;
  cursor: pointer;
  flex: 1;
  transition: all 0.2s;
}

.purchase-option:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
}

.purchase-cancel {
  background: var(--border-color);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 10px 20px;
  cursor: pointer;
  margin-top: 10px;
}


/* Character Selection Panel - ADD THIS ENTIRE SECTION */
#character-panel {
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid #444;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 5px;
}

.character-options {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.character-btn {
  flex: 1;
  padding: 10px;
  background: #333;
  color: white;
  border: 1px solid #555;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.character-btn:hover {
  background: #444;
  border-color: #888;
}

.character-btn.selected {
  background: #4a7c59;
  border-color: #6fa682;
}


/* Island Building Styles */
.building-benefit {
  font-size: 10px;
  color: #4CAF50;
  margin-top: 3px;
  font-weight: bold;
}

.building-icon {
  font-size: 24px;
  text-align: center;
  margin-bottom: 5px;
}

.world-stats {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.8);
  padding: 10px;
  border-radius: 8px;
  color: white;
  font-size: 12px;
}

.world-stats div {
  margin: 5px 0;
}

.island-tile {
  background: #8B4513;
  border: 1px solid #654321;
}

.water-tile {
  background: #4682B4;
  border: 1px solid #1E90FF;
}

.purchasable-water {
  background: #5F9EA0;
  border: 2px dashed #FFD700;
  cursor: pointer;
}

.building-preview {
  opacity: 0.6;
  border: 2px dashed #4CAF50;
}

.building-complete {
  border: 2px solid #4CAF50;
}

.building-construction {
  border: 2px dashed #FFA500;
  opacity: 0.8;
}



/* Quick Actions - ADD AT END OF style.css */
.quick-actions {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 100;
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px;
  font-size: 14px;
  background: #333;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
  text-align: center;
  min-height: 60px;
}

.action-btn:hover {
  background: #4CAF50;
  color: #fff;
}

/* Building Market Styles */
.building-market-panel {
  font-family: Arial, sans-serif;
}

.tier-separator h3 {
  text-align: center;
  padding: 10px;
  background: rgba(76, 175, 80, 0.1);
  border-radius: 5px;
}

.building-card.locked {
  opacity: 0.6;
  cursor: not-allowed;
}

.lock-reason {
  color: #ff6b6b;
  font-size: 11px;
  margin-top: 5px;
}

.building-tier {
  color: #4CAF50;
  font-size: 10px;
  margin: 2px 0;
}


.action-btn:active {
  transform: scale(0.95);
}

/* Tree Menu Styles */
.tree-menu {
  background: rgba(0, 0, 0, 0.9);
  border: 2px solid #4CAF50;
  border-radius: 8px;
  padding: 10px;
  min-width: 200px;
  color: white;
}

.tree-menu button {
  display: block;
  width: 100%;
  padding: 8px;
  margin: 5px 0;
  background: #4CAF50;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.tree-menu button:hover {
  background: #45a049;
}

/* Quick Menu Styles */
.quick-menu {
  position: absolute;
  background: rgba(0, 0, 0, 0.9);
  padding: 20px;
  border-radius: 10px;
  z-index: 1000;
  color: white;
}

.menu-option {
  padding: 10px;
  cursor: pointer;
  border-radius: 5px;
  transition: background 0.3s;
}

.menu-option:hover {
  background: rgba(76, 175, 80, 0.3);
}

/* Update the existing close-btn style if it's missing */
.close-btn {
  background: #f44336;
  color: white;
  border: none;
  padding: 5px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 18px;
}

.close-btn:hover {
  background: #da190b;
}

/* Ensure trade and build panels have proper headers */
.trade-header, .build-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  color: white;
}

.trade-header h3, .build-menu-header h3 {
  margin: 0;
  color: #4CAF50;
}

/* Ensure build preview section exists */
.build-preview {
  padding: 15px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  margin-top: 15px;
  color: white;
}

.build-preview h4 {
  margin: 0 0 10px 0;
  color: #4CAF50;
}

.build-preview p {
  margin: 0;
  color: #ccc;
  font-size: 14px;
}


/* Keyboard Shortcuts Overlay */
.keyboard-overlay {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.95);
  border: 2px solid #4CAF50;
  border-radius: 10px;
  padding: 20px;
  z-index: 2000;
  color: white;
}

.shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin: 20px 0;
}

.shortcut {
  display: flex;
  align-items: center;
  gap: 10px;
}

kbd {
  background: #333;
  padding: 5px 10px;
  border-radius: 5px;
  border: 1px solid #555;
  font-family: monospace;
  min-width: 60px;
  text-align: center;
}

/* Connection Indicator */
#connection-indicator {
  position: fixed;
  top: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.8);
  padding: 5px 12px;
  border-radius: 15px;
  z-index: 100;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.status-dot.connected {
  background: #4CAF50;
}

.status-dot.disconnected {
  background: #f44336;
  animation: none;
}

.status-text {
  color: white;
  font-size: 12px;
}

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

/* Sell button in inventory */
.sell-btn {
  margin-top: 5px;
  padding: 3px 8px;
  background: #FFC107;
  color: black;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-size: 10px;
  font-weight: bold;
}

.sell-btn:hover {
  background: #FFD700;
}

/* Sell dialog */
.sell-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.95);
  border: 2px solid #FFC107;
  border-radius: 10px;
  padding: 20px;
  z-index: 2000;
  color: white;
}

.quantity-selector {
  display: flex;
  gap: 10px;
  margin: 20px 0;
  justify-content: center;
  align-items: center;
}

.quantity-selector button {
  width: 40px;
  height: 40px;
  font-size: 20px;
  background: #333;
  color: white;
  border: 1px solid #666;
  cursor: pointer;
}

.quantity-selector input {
  width: 80px;
  height: 40px;
  text-align: center;
  font-size: 18px;
  background: #222;
  color: white;
  border: 1px solid #666;
}

.sell-info {
  margin: 20px 0;
  text-align: center;
}

.sell-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.sell-actions button {
  padding: 10px 20px;
  font-size: 14px;
  cursor: pointer;
}

/* Plant panel */
.plant-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.95);
  border: 2px solid #4CAF50;
  border-radius: 10px;
  padding: 20px;
  z-index: 2000;
  color: white;
}

.plant-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.plant-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.plant-option {
  background: rgba(76, 175, 80, 0.2);
  border: 2px solid #4CAF50;
  border-radius: 8px;
  padding: 15px;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.plant-option:hover {
  background: rgba(76, 175, 80, 0.4);
}

.plant-option span:first-child {
  font-size: 32px;
}

.seed-info {
  font-size: 11px;
  color: #aaa;
}

@keyframes flash {
  0%, 100% { color: white; transform: scale(1); }
  50% { color: #4CAF50; transform: scale(1.2); }
}

.plant-option.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.plant-option:not(.disabled):hover {
  background: rgba(76, 175, 80, 0.2);
  cursor: pointer;
}