/* Modern bolt.new style enhancements for existing putting game */

/* Modern color palette */
:root {
  --primary-color: #3fa34d;
  --primary-dark: #2d7a3a;
  --secondary-color: #1976d2;
  --accent-color: #ff6b35;
  --background-color: #aee7ff;
  --surface-color: #ffffff;
  --text-primary: #0d204a;
  --text-secondary: #666666;
  --border-radius: 12px;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Enhanced body styling */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--background-color);
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  overflow: hidden;
  height: 100vh;
}

/* Game container takes full screen */
#game-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
}

/* Game Title */
.game-title {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  text-align: center;
  white-space: nowrap;
}

.game-title h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  padding: 10px 16px;
  border: 2px solid var(--primary-color);
  border-radius: 8px;
  background: var(--surface-color);
  box-shadow: var(--shadow);
  max-width: 90vw;
  box-sizing: border-box;
}

/* Side Controls - Positioned on left and right sides */
.side-controls {
  position: fixed;
  top: 75%;
  transform: translateY(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}

.left-controls {
  left: 16px;
}

.right-controls {
  right: 16px;
}

/* Control Cards */
.control-card {
  background: var(--surface-color);
  padding: 12px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
  min-width: 100px;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
}

.control-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

/* Labels */
.control-card label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
}

/* Input styling */
.control-card input {
  width: 100%;
  background: #f8f9fa;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  transition: all 0.2s ease;
  text-align: center;
  box-sizing: border-box;
}

