/* =========================================================
   NOVASIM MANUFACTURING - PROVOCAREA PRECIZIEI 21K
   Stiluri moderne, paletă de brand: Portocaliu & Albastru Deschis
   Design tehnic de precizie CNC + Dinamism Alergare
   ========================================================= */

:root {
  --novasim-orange: #FF6600;
  --novasim-orange-hover: #E65500;
  --novasim-orange-glow: rgba(255, 102, 0, 0.25);
  
  --novasim-blue: #00AEEF;
  --novasim-blue-dark: #0078A6;
  --novasim-blue-light: #E1F5FE;
  --novasim-blue-glow: rgba(0, 174, 239, 0.2);

  --bg-main: #0B0F19;
  --bg-card: #151D2F;
  --bg-card-hover: #1A243B;
  --bg-input: #0F1626;

  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --text-dim: #64748B;

  --border-card: rgba(255, 255, 255, 0.08);
  --border-focus: #00AEEF;
  
  --success: #10B981;
  --error: #EF4444;
  --gold: #F59E0B;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font);
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  background-image: linear-gradient(rgba(11, 15, 25, 0.75), rgba(11, 15, 25, 0.85)), url('/assets/bg.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
}

/* Layout container */
.container {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 20px 16px 40px 16px;
  flex: 1;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 24px;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 174, 239, 0.12);
  border: 1px solid rgba(0, 174, 239, 0.3);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--novasim-blue);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.brand-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
}

.logo-text {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #FFFFFF;
}

.logo-text span {
  color: var(--novasim-orange);
}

.logo-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-title {
  font-size: 2rem;
  font-weight: 800;
  margin: 16px 0 8px;
  line-height: 1.2;
  background: linear-gradient(135deg, #FFFFFF 40%, var(--novasim-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 16px;
}

/* Prize Showcase Card */
.prize-card {
  background: linear-gradient(145deg, rgba(255, 102, 0, 0.12) 0%, rgba(21, 29, 47, 0.7) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 102, 0, 0.3);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.prize-icon-wrap {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--novasim-orange) 0%, #FF8008 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px var(--novasim-orange-glow);
}

.prize-icon-wrap svg {
  width: 28px;
  height: 28px;
  fill: #FFFFFF;
}

.prize-info h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 3px;
}

.prize-info p {
  font-size: 0.82rem;
  color: #CBD5E1;
  line-height: 1.4;
}

/* Status / Countdown Ticker */
.countdown-box {
  background: rgba(21, 29, 47, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  font-size: 0.85rem;
}

.countdown-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--novasim-orange);
  border-radius: 50%;
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.8; box-shadow: 0 0 0 0 rgba(255, 102, 0, 0.7); }
  70% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 0 8px rgba(255, 102, 0, 0); }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.countdown-val {
  font-family: monospace;
  font-weight: 700;
  color: var(--novasim-blue);
  font-size: 0.95rem;
}

/* Card Form */
.main-card {
  background: rgba(21, 29, 47, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
}

.card-decor-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--novasim-blue) 0%, var(--novasim-orange) 100%);
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: #E2E8F0;
  margin-bottom: 6px;
}

.form-hint {
  font-size: 0.76rem;
  color: var(--text-dim);
  margin-top: 4px;
}

.input-field {
  width: 100%;
  background: var(--bg-input);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 1rem;
  color: #FFFFFF;
  font-family: inherit;
  transition: all 0.2s ease;
  outline: none;
}

.input-field:focus {
  border-color: var(--novasim-blue);
  box-shadow: 0 0 0 3px var(--novasim-blue-glow);
  background: #131D31;
}

.input-field::placeholder {
  color: #475569;
}

/* Precision Time Selector */
.time-selector-card {
  background: rgba(15, 22, 38, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1.5px solid rgba(0, 174, 239, 0.3);
  border-radius: var(--radius-md);
  padding: 18px 16px;
  text-align: center;
  margin-top: 8px;
}

.time-preview-badge {
  display: inline-block;
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--novasim-orange);
  background: rgba(255, 102, 0, 0.1);
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(255, 102, 0, 0.4);
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.time-inputs-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 6px;
}

.time-col {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.time-col label {
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.time-select-input {
  width: 100%;
  max-width: 75px;
  text-align: center;
  text-align-last: center; /* Pentru Firefox */
  font-size: 1.25rem;
  font-weight: 700;
  padding: 10px 4px;
  background: rgba(21, 29, 47, 0.8);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  color: #FFFFFF;
  outline: none;
  font-family: monospace;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.time-select-input:focus {
  border-color: var(--novasim-orange);
  box-shadow: 0 0 0 3px var(--novasim-orange-glow);
}

.time-colon {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-dim);
  padding-top: 18px;
}

.time-dot {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--novasim-orange);
  padding-top: 18px;
}

.time-tenths-col input {
  border-color: rgba(255, 102, 0, 0.4);
  color: var(--novasim-orange);
}

/* One-Time Warning Box */
.warning-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin: 22px 0;
  font-size: 0.82rem;
  color: #FCA5A5;
}

.warning-box svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  fill: #EF4444;
  margin-top: 1px;
}

/* Submit Button */
.btn-submit {
  width: 100%;
  background: linear-gradient(135deg, var(--novasim-orange) 0%, #FF851A 100%);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 6px 20px var(--novasim-orange-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-submit:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--novasim-orange-hover) 0%, var(--novasim-orange) 100%);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(255, 102, 0, 0.4);
}

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

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

/* Confirmation / Success Screen */
.success-card {
  text-align: center;
  padding: 30px 16px;
}

.success-badge-icon {
  width: 72px;
  height: 72px;
  background: rgba(16, 185, 129, 0.15);
  border: 2px solid var(--success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.success-badge-icon svg {
  width: 40px;
  height: 40px;
  fill: var(--success);
}

.success-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 8px;
}

.ticket-box {
  background: rgba(15, 22, 38, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 20px;
  margin: 24px auto;
  max-width: 440px;
  text-align: left;
  position: relative;
}

.ticket-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
}

.ticket-row:last-child {
  border-bottom: none;
}

.ticket-label {
  color: var(--text-muted);
}

.ticket-val {
  font-weight: 700;
  color: #FFFFFF;
}

.ticket-val.time {
  font-family: monospace;
  font-size: 1.25rem;
  color: var(--novasim-orange);
}

/* Alert Notification */
.alert-toast {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  margin-bottom: 18px;
  display: none;
}

.alert-toast.error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #FCA5A5;
  display: block;
}

/* Leaderboard Page Styles */
.podium-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 12px;
  margin: 32px 0 28px;
}

.podium-item {
  flex: 1;
  max-width: 180px;
  text-align: center;
  background: rgba(21, 29, 47, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 16px 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  position: relative;
}

.podium-item.first {
  order: 2;
  transform: translateY(-12px);
  border-color: rgba(245, 158, 11, 0.4);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.12) 0%, rgba(21, 29, 47, 0.7) 100%);
}

.podium-item.second {
  order: 1;
}

.podium-item.third {
  order: 3;
}

.rank-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  margin: -30px auto 10px;
}

.podium-item.first .rank-badge {
  background: var(--gold);
  color: #000000;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.6);
}

.podium-item.second .rank-badge {
  background: #CBD5E1;
  color: #000000;
}

.podium-item.third .rank-badge {
  background: #B45309;
  color: #FFFFFF;
}

.leaderboard-table-wrap {
  background: rgba(21, 29, 47, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  overflow-x: auto;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.table-custom {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.table-custom th {
  background: #111726;
  padding: 14px 16px;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 700;
  border-bottom: 1px solid var(--border-card);
}

.table-custom td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #CBD5E1;
}

.table-custom tr:hover td {
  background: var(--bg-card-hover);
}

.delta-tag {
  font-family: monospace;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.85rem;
}

.delta-tag.exact {
  background: rgba(16, 185, 129, 0.2);
  color: #34D399;
}

.delta-tag.close {
  background: rgba(0, 174, 239, 0.2);
  color: var(--novasim-blue);
}

/* Footer */
.footer {
  text-align: center;
  padding: 24px 16px;
  font-size: 0.8rem;
  color: var(--text-dim);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer a {
  color: var(--novasim-orange);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 480px) {
  .hero-title {
    font-size: 1.6rem;
  }

  .main-card {
    padding: 20px 16px;
  }

  .time-select-input {
    max-width: 60px;
    font-size: 1.1rem;
    padding: 8px 2px;
  }

  .time-preview-badge {
    font-size: 1.5rem;
    letter-spacing: 1px;
  }

  .podium-wrap {
    flex-direction: column;
    align-items: stretch;
  }

  .podium-item.first {
    order: 1;
    transform: none;
    max-width: none;
  }

  .podium-item.second {
    order: 2;
    max-width: none;
  }

  .podium-item.third {
    order: 3;
    max-width: none;
  }

  .rank-badge {
    margin: 0 auto 10px;
  }
}
