/* PowerBall Lottery Generator - Styles */

/* CSS Variables */
:root {
  --bg-dark: #0f0f1a;
  --bg-card: #1a1a2e;
  --bg-card-hover: #252542;
  --primary: #e94560;
  --primary-dark: #c23652;
  --secondary: #16213e;
  --accent: #ffc107;
  --text-primary: #ffffff;
  --text-secondary: #a0a0b8;
  --text-muted: #6c6c8a;
  --white-ball: #ffffff;
  --white-ball-border: #d0d0d0;
  --powerball: #e94560;
  --powerball-text: #ffffff;
  --success: #4caf50;
  --warning: #ff9800;
  --error: #f44336;
  --border-radius: 12px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  --transition: all 0.3s ease;
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* App Container */
.app-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 25px;
  background: var(--bg-card);
  border-radius: var(--border-radius);
  margin-bottom: 25px;
  box-shadow: var(--shadow);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  font-size: 2.2rem;
  filter: drop-shadow(0 0 10px var(--primary));
}

.logo h1 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 2px;
}

.data-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--secondary);
  border-radius: 20px;
}

.status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--success);
}

.status-indicator.loading {
  background: var(--warning);
  animation: pulse 1s infinite;
}

.status-indicator.error {
  background: var(--error);
}

.status-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

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

/* Main Content */
.main-content {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 25px;
  margin-bottom: 25px;
}

.main-content-left {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

/* Generator Section */
.generator-section {
  background: var(--bg-card);
  border-radius: var(--border-radius);
  padding: 30px;
  box-shadow: var(--shadow);
}

/* Rate Numbers Card (Side Panel) */
.rate-numbers-card {
  margin-bottom: 20px;
}

.rate-numbers-card .section-description {
  color: var(--text-secondary);
  margin-bottom: 15px;
  font-size: 0.85rem;
  line-height: 1.4;
}

.rate-numbers-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 15px;
}

.number-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.number-input-group label {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.white-ball-inputs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.number-input {
  width: 50px;
  padding: 8px 4px;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  background: var(--secondary);
  border: 2px solid var(--text-muted);
  border-radius: 6px;
  color: var(--text-primary);
  transition: var(--transition);
}

.number-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(233, 69, 96, 0.2);
}

.number-input::placeholder {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.powerball-input-wrapper {
  display: flex;
  gap: 6px;
}

.powerball-input {
  width: 50px;
}

.rate-numbers-card .btn {
  width: 100%;
  justify-content: center;
  padding: 10px 16px;
  font-size: 0.9rem;
  margin-top: 5px;
}

.rated-numbers-display {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.rated-numbers-display h4 {
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Compact ticket display for side panel */
.ticket-display.compact {
  transform: scale(0.85);
  transform-origin: top center;
  margin: -10px 0;
}

.ticket-display.compact .ball {
  width: 35px;
  height: 35px;
  font-size: 0.9rem;
}

.ticket-display.compact .prob-label {
  font-size: 0.65rem;
  margin-top: 2px;
}

.ticket-display.compact .powerball-label {
  font-size: 0.7rem;
}

.ticket-rating.compact {
  margin-top: 10px;
  padding: 10px;
  font-size: 0.85rem;
}

.ticket-rating.compact .rating-label {
  font-size: 0.8rem;
}

.ticket-rating.compact .rating-value {
  font-size: 1rem;
}

.ticket-rating.compact .rating-description {
  font-size: 0.7rem;
  margin-top: 5px;
}

.generator-controls {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 14px 28px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--text-primary);
  box-shadow: 0 4px 15px rgba(233, 69, 96, 0.4);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(233, 69, 96, 0.5);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--secondary);
  color: var(--text-primary);
  border: 2px solid var(--primary);
}

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

.btn-icon {
  font-size: 1.3rem;
}

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

.ticket-input {
  width: 70px;
  padding: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
  background: var(--secondary);
  border: 2px solid var(--text-muted);
  border-radius: 8px;
  color: var(--text-primary);
  transition: var(--transition);
}

.ticket-input:focus {
  outline: none;
  border-color: var(--primary);
}

/* Latest Ticket Display */
.latest-ticket {
  text-align: center;
}

.latest-ticket h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 3px;
}

.ticket-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  padding: 30px;
  background: linear-gradient(135deg, var(--secondary), var(--bg-dark));
  border-radius: var(--border-radius);
  border: 2px solid var(--text-muted);
}

.ticket-display.empty {
  opacity: 0.6;
}

.white-balls {
  display: flex;
  gap: 12px;
}

.ball {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Poppins', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  transition: var(--transition);
}

