/* master.css - Professional, clean, modern YouTube Channel Tracker styles */

body {
  font-family: 'Segoe UI', 'Roboto', Arial, sans-serif;
  background: linear-gradient(120deg, #fffbe7 0%, #fff8e1 100%);
  color: #222;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

body.dark-mode {
  background: #181818;
  color: #eee;
}

h1, .main-title {
  font-size: 2.6rem;
  font-weight: 900;
  color: #ff5252;
  margin: 40px 0 8px 0; /* Increased margin-top to 40px */
  letter-spacing: 1.5px;
  text-shadow: 0 2px 8px #ffb30033;
  text-align: center;
}

header, .main-header {
  text-align: center;
  padding: 32px 0 18px 0;
  background: linear-gradient(90deg, #ffb30011 0%, #fffbe7 100%);
  box-shadow: 0 2px 12px #ffb30022;
}

form#channelForm {
  display: flex;
  justify-content: center;
  margin: 32px 0 24px 0;
  gap: 8px;
}

/* Add margin below the form to create space before the global trends section */
#channelForm + #global-trends-section,
#global-trends-section {
  margin-top: 60px; /* Increased to 60px, also targets #global-trends-section directly */
}

#channelInput {
  width: 320px;
  padding: 12px 16px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  transition: border 0.2s;
}
#channelInput:focus {
  border: 1.5px solid #c4302b;
  outline: none;
}

button[type="submit"], .show-more-btn {
  background: linear-gradient(90deg, #ffb300 0%, #ffd740 100%);
  color: #fff;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 8px #ffb30033;
  transition: background 0.2s, transform 0.2s;
}
button[type="submit"]:hover, .show-more-btn:hover {
  background: linear-gradient(90deg, #ff5252 0%, #ffd740 100%);
  transform: scale(1.04);
}

#statusMessage {
  text-align: center;
  color: #ff5252;
  font-weight: 700;
  margin: 12px 0 0 0;
}

.channel-card, .selectable-channel, .selectable-channel-compare {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 18px 0;
  padding: 18px 18px 18px 0;
  background: linear-gradient(90deg, #fff8e1 0%, #ffd74022 100%);
  border-radius: 14px;
  box-shadow: 0 1px 6px #ffb30022;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}

.channel-card:hover, .selectable-channel:hover, .selectable-channel-compare:hover {
  background: linear-gradient(90deg, #ffb300 0%, #ffd740 100%);
  color: #fff;
  box-shadow: 0 4px 16px #ffb30044;
  transform: scale(1.03);
}

.channel-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  box-shadow: 0 2px 8px #ffb30033;
  object-fit: cover;
}

.channel-details h2 {
  margin: 0 0 6px 0;
  font-size: 1.3rem;
  color: #ff5252;
  font-weight: 800;
}
.channel-details p {
  margin: 2px 0;
  color: #444;
  font-size: 1.05rem;
}
.channel-description {
  margin-top: 10px;
  color: #555;
  font-size: 1rem;
}

#videosContainer {
  max-width: 1100px;
  margin: 0 auto 40px auto;
  padding: 0 16px;
}
#videosContainer h3 {
  color: #ff5252;
  font-size: 1.3rem;
  margin-bottom: 12px;
  text-align: left;
}

.video-card {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin: 18px 0;
  background: linear-gradient(90deg, #fff8e1 0%, #ffd74022 100%);
  border-radius: 14px;
  box-shadow: 0 1px 6px #ffb30022;
  padding: 18px 18px 18px 0;
}

.video-thumbnail {
  width: 160px;
  height: 90px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 2px 8px #ffb30033;
}

.video-info h3 {
  margin: 0 0 6px 0;
  font-size: 1.1rem;
  color: #ff5252;
  font-weight: 700;
}
.video-info p, .video-earnings {
  margin: 2px 0;
  color: #444;
  font-size: 1.01rem;
}
.video-earnings .earnings-range {
  color: #ffb300;
  font-weight: 700;
}
.video-chart-container {
  min-width: 180px;
  max-width: 220px;
  margin-left: 12px;
}

hr {
  border: none;
  border-top: 1.5px solid #ffd74044;
  margin: 32px 0;
}

.earnings-card, .video-card, .channel-card, .onboarding-modal, .main-section, .compare-section {
  background: #fffbe7;
  border-radius: 18px;
  box-shadow: 0 2px 12px #ffb30022;
  margin: 24px auto;
  padding: 24px 28px;
  max-width: 700px;
  animation: fadeIn 1.2s cubic-bezier(.4,0,.2,1);
}
.earnings-card h3, .manual-fields label {
  color: #ff5252;
  font-weight: 800;
}

#compareSection, .compare-section {
  background: #fffbe7;
  border-radius: 18px;
  box-shadow: 0 2px 12px #ffb30022;
  margin: 24px auto;
  padding: 24px 28px;
  max-width: 700px;
  animation: fadeIn 1.2s cubic-bezier(.4,0,.2,1);
}

input, select, button {
  font-family: inherit;
  font-size: 1.08rem;
  border-radius: 8px;
  border: 1px solid #ffd740;
  padding: 8px 12px;
  margin: 6px 0;
  outline: none;
  transition: border 0.2s;
}
input:focus, select:focus {
  border: 1.5px solid #ffb300;
}

label {
  font-weight: 600;
  color: #ff5252;
  margin-right: 8px;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield; /* Added standard property */
}

::-webkit-scrollbar {
  width: 10px;
  background: #fffbe7;
}
::-webkit-scrollbar-thumb {
  background: #ffd740;
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
  background: #ffb300;
}

.visually-hidden {
  display: none !important;
}

/* Loading spinner styles */
.spinner {
  display: inline-block;
  width: 36px;
  height: 36px;
  border: 4px solid #eee;
  border-top: 4px solid #c4302b;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 18px auto 12px auto;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

body.dark-mode .spinner {
  border: 4px solid #333;
  border-top: 4px solid #ff5252;
}

/* Modal styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0; top: 0; width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.45);
  justify-content: center;
  align-items: center;
}
.modal-content {
  background: #fff;
  border-radius: 12px;
  padding: 32px 24px 24px 24px;
  max-width: 400px;
  margin: 0 auto;
  box-shadow: 0 2px 16px rgba(0,0,0,0.18);
  position: relative;
  text-align: center;
}
.close-modal {
  position: absolute;
  top: 12px;
  right: 18px;
  font-size: 1.6rem;
  color: #c4302b;
  cursor: pointer;
}
@media (max-width: 600px) {
  .modal-content {
    padding: 18px 6px 16px 6px;
    max-width: 98vw;
  }
}

/* Comparison section */
#compareSection {
  margin: 0 auto 32px auto;
  max-width: 1200px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
}
.compared-channel-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  padding: 18px 18px 12px 18px;
  min-width: 260px;
  max-width: 320px;
  flex: 1 1 260px;
  text-align: center;
  position: relative;
}
body.dark-mode .compared-channel-card {
  background: #232323;
  color: #eee;
  border: 1px solid #333;
}
.remove-compare-btn {
  position: absolute;
  top: 8px;
  right: 12px;
  background: #c4302b;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.18s;
}
.remove-compare-btn:hover {
  background: #a7281a;
}

