/* ==========================================================================
   Pickleball Business Calculator Styles
   ========================================================================== */

/* Reset and Base Styles
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
  color: #333;
}

/* Container and Layout
   ========================================================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  overflow: hidden;
}

.content {
  padding: 40px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
}

/* Header Styles
   ========================================================================== */
.header {
  background: linear-gradient(135deg, #43cea2 0%, #185a9d 100%);
  color: white;
  padding: 30px;
  text-align: center;
}

.header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.header p {
  font-size: 1.1rem;
  opacity: 0.9;
}

/* Section Styles
   ========================================================================== */
.section {
  background: #f8f9fa;
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.section h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: #2d3748;
  border-bottom: 3px solid #43cea2;
  padding-bottom: 10px;
}

/* Form Input Styles
   ========================================================================== */
.input-group {
  margin-bottom: 15px;
}

.input-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #4a5568;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper.currency::before {
  content: '$';
  position: absolute;
  left: 12px;
  color: #718096;
  font-weight: 500;
  z-index: 1;
}

input[type="number"] {
  width: 100%;
  padding: 12px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.3s ease;
  background: white;
}

.currency input[type="number"] {
  padding-left: 25px;
}

input[type="number"]:focus {
  outline: none;
  border-color: #43cea2;
  box-shadow: 0 0 0 3px rgba(67, 206, 162, 0.1);
}

input[type="number"]:disabled {
  background: #edf2f7;
  cursor: not-allowed;
}

.display-value {
  width: 100%;
  padding: 12px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 16px;
  background: #f8f9fa;
  color: #4a5568;
  font-weight: 500;
  display: block;
}

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

.info-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #4a5568;
}

.info-value {
  padding: 8px 12px;
  background: #f8f9fa;
  border-radius: 6px;
  font-size: 16px;
  color: #2d3748;
  font-weight: 500;
  border-left: 4px solid #43cea2;
}

.tooltip-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  background: #43cea2;
  color: white;
  border-radius: 50%;
  text-align: center;
  line-height: 18px;
  font-size: 12px;
  font-weight: bold;
  margin-left: 8px;
  cursor: help;
  transition: background-color 0.3s ease;
  position: relative;
}

.tooltip-icon:hover {
  background: #38a169;
}

.tooltip-icon:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #2d3748;
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  white-space: nowrap;
  z-index: 1000;
  margin-bottom: 5px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.tooltip-icon:hover::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #2d3748;
  margin-bottom: -5px;
  z-index: 1000;
}

/* Total Row Styles
   ========================================================================== */
.total-row {
  background: rgba(67, 206, 162, 0.2);
  border-radius: 10px;
  padding: 15px;
  margin-top: 15px;
  border: 2px solid #43cea2;
}

.total-row .input-group {
  margin-bottom: 0;
}

.total-row label {
  font-weight: 600;
  color: #2d3748;
}

.total-row input {
  font-weight: 700;
  color: #2d3748;
}

/* Results Section Styles
   ========================================================================== */
.results {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 15px;
  padding: 30px;
}

.results h2 {
  color: white;
  border-bottom: 3px solid rgba(255,255,255,0.3);
  margin-bottom: 25px;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.result-item {
  background: rgba(255,255,255,0.1);
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  backdrop-filter: blur(10px);
}

.result-item .label {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-bottom: 5px;
}

.result-item .value {
  font-size: 1.8rem;
  font-weight: 700;
}

/* Media Queries - Tablet
   ========================================================================== */
@media (max-width: 768px) {
  .header h1 {
    font-size: 2rem;
  }
  
  .content {
    padding: 20px;
  }
  
  .grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .section {
    padding: 20px;
  }
  
  .results {
    padding: 20px;
  }
  
  .results-grid {
    grid-template-columns: 1fr;
  }
  
  .result-item .value {
    font-size: 1.5rem;
  }
}

/* Media Queries - Mobile
   ========================================================================== */
@media (max-width: 480px) {
  body {
    padding: 10px;
  }
  
  .header {
    padding: 20px;
  }
  
  .header h1 {
    font-size: 1.8rem;
  }
  
  .content {
    padding: 15px;
  }
  
  .section {
    padding: 15px;
  }
}

/* Password overlay styles */
.password-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.password-box {
  background: #fff;
  padding: 32px 24px;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  display: flex;
  gap: 12px;
}
.password-box input[type="password"] {
  padding: 10px;
  border: 1.5px solid #43cea2;
  border-radius: 6px;
  font-size: 16px;
}
.password-box button {
  background: #43cea2;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 18px;
  font-size: 16px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
}
.password-box button:hover {
  background: #38a169;
}
.popup {
  position: fixed;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: #e53e3e;
  color: #fff;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 18px;
  z-index: 10000;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
} 