.ball.white {
  background: linear-gradient(145deg, #ffffff, #e0e0e0);
  color: #1a1a2e;
  border: 3px solid var(--white-ball-border);
  box-shadow: 
    0 4px 15px rgba(0, 0, 0, 0.3),
    inset 0 -3px 10px rgba(0, 0, 0, 0.1);
}

.powerball-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.ball.powerball {
  background: linear-gradient(145deg, var(--primary), var(--primary-dark));
  color: var(--powerball-text);
  border: 3px solid var(--primary);
  box-shadow: 
    0 4px 15px rgba(233, 69, 96, 0.5),
    inset 0 -3px 10px rgba(0, 0, 0, 0.2);
}

.powerball-label {
  font-size: 0.75rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
}

/* Ball Animation */
.ball.animate {
  animation: ballPop 0.5s ease-out;
}

@keyframes ballPop {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

/* Info Panel */
.info-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.stats-card {
  background: var(--bg-card);
  border-radius: var(--border-radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.stats-card h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--text-muted);
}

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

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

.stat-label {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.stat-value {
  font-family: 'Poppins', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-value.small {
  font-size: 0.9rem;
}

/* Rating Guide */
.rating-guide {
  overflow: hidden;
}

.guide-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: none !important;
}

.guide-header h3 {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.guide-toggle-icon {
  color: var(--text-muted);
  font-size: 0.8rem;
  transition: var(--transition);
}

.guide-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.guide-content.expanded {
  max-height: 600px;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid var(--text-muted);
}

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

.guide-section h4 {
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.guide-section p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 8px;
}

.guide-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.guide-section li {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 4px 0;
  padding-left: 12px;
  position: relative;
}

.guide-section li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--primary);
}

.guide-section strong {
  color: var(--text-secondary);
}

/* Rating Scale */
.rating-scale {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.scale-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--secondary);
}

.scale-badge {
  font-size: 0.75rem;
  font-weight: 600;
}

.scale-range {
  font-family: 'Poppins', sans-serif;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.scale-item.very-hot {
  background: rgba(229, 57, 53, 0.15);
  border-left: 3px solid #e53935;
}

.scale-item.very-hot .scale-badge {
  color: #e53935;
}

.scale-item.hot {
  background: rgba(239, 83, 80, 0.1);
  border-left: 3px solid #ef5350;
}

.scale-item.hot .scale-badge {
  color: #ef5350;
}

.scale-item.average {
  background: rgba(255, 193, 7, 0.1);
  border-left: 3px solid #ffc107;
}

.scale-item.average .scale-badge {
  color: #ffc107;
}

.scale-item.cold {
  background: rgba(3, 169, 244, 0.1);
  border-left: 3px solid #03a9f4;
}

.scale-item.cold .scale-badge {
  color: #03a9f4;
}

.scale-item.very-cold {
  background: rgba(33, 150, 243, 0.15);
  border-left: 3px solid #2196f3;
}

.scale-item.very-cold .scale-badge {
  color: #2196f3;
}

.guide-disclaimer {
  font-size: 0.75rem;
  color: var(--primary);
  text-align: center;
  padding: 10px;
  background: rgba(233, 69, 96, 0.1);
  border-radius: 6px;
  margin-top: 10px;
  margin-bottom: 0;
}

/* Ticket History */
.ticket-history {
  background: var(--bg-card);
  border-radius: var(--border-radius);
  padding: 20px;
  box-shadow: var(--shadow);
  margin-top: 25px;
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  flex-wrap: wrap;
  gap: 10px;
}

.ticket-history h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 0;
}

/* Sort Controls */
.sort-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sort-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-right: 4px;
}

.sort-btn {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 12px;
  border: 1px solid var(--text-muted);
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.sort-btn:hover {
  border-color: var(--text-secondary);
  color: var(--text-secondary);
}

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

.sort-btn.active:hover {
  background: var(--primary-dark);
}

/* Leaderboard */
.leaderboard {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.leaderboard-item {
  flex: 1;
  min-width: 280px;
  padding: 15px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--secondary), var(--bg-dark));
  border: 2px solid var(--text-muted);
  transition: var(--transition);
}

.leaderboard-item.hottest {
  border-color: #e53935;
  background: linear-gradient(135deg, rgba(229, 57, 53, 0.1), var(--bg-dark));
}

.leaderboard-item.coldest {
  border-color: #2196f3;
  background: linear-gradient(135deg, rgba(33, 150, 243, 0.1), var(--bg-dark));
}

.leaderboard-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.leaderboard-icon {
  font-size: 1.2rem;
}

.leaderboard-title {
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
}