.earnings-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  padding: 24px 24px 18px 24px;
  max-width: 700px;
  margin: 0 auto 24px auto;
  margin-bottom: 24px;
  margin-top: 10px;
  display: block;
  text-align: center;
}
.earnings-card h3 {
  color: #c4302b;
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 1.25rem;
  text-align: center;
}
.manual-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 10px;
  justify-content: center;
}
.manual-fields label {
  display: flex;
  flex-direction: column;
  font-size: 1rem;
  color: #333;
  min-width: 160px;
}

.selectable-channel-compare {
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s, background 0.2s;
  box-shadow: 0 2px 8px #0001;
  border: 2px solid transparent;
}
.selectable-channel-compare:hover {
  background: #fffbe6;
  box-shadow: 0 4px 16px #c4302b22;
  border: 2px solid #c4302b;
  transform: scale(1.03);
  z-index: 2;
}
.selectable-channel-compare:active {
  background: #ffe0e0;
  border-color: #c4302b;
}

/* Comparison Charts Styling */
.comparison-charts-container {
  margin-top: 30px;
  padding: 20px;
  background: var(--bg-color);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  border: 1px solid var(--border-color);
}

.comparison-charts-container h3 {
  text-align: center;
  margin-bottom: 25px;
  color: var(--text-color);
  font-size: 1.5em;
  font-weight: 600;
}

.comparison-charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.comparison-chart-card {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  border: 1px solid var(--border-color);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.comparison-chart-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.comparison-chart-card h4 {
  text-align: center;
  margin-bottom: 15px;
  color: var(--text-color);
  font-size: 1.1em;
  font-weight: 600;
}

.comparison-chart-card canvas {
  max-width: 100%;
  height: auto !important;
}

/* AI Trends Analysis Styling */
.trends-analysis-section {
  margin-top: 30px;
  padding: 25px;
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  border: 1px solid var(--border-color);
}

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

.trends-header h3 {
  color: var(--text-color);
  font-size: 1.4em;
  font-weight: 600;
  margin: 0;
}

.trends-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 25px;
}

.trend-card {
  background: var(--bg-color);
  padding: 20px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.trend-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.trend-card h4 {
  color: var(--text-color);
  font-size: 1.1em;
  font-weight: 600;
  margin: 0 0 15px 0;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 8px;
}

.topic-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.topic-tag {
  background: var(--primary-color);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85em;
  font-weight: 500;
}

.engagement-indicator {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9em;
}

.engagement-indicator.good {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.engagement-indicator.needs-improvement {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

[data-theme="dark"] .engagement-indicator.good {
  background: #1e3a28;
  color: #75b798;
  border: 1px solid #2d5a3d;
}

[data-theme="dark"] .engagement-indicator.needs-improvement {
  background: #3a3017;
  color: #d4af37;
  border: 1px solid #4a3d1a;
}

.recommendations-section {
  background: var(--bg-color);
  padding: 20px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  margin-top: 20px;
}

.recommendations-section h4 {
  color: var(--text-color);
  font-size: 1.2em;
  font-weight: 600;
  margin: 0 0 15px 0;
}

.recommendations-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.recommendations-list li {
  background: var(--card-bg);
  padding: 12px 16px;
  margin-bottom: 10px;
  border-radius: 8px;
  border-left: 4px solid var(--primary-color);
  color: var(--text-color);
  font-size: 0.95em;
  line-height: 1.4;
}

.recommendations-list li:last-child {
  margin-bottom: 0;
}

/* Loading spinner for trends */
.trends-content .loading-spinner {
  text-align: center;
  padding: 40px;
  color: var(--text-color);
  font-style: italic;
}

/* Responsive adjustments for comparison charts */
@media (max-width: 768px) {
  .comparison-charts-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .comparison-chart-card {
    padding: 15px;
  }
  
  .comparison-charts-container {
    padding: 15px;
    margin-top: 20px;
  }
}

/* Responsive adjustments for trends */
@media (max-width: 768px) {
  .trends-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .trends-header {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  
  .trend-card {
    padding: 15px;
  }
  
  .recommendations-section {
    padding: 15px;
  }
}

/* AI Analysis Specific Styling */
.ai-insights-container {
  margin-top: 15px;
}

.ai-disclaimer {
  text-align: center;
  margin-bottom: 20px;
  padding: 8px;
  background: #f0f8ff;
  border: 1px solid #d1ecf1;
  border-radius: 6px;
  color: #0c5460;
}

.ai-card {
  border-left: 4px solid #4285f4;
  background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
}

.ai-insights-list {
  list-style: none;
  padding: 0;
  margin: 10px 0 0 0;
}

.ai-insights-list li {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  position: relative;
  padding-left: 20px;
}

.ai-insights-list li:before {
  content: "🤖";
  position: absolute;
  left: 0;
  top: 8px;
}

.ai-insights-list li:last-child {
  border-bottom: none;
}

.future-predictions-section {
  margin-top: 25px;
  padding: 20px;
  background: linear-gradient(135deg, #fff5ee 0%, #ffffff 100%);
  border-radius: 12px;
  border: 1px solid #ffd4a3;
}

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

.prediction-card {
  padding: 15px;
  background: white;
  border-radius: 8px;
  border-left: 3px solid #ff9800;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: transform 0.2s;
}

.prediction-card:hover {
  transform: translateY(-2px);
}

/* Dark mode support for AI components */
[data-theme="dark"] .ai-disclaimer {
  background: #1a1a2e;
  border-color: #0f3460;
  color: #87ceeb;
}

[data-theme="dark"] .ai-card {
  background: linear-gradient(135deg, #232323 0%, #2a2a2a 100%);
  border-left-color: #5a9fd4;
}

[data-theme="dark"] .future-predictions-section {
  background: linear-gradient(135deg, #2a2a2a 0%, #232323 100%);
  border-color: #ff9800;
}

[data-theme="dark"] .prediction-card {
  background: #333;
  color: #eee;
}

body.dark-mode .ai-disclaimer {
  background: #1a1a2e;
  border-color: #0f3460;
  color: #87ceeb;
}

body.dark-mode .ai-card {
  background: linear-gradient(135deg, #232323 0%, #2a2a2a 100%);
  border-left-color: #5a9fd4;
}

body.dark-mode .future-predictions-section {
  background: linear-gradient(135deg, #2a2a2a 0%, #232323 100%);
  border-color: #ff9800;
}

body.dark-mode .prediction-card {
  background: #333;
  color: #eee;
}

.global-trends-card {
  max-width: 600px;
  margin: 40px auto 32px auto;
  background: linear-gradient(135deg, #fff8e1 0%, #ffe0b2 100%);
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(255, 152, 0, 0.12), 0 1.5px 8px #ffb30044;
  padding: 32px 28px 28px 28px;
  text-align: center;
  position: relative;
  animation: fadeIn 1.2s cubic-bezier(.4,0,.2,1);
}
.global-trends-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: #ff5252;
  margin-bottom: 18px;
  letter-spacing: 1px;
  text-align: center;
  text-shadow: 0 2px 8px #ffb30033;
  animation: popIn 1s cubic-bezier(.4,0,.2,1);
}
.global-trends-list {
  list-style: none;
  padding: 0;
  margin: 32px 0 18px 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: center;
}
.trend-item {
  background: linear-gradient(90deg, #ffb30022 0%, #ffd74033 100%);
  border-radius: 16px;
  padding: 14px 28px;
  font-size: 1.18rem;
  font-weight: 600;
  color: #222;
  box-shadow: 0 2px 8px #ffb30022;
  display: flex;
  align-items: center;
  gap: 16px;
  transform: scale(0.95);
  opacity: 0.7;
  transition: all 0.3s cubic-bezier(.4,0,.2,1);
  cursor: pointer;
  animation: popIn 0.7s cubic-bezier(.4,0,.2,1);
}
.trend-item:hover {
  background: linear-gradient(90deg, #ff5252 0%, #ffd740 100%);
  color: #fff;
  transform: scale(1.04);
  opacity: 1;
  box-shadow: 0 4px 16px #ffb30044;
}
.trend-rank {
  font-size: 1.3rem;
  font-weight: 900;
  color: #ff5252;
  margin-right: 8px;
  text-shadow: 0 1px 4px #ffb30033;
}
.trend-text {
  flex: 1;
  text-align: left;
  letter-spacing: 0.5px;
}
.trends-summary-raw {
  margin-top: 18px;
  font-size: 1.05rem;
  color: #888;
  background: #fffbe7;
  border-radius: 12px;
  padding: 12px 18px;
  box-shadow: 0 1px 4px #ffb30022;
  text-align: left;
  max-height: 180px;
  overflow-y: auto;
  animation: fadeIn 1.2s cubic-bezier(.4,0,.2,1);
}
.global-trends-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin: 48px 0;
}
.spinner {
  width: 38px;
  height: 38px;
  border: 5px solid #ffd740;
  border-top: 5px solid #ff5252;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes popIn {
  0% { opacity: 0; transform: scale(0.7); }
  80% { opacity: 1; transform: scale(1.08); }
  100% { opacity: 1; transform: scale(1); }
}
.animated-fadein { animation: fadeIn 1.2s cubic-bezier(.4,0,.2,1); }
.animated-pop { animation: popIn 0.7s cubic-bezier(.4,0,.2,1); }

.global-trends-bullets {
  list-style: decimal inside;
  margin: 18px 0 0 0;
  padding: 0 0 0 12px;
  text-align: left;
  font-size: 1.13rem;
  color: #333;
  font-weight: 500;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.trends-intro {
  font-size: 1.18rem;
  color: #222;
  margin-bottom: 14px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.2px;
  background: linear-gradient(90deg, #fffbe7 0%, #ffd74033 100%);
  border-radius: 8px;
  padding: 10px 18px;
  display: inline-block;
}

.trends-cards-list {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin: 32px 0 0 0;
}
.trend-block-card {
  background: #fffbe7;
  border-radius: 16px;
  box-shadow: 0 2px 8px #ffb30022;
  padding: 18px 24px 14px 24px;
  text-align: left;
  transition: box-shadow 0.2s, transform 0.2s;
  border-left: 6px solid #ffb300;
  animation: popIn 0.7s cubic-bezier(.4,0,.2,1);
}
.trend-block-card:hover {
  box-shadow: 0 6px 24px #ffb30033;
  transform: scale(1.03);
  background: #fff8e1;
}
.trend-block-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.trend-block-icon {
  font-size: 1.3rem;
  font-weight: 900;
  color: #ff5252;
  margin-right: 8px;
  text-shadow: 0 1px 4px #ffb30033;
}
.trend-block-title {
  font-size: 1.18rem;
  font-weight: 700;
  color: #222;
  letter-spacing: 0.2px;
}
.trend-block-explanation {
  font-size: 1.08rem;
  color: #444;
  margin-left: 2.2em;
  margin-top: 2px;
  line-height: 1.5;
}
@media (max-width: 600px) {
  .trend-block-card {
    padding: 12px 10px 10px 10px;
  }
  .trend-block-explanation {
    margin-left: 1.2em;
  }
}

#signInBtn {
  position: absolute;
  top: 18px;
  right: 84px; /* Increased space from dark mode icon */
  z-index: 10;
  padding: 0.5rem 1.2rem;
  background: #ff0000;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  transition: background 0.2s;
}
#signInBtn:hover {
  background: #c4302b;
}

/* Manual Earnings Calculator Styles */
#manualCalculatorBtn {
  position: absolute;
  top: 18px;
  left: 24px;
  z-index: 10;
  padding: 0.5rem 1.2rem;
  background: #ffd740;
  color: #222;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  transition: background 0.2s;
}
#manualCalculatorBtn:hover {
  background: #ffb300;
}
#manualCalculatorModal .modal-content.calculator-form {
  max-width: 420px;
  background: linear-gradient(120deg, #fffbe7 0%, #fff8e1 100%);
  border-radius: 16px;
  box-shadow: 0 4px 32px #ffb30033;
  padding: 32px 28px 24px 28px;
  margin: 0 auto;
  position: relative;
  animation: fadeIn 0.7s cubic-bezier(.4,0,.2,1);
}
#manualCalculatorModal .close-modal {
  position: absolute;
  top: 12px;
  right: 18px;
  font-size: 2rem;
  color: #888;
  cursor: pointer;
  background: none;
  border: none;
}
.calculator-form h2 {
  text-align: center;
  color: #c4302b;
  margin-bottom: 18px;
}
.calculator-row {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}
.calculator-row label {
  font-weight: 600;
  color: #c4302b;
  margin-bottom: 4px;
}
.calculator-row input,
.calculator-row select {
  padding: 10px 12px;
  border: 1.5px solid #ffd740;
  border-radius: 6px;
  font-size: 1rem;
  background: #fff;
  color: #222;
  transition: border 0.2s;
}
.calculator-row input:focus,
.calculator-row select:focus {
  border: 1.5px solid #ffb300;
  outline: none;
}
#calculateEarningsBtn {
  width: 100%;
  padding: 12px 0;
  background: linear-gradient(90deg, #ffd740 0%, #ff5252 100%);
  color: #222;
  font-weight: 700;
  border: none;
  border-radius: 6px;
  font-size: 1.1rem;
  margin-top: 8px;
  cursor: pointer;
  transition: background 0.2s;
}
#calculateEarningsBtn:hover {
  background: linear-gradient(90deg, #ffb300 0%, #c4302b 100%);
  color: #fff;
}
.earnings-result {
  margin-top: 22px;
  background: linear-gradient(90deg, #fffbe7 0%, #ffd74033 100%);
  border-radius: 10px;
  padding: 18px 14px 10px 14px;
  box-shadow: 0 2px 8px #ffb30022;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}
.earnings-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.13rem;
  font-weight: 600;
}
.earnings-label {
  color: #c4302b;
  min-width: 160px;
  display: inline-block;
}
.earnings-value {
  font-size: 1.18rem;
  font-weight: 700;
  color: #388e3c;
  background: linear-gradient(90deg, #ffd740 0%, #fffbe7 100%);
  border-radius: 4px;
  padding: 2px 10px;
  margin-left: 4px;
}
.earnings-value:empty {
  display: none;
}
.earnings-note {
  font-size: 0.98rem;
  color: #888;
  margin-top: 10px;
  background: none;
}
@media (max-width: 600px) {
  #manualCalculatorModal .modal-content.calculator-form {
    max-width: 98vw;
    padding: 18px 6vw 16px 6vw;
  }
  .earnings-label { min-width: 110px; }
}
body.dark-mode #manualCalculatorModal .modal-content.calculator-form {
  background: #232323;
  color: #eee;
}
body.dark-mode .calculator-row input,
body.dark-mode .calculator-row select {
  background: #181818;
  color: #eee;
  border: 1.5px solid #444;
}
body.dark-mode .earnings-result {
  background: linear-gradient(90deg, #232323 0%, #444 100%);
  color: #eee;
}
body.dark-mode .earnings-label { color: #ffd740; }
body.dark-mode .earnings-value { color: #ffd740; background: #232323; }
body.dark-mode .earnings-note { color: #bbb; }