.control-card input:focus {
  outline: none;
  border-color: var(--secondary-color);
  background: white;
  box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

/* Dropdown styling */
.aim-dropdown {
  width: 100%;
  background: #f8f9fa;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 12.6px;
  font-weight: 600;
  color: var(--text-primary);
  transition: all 0.2s ease;
  text-align: center;
  box-sizing: border-box;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 12px;
  padding-right: 28px;
}

.aim-dropdown:focus {
  outline: none;
  border-color: var(--secondary-color);
  background-color: white;
  box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

.aim-dropdown:hover {
  border-color: var(--secondary-color);
  background-color: white;
}

/* Direction buttons */
.direction-buttons {
  display: flex;
  gap: 4px;
}

.direction-btn {
  flex: 1;
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.direction-btn.active {
  background: var(--primary-color);
  color: white;
}

.direction-btn:hover {
  background: var(--primary-dark);
  color: white;
  border-color: var(--primary-dark);
  transform: translateY(-1px);
}

/* Stimp buttons */
.stimp-buttons {
  display: flex;
  gap: 4px;
}

.stimp-btn {
  flex: 1;
  background: transparent;
  color: var(--secondary-color);
  border: 2px solid var(--secondary-color);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stimp-btn.active {
  background: var(--secondary-color);
  color: white;
}

.stimp-btn:hover {
  background: #1565c0;
  color: white;
  border-color: #1565c0;
  transform: translateY(-1px);
}

/* Firmness buttons - match STIMP button design */
.firmness-buttons {
  display: flex;
  gap: 4px;
}

.firmness-btn {
  flex: 1;
  background: transparent;
  color: var(--secondary-color);
  border: 2px solid var(--secondary-color);
  border-radius: 8px;
  padding: 4px 6px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.firmness-btn.active {
  background: var(--secondary-color);
  color: white;
}

.firmness-btn:hover {
  background: #1565c0;
  color: white;
  border-color: #1565c0;
  transform: translateY(-1px);
}

/* Speed display styling */
.speed-display {
  margin-top: 8px;
  text-align: center;
}

.speed-display .number-display {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-primary);
  background: transparent;
  border: none;
  padding: 2px 4px;
  margin-right: 4px;
}

.speed-units {
  font-size: 9px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Number control with arrows */
.number-control {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  touch-action: manipulation;
}

.arrow-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  width: 24px;
  height: 24px;
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.arrow-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.arrow-btn:active {
  transform: translateY(0);
}

.number-display {
  background: #f8f9fa;
  border: 2px solid #e9ecef;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12.6px;
  font-weight: 700;
  color: var(--text-primary);
  min-width: 20px;
  text-align: center;
  user-select: none;
  touch-action: manipulation;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

/* Bottom Action Buttons */
.bottom-controls {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 12px;
  padding: 16px;
}

.action-btn {
  background: var(--surface-color);
  color: var(--text-primary);
  border: none;
  border-radius: var(--border-radius);
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow);
  min-width: 80px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
}

.action-btn:hover {
  box-shadow: var(--shadow-hover);
}

.action-btn.preview {
  background: var(--secondary-color);
  color: white;
}

.action-btn.preview:hover {
  background: #1565c0;
}

.action-btn.putt {
  background: var(--primary-color);
  color: white;
}

.action-btn.putt:hover {
  background: var(--primary-dark);
}

.action-btn.reset {
  background: var(--accent-color);
  color: white;
}

.action-btn.reset:hover {
  background: #e55a2b;
}

/* Mobile-first responsive design */
@media (max-width: 768px) {
  .side-controls {
    padding: 8px;
  }
  
  .left-controls {
    left: 8px;
  }
  
  .right-controls {
    right: 8px;
  }
  
  .control-card {
    padding: 12px;
    min-width: 100px;
  }
  
  .control-card label {
    font-size: 10px;
  }
  
  .control-card input {
    font-size: 12px;
    padding: 6px 8px;
  }
  
  .aim-dropdown {
    font-size: 12.6px;
    padding: 6px 8px;
    padding-right: 28px;
  }
  
  .direction-btn {
    padding: 6px 8px;
    font-size: 10px;
  }
  
  .stimp-btn {
    padding: 6px 8px;
    font-size: 10px;
  }
  
  .firmness-btn {
    padding: 4px 6px;
    font-size: 9px;
  }
  
  .speed-display {
    margin-top: 1px;
  }
  
  .speed-display .number-display {
    font-size: 9px;
  }
  
  .speed-units {
    font-size: 9px;
  }
  
  .bottom-controls {
    bottom: 12px;
    gap: 8px;
    padding: 12px;
  }
  
  .action-btn {
    padding: 10px 16px;
    font-size: 12px;
    min-width: 70px;
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  .side-controls {
    padding: 4px;
  }
  
  .left-controls {
    left: 4px;
  }
  
  .right-controls {
    right: 4px;
  }
  
  .control-card {
    padding: 8px;
    min-width: 80px;
  }
  
  .control-card label {
    font-size: 9px;
    margin-bottom: 4px;
  }
  
  .control-card input {
    font-size: 11px;
    padding: 4px 6px;
  }
  
  .aim-dropdown {
    font-size: 11.6px;
    padding: 4px 6px;
    padding-right: 24px;
  }
  
  .direction-btn {
    padding: 4px 6px;
    font-size: 9px;
  }
  
  .stimp-btn {
    padding: 4px 6px;
    font-size: 9px;
  }
  
  .firmness-btn {
    padding: 3px 4px;
    font-size: 8px;
  }
  
  .speed-display {
    margin-top: 0;
  }
  
  .speed-display .number-display {
    font-size: 9px;
  }
  
  .speed-units {
    font-size: 9px;
  }
  
  .bottom-controls {
    bottom: 8px;
    gap: 6px;
    padding: 8px;
  }
  
  .action-btn {
    padding: 8px 12px;
    font-size: 11px;
    min-width: 60px;
  }
}

/* Landscape orientation adjustments */
@media (max-height: 500px) and (orientation: landscape) {
  .side-controls {
    top: 10px;
    transform: none;
  }
  
  .bottom-controls {
    bottom: 8px;
  }
  
  .control-card {
    padding: 8px;
    margin-bottom: 8px;
  }
}

/* Add a subtle animation for the controls */
.side-controls, .bottom-controls {
  animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Ensure the game container is properly positioned */
#game-container {
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
} 

/* Remove broken distance overlay styles and add clean version */
.distance-overlay {
  position: absolute;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  background: none;
  padding: 0;
  margin-top: 20px;
  font-family: Arial, sans-serif;
  font-weight: bold;
  font-size: 1rem;
  color: #111;
  text-shadow: 0 1px 0 #fff, 0 2px 2px #fff;
  text-align: center;
  pointer-events: none;
}

#distance-message {
  display: block;
} 