.leaderboard-item.hottest .leaderboard-title {
  color: #e53935;
}

.leaderboard-item.coldest .leaderboard-title {
  color: #2196f3;
}

.leaderboard-ticket {
  min-height: 40px;
  display: flex;
  align-items: center;
}

.leaderboard-empty {
  color: var(--text-muted);
  font-style: italic;
}

.leaderboard-ticket-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.leaderboard-ticket-content .rating-badge {
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 20px;
}

.leaderboard-balls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.leaderboard-balls .ball {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  transition: var(--transition);
}

.leaderboard-balls .ball.white {
  background: linear-gradient(145deg, #ffffff, #e0e0e0);
  color: #1a1a2e;
  border: 2px solid var(--white-ball-border);
  box-shadow: 
    0 3px 10px rgba(0, 0, 0, 0.2),
    inset 0 -2px 6px rgba(0, 0, 0, 0.1);
}

.leaderboard-balls .ball.white.hot {
  background: linear-gradient(145deg, #ffebee, #ffcdd2);
  border-color: #e53935;
  box-shadow: 
    0 0 12px rgba(229, 57, 53, 0.4),
    0 3px 10px rgba(0, 0, 0, 0.2);
}

.leaderboard-balls .ball.white.cold {
  background: linear-gradient(145deg, #e3f2fd, #bbdefb);
  border-color: #2196f3;
  box-shadow: 
    0 0 12px rgba(33, 150, 243, 0.4),
    0 3px 10px rgba(0, 0, 0, 0.2);
}

.leaderboard-balls .ball.powerball {
  background: linear-gradient(145deg, var(--primary), var(--primary-dark));
  color: white;
  border: 2px solid var(--primary);
  box-shadow: 
    0 3px 10px rgba(233, 69, 96, 0.4),
    inset 0 -2px 6px rgba(0, 0, 0, 0.2);
}

.leaderboard-balls .ball.powerball.hot {
  background: linear-gradient(145deg, #e53935, #c62828);
  border-color: #e53935;
}

.leaderboard-balls .ball.powerball.cold {
  background: linear-gradient(145deg, #2196f3, #1976d2);
  border-color: #2196f3;
}

.leaderboard-balls .separator {
  color: var(--text-muted);
  margin: 0 4px;
  font-size: 1.2rem;
}

/* Responsive leaderboard */
@media (max-width: 600px) {
  .leaderboard {
    flex-direction: column;
  }
  
  .leaderboard-item {
    min-width: auto;
  }
  
  .leaderboard-balls {
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
  }
  
  .leaderboard-balls .ball {
    width: 36px;
    height: 36px;
    font-size: 0.85rem;
  }
}

.history-count {
  color: var(--text-muted);
  font-weight: 400;
}

.history-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  max-height: 200px;
  overflow-y: auto;
  padding-right: 10px;
}

.history-list::-webkit-scrollbar {
  width: 6px;
}

.history-list::-webkit-scrollbar-track {
  background: var(--secondary);
  border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: 3px;
}

.empty-history {
  color: var(--text-muted);
  font-style: italic;
  padding: 20px;
  text-align: center;
  width: 100%;
}

.history-ticket {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--secondary);
  border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  transition: var(--transition);
}

.history-ticket:hover {
  background: var(--bg-card-hover);
}

.history-ticket .mini-ball {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.history-ticket .mini-ball.white {
  background: var(--white-ball);
  color: var(--bg-dark);
}

.history-ticket .mini-ball.powerball {
  background: var(--primary);
  color: var(--text-primary);
}

.history-ticket .separator {
  color: var(--text-muted);
  margin: 0 4px;
}

/* Error Container */
.error-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
}

.error-message {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 20px;
  background: var(--bg-card);
  border: 2px solid var(--error);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  animation: slideIn 0.3s ease-out;
}

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

.error-icon {
  font-size: 1.5rem;
}

.error-text {
  color: var(--text-primary);
  max-width: 300px;
}

.error-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 5px;
  transition: var(--transition);
}

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

/* Disclaimer */
.disclaimer {
  margin-top: auto;
  padding: 15px 20px;
  background: rgba(233, 69, 96, 0.1);
  border: 1px solid var(--primary);
  border-radius: var(--border-radius);
  text-align: center;
}

.disclaimer p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

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

/* Responsive Design */
@media (max-width: 900px) {
  .main-content {
    grid-template-columns: 1fr;
  }
  
  .info-panel {
    flex-direction: row;
    flex-wrap: wrap;
  }
  
  .stats-card {
    flex: 1;
    min-width: 200px;
  }
  
  .rate-numbers-card {
    min-width: 280px;
  }
  
  .ticket-display {
    flex-direction: column;
    gap: 20px;
  }
  
  .ticket-display.compact {
    transform: scale(1);
    margin: 0;
  }
  
  .ball {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }
}

@media (max-width: 600px) {
  .header {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  
  .generator-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .multi-generate {
    justify-content: center;
  }
  
  .white-balls {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .logo h1 {
    font-size: 1.4rem;
  }
}

/* ========================================
   Probability Display Styles
   ======================================== */

/* Ball Container - wraps ball + probability label */
.ball-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

/* Probability Label */
.prob-label {
  font-family: 'Poppins', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  transition: var(--transition);
}

.prob-label.hot {
  color: #e53935;
  background: rgba(229, 57, 53, 0.15);
}

.prob-label.cold {
  color: #2196f3;
  background: rgba(33, 150, 243, 0.15);
}

/* Hot/Cold Ball Indicators */
.ball.hot {
  box-shadow: 
    0 0 20px rgba(229, 57, 53, 0.6),
    0 4px 15px rgba(0, 0, 0, 0.3),
    inset 0 -3px 10px rgba(0, 0, 0, 0.1);
  border-color: #e53935 !important;
}

.ball.white.hot {
  background: linear-gradient(145deg, #ffebee, #ffcdd2);
}

.ball.cold {
  box-shadow: 
    0 0 20px rgba(33, 150, 243, 0.6),
    0 4px 15px rgba(0, 0, 0, 0.3),
    inset 0 -3px 10px rgba(0, 0, 0, 0.1);
  border-color: #2196f3 !important;
}

.ball.white.cold {
  background: linear-gradient(145deg, #e3f2fd, #bbdefb);
}

.ball.powerball.hot {
  background: linear-gradient(145deg, #e53935, #c62828);
  border-color: #e53935 !important;
}

.ball.powerball.cold {
  background: linear-gradient(145deg, #2196f3, #1976d2);
  border-color: #2196f3 !important;
}

/* Ticket Rating Display */
.ticket-rating {
  margin-top: 20px;
  padding: 15px 20px;
  background: linear-gradient(135deg, var(--secondary), var(--bg-dark));
  border-radius: var(--border-radius);
  border: 1px solid var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.rating-label {
  font-family: 'Poppins', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 6px 16px;
  border-radius: 20px;
}

.rating-label.very-hot {
  background: linear-gradient(135deg, #e53935, #b71c1c);
  color: white;
  box-shadow: 0 0 15px rgba(229, 57, 53, 0.5);
}

.rating-label.hot {
  background: linear-gradient(135deg, #ef5350, #e53935);
  color: white;
}

.rating-label.average {
  background: linear-gradient(135deg, #ffc107, #ff9800);
  color: #1a1a2e;
}

.rating-label.cold {
  background: linear-gradient(135deg, #03a9f4, #0288d1);
  color: white;
}

.rating-label.very-cold {
  background: linear-gradient(135deg, #2196f3, #1565c0);
  color: white;
  box-shadow: 0 0 15px rgba(33, 150, 243, 0.5);
}

.rating-value {
  font-family: 'Poppins', sans-serif;
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--accent);
}

.rating-description {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 300px;
}

/* Probability Legend */
.prob-legend {
  margin-top: 15px;
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.legend-dot.hot {
  background: #e53935;
  box-shadow: 0 0 8px rgba(229, 57, 53, 0.5);
}

.legend-dot.cold {
  background: #2196f3;
  box-shadow: 0 0 8px rgba(33, 150, 243, 0.5);
}

.legend-dot.average {
  background: var(--text-muted);
}

/* History Ticket with Rating Badge */
.history-ticket .rating-badge {
  font-family: 'Poppins', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 12px;
  margin-right: 8px;
}

.rating-badge.very-hot {
  background: #e53935;
  color: white;
}

.rating-badge.hot {
  background: #ef5350;
  color: white;
}

.rating-badge.average {
  background: #ffc107;
  color: #1a1a2e;
}

.rating-badge.cold {
  background: #03a9f4;
  color: white;
}

.rating-badge.very-cold {
  background: #2196f3;
  color: white;
}

/* Mini ball hot/cold in history */
.history-ticket .mini-ball.hot {
  background: #ffcdd2 !important;
  box-shadow: 0 0 8px rgba(229, 57, 53, 0.4);
}

.history-ticket .mini-ball.cold {
  background: #bbdefb !important;
  box-shadow: 0 0 8px rgba(33, 150, 243, 0.4);
}

.history-ticket .mini-ball.powerball.hot {
  background: #e53935 !important;
}

.history-ticket .mini-ball.powerball.cold {
  background: #2196f3 !important;
}

/* Responsive adjustments for probability displays */
@media (max-width: 900px) {
  .ball-container .ball {
    width: 50px;
    height: 50px;
    font-size: 1.1rem;
  }
  
  .prob-label {
    font-size: 0.6rem;
  }
  
  .ticket-rating {
    padding: 12px 15px;
  }
  
  .rating-value {
    font-size: 1.4rem;
  }
}

@media (max-width: 600px) {
  .prob-legend {
    gap: 12px;
  }
  
  .legend-item {
    font-size: 0.7rem;
  }
}

/* ========================================
   Add New Drawing Section
   ======================================== */

.add-drawing-section {
  background: var(--bg-card);
  border-radius: var(--border-radius);
  margin-bottom: 25px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 25px;
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 1px solid transparent;
}

.section-header:hover {
  background: var(--bg-card-hover);
}

.section-header h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 0;
}

.toggle-icon {
  color: var(--text-muted);
  font-size: 0.8rem;
  transition: var(--transition);
}

.add-drawing-form {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
  padding: 0 25px;
}

.add-drawing-form.expanded {
  max-height: 400px;
  padding: 20px 25px;
  border-top: 1px solid var(--text-muted);
}

.form-description {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.form-row {
  display: flex;
  gap: 25px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.form-group {
  flex: 1;
  min-width: 200px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.date-group {
  flex: 0 0 150px;
  min-width: 150px;
}

.powerball-group {
  flex: 0 0 120px;
  min-width: 120px;
}

.form-input {
  width: 100%;
  padding: 12px 15px;
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  background: var(--secondary);
  border: 2px solid var(--text-muted);
  border-radius: 8px;
  color: var(--text-primary);
  transition: var(--transition);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
}

.ball-inputs {
  display: flex;
  gap: 10px;
}

.ball-input {
  width: 55px;
  height: 55px;
  padding: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
  background: var(--secondary);
  border: 2px solid var(--text-muted);
  border-radius: 50%;
  color: var(--text-primary);
  transition: var(--transition);
}

.ball-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 15px rgba(255, 193, 7, 0.3);
}

.ball-input.white-input:focus {
  background: rgba(255, 255, 255, 0.1);
}

.ball-input.powerball-input {
  border-color: var(--primary);
}

.ball-input.powerball-input:focus {
  background: rgba(233, 69, 96, 0.1);
  box-shadow: 0 0 15px rgba(233, 69, 96, 0.3);
}

.ball-input.invalid {
  border-color: var(--error);
  background: rgba(244, 67, 54, 0.1);
}

.ball-input::placeholder {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Remove spinner arrows from number inputs */
.ball-input::-webkit-outer-spin-button,
.ball-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.ball-input[type=number] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.form-actions {
  display: flex;
  gap: 15px;
  margin-top: 10px;
}

.btn-add {
  background: linear-gradient(135deg, #4caf50, #388e3c);
  color: white;
  padding: 12px 24px;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.btn-add:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.5);
}

.btn-add:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-clear {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--text-muted);
  padding: 12px 24px;
}

.btn-clear:hover {
  color: var(--text-primary);
  border-color: var(--text-secondary);
}

.form-message {
  margin-top: 15px;
  padding: 12px 15px;
  border-radius: 8px;
  font-size: 0.9rem;
}

.form-message.success {
  background: rgba(76, 175, 80, 0.15);
  border: 1px solid #4caf50;
  color: #4caf50;
}

.form-message.error {
  background: rgba(244, 67, 54, 0.15);
  border: 1px solid var(--error);
  color: var(--error);
}

/* Success Container */
.success-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
}

.success-message {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 20px;
  background: var(--bg-card);
  border: 2px solid #4caf50;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  animation: slideIn 0.3s ease-out;
}

.success-icon {
  font-size: 1.5rem;
}

.success-text {
  color: #4caf50;
  max-width: 300px;
}

.success-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 5px;
  transition: var(--transition);
}

.success-close:hover {
  color: #4caf50;
}

/* Responsive adjustments for add drawing form */
@media (max-width: 768px) {
  .form-row {
    flex-direction: column;
    gap: 15px;
  }
  
  .date-group,
  .powerball-group {
    flex: 1;
    min-width: auto;
  }
  
  .ball-inputs {
    justify-content: center;
  }
  
  .ball-input {
    width: 48px;
    height: 48px;
    font-size: 1rem;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .btn-add,
  .btn-clear {
    width: 100%;
    justify-content: center;
  }
}

