/* --- BRAND VARIABLES --- */
:root {
  --bg-dark: #222222;
  --brand-blue: #3454D1;
  --brand-sage: #9BC1BC;
  --text-cream: #E6EBE0;
  --font-title: 'Pacifico', cursive;
  --font-text: 'Montserrat', sans-serif;

  /* Modern Glass Effect Vars */
  --glass-bg: rgba(20, 20, 20, 0.6);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: 20px;

  /* Platform Brand Colors */
  --c-spotify: #1DB954;
  --c-apple: #FA243C;
  --c-youtube: #FF0000;
  --c-amazon: #00A8E1;
  --c-soundcloud: #FF5500;
  --c-tidal: #FFFFFF;
}

/* --- RESET & BASE --- */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background-color: var(--bg-dark);
  color: var(--text-cream);
  font-family: var(--font-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Canvas sits behind everything */
#canvas-bg {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1;
  background: radial-gradient(circle at center, transparent 0%, #222 100%);
}

/* --- LAYOUT --- */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1rem;
  z-index: 1;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  animation: smoothFadeIn 1s ease-out forwards;
}

header { text-align: center; margin-bottom: 3rem; }

.logo-link {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  margin-bottom: 1rem;
}
.logo-link:hover { transform: scale(1.05); }

.logo-img {
  width: 160px;
  height: auto;
  filter: drop-shadow(0 4px 20px rgba(0,0,0,0.6));
}

h1 {
  font-family: var(--font-title);
  font-size: clamp(2rem, 5vw, 3.5rem);
  background: linear-gradient(to right, #fff, var(--brand-sage));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 2px 10px rgba(0,0,0,0.3));
}
header p { color: var(--brand-sage); font-size: 1rem; letter-spacing: 0.5px; opacity: 0.8; }

/* --- CALCULATOR INPUT CARD --- */
.calculator-wrapper {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(var(--glass-blur));
  padding: 3rem;
  border-radius: 24px;
  width: 100%;
  max-width: 700px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  margin-bottom: 3rem;
  text-align: center;
  transition: transform 0.3s;
  position: relative;
}

/* Input Styling */
.input-group label {
  display: block; font-weight: 700; color: var(--brand-sage);
  font-size: 0.85rem; text-transform: uppercase; letter-spacing: 3px;
  margin-bottom: 1.5rem;
}

.plays-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 2px solid rgba(255,255,255,0.2);
  padding: 0.5rem;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-family: var(--font-text);
  color: white;
  text-align: center;
  font-weight: 700;
  outline: none;
  transition: all 0.3s ease;
  font-feature-settings: "tnum";
}
.plays-input:focus {
  border-bottom-color: var(--brand-blue);
  text-shadow: 0 0 30px rgba(52, 84, 209, 0.4);
}
.plays-input::placeholder { color: rgba(255,255,255,0.05); }
.plays-input::-webkit-outer-spin-button, .plays-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.plays-input { -moz-appearance: textfield; }

/* Warning Text (Hidden by default) */
#limit-warning {
  color: var(--c-apple);
  font-size: 0.8rem;
  margin-top: 10px;
  opacity: 0;
  transition: opacity 0.3s;
  font-weight: 600;
}

/* Currency Toggles */
.currency-row {
  display: flex; justify-content: center; gap: 0.5rem; margin-top: 2rem;
  background: rgba(0,0,0,0.2); padding: 0.4rem; border-radius: 50px;
  display: inline-flex;
}

.currency-btn {
  background: transparent; border: none;
  color: rgba(255,255,255,0.4); padding: 0.6rem 1.5rem;
  border-radius: 40px; cursor: pointer;
  font-family: var(--font-text); font-weight: 700; font-size: 0.9rem;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.currency-btn:hover { color: white; }
.currency-btn.active { background: var(--brand-blue); color: white; box-shadow: 0 2px 15px rgba(52, 84, 209, 0.4); }

/* --- RESULTS GRID --- */
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  width: 100%;
  max-width: 1200px;
  margin-bottom: 3rem;
}

.result-card {
  background: linear-gradient(145deg, rgba(40,40,40,0.6), rgba(30,30,30,0.8));
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 16px;
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
}
.result-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
  border-color: rgba(255,255,255,0.15);
}
.result-card::after {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--accent); box-shadow: 0 0 15px var(--accent);
}

.platform-info { display: flex; flex-direction: column; gap: 4px; }
.platform-name { font-size: 1.2rem; font-weight: 700; color: white; display: flex; align-items: center; gap: 8px; }
.rate-mini { font-size: 0.75rem; opacity: 0.4; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

.earnings-val {
  font-size: 2rem; font-weight: 700; color: var(--text-cream);
  font-feature-settings: "tnum"; text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* --- DISCLAIMER --- */
.disclaimer-box {
  padding: 2rem; text-align: center; font-size: 0.8rem; line-height: 1.6;
  color: rgba(230, 235, 224, 0.5); max-width: 900px;
  border-top: 1px solid rgba(255,255,255,0.05); margin-top: auto;
}
.date-badge {
  display: inline-block; background: rgba(52, 84, 209, 0.2);
  padding: 4px 10px; border-radius: 4px; color: #fff;
  font-size: 0.7rem; font-weight: 700; margin-bottom: 1rem;
  border: 1px solid rgba(52, 84, 209, 0.3);
}

footer { width: 100%; text-align: center; padding: 2rem; font-size: 0.85rem; opacity: 0.6; }
.footer-link { color: var(--brand-blue); text-decoration: none; font-weight: 600; }

@keyframes smoothFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 600px) {
  .calculator-wrapper { padding: 2rem 1rem; }
  .plays-input { font-size: 2.2rem; }
  .result-card { flex-direction: column; text-align: center; gap: 1rem; padding: 1.5rem; }
  .result-card::after { width: 100%; height: 4px; left: 0; top: 0; bottom: auto; }
  .platform-info { align-items: center; }
}
