:root {
  --bs-yellow: #f8d316;
  --bs-yellow-dark: #c1a30d;
  --bs-blue: #2e5bff;
  --bs-blue-dark: #1a3abb;
  --bs-red: #fe4141;
  --bs-red-dark: #c62828;
  --bs-purple: #9c27b0;
  --bs-dark: #0a0a0a;
  --bs-white: #ffffff;
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #0f0a1a;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #f8d316, #c1a30d);
  border-radius: 10px;
  border: 2px solid #0f0a1a;
}

::-webkit-scrollbar-thumb:hover {
  background: #f8d316;
}

.giveaway-page {
  background: #0f0c29;
  background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
  background-attachment: fixed;
  font-family: 'Inter', sans-serif;
  color: var(--bs-white);
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* Background Blobs */
.giveaway-page::before, .giveaway-page::after {
  content: '';
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  filter: blur(100px);
  z-index: -1;
  opacity: 0.4;
  animation: moveBlobs 25s infinite alternate;
}

.giveaway-page::before { background: var(--bs-blue); top: -50px; left: -50px; }
.giveaway-page::after { background: var(--bs-purple); bottom: -50px; right: -50px; animation-delay: -12s; }

@keyframes moveBlobs {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(150px, 150px) scale(1.2); }
}

.bs-title {
  font-family: 'Luckiest Guy', cursive;
  font-size: clamp(2.5rem, 8vw, 4rem);
  color: var(--bs-yellow);
  text-shadow: 4px 4px 0px #000, 0 0 20px rgba(248, 211, 22, 0.4);
  margin-bottom: 0.5rem;
  letter-spacing: 2px;
}

.bs-subtitle {
  font-family: 'Luckiest Guy', cursive;
  font-size: 2.2rem;
  color: var(--bs-yellow);
  text-shadow: 2px 2px 0px #000, 0 0 15px rgba(248, 211, 22, 0.4);
  margin: 10px 0;
}

#prize-desc {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  background: rgba(0,0,0,0.3);
  display: inline-block;
  padding: 8px 20px;
  border-radius: 50px;
  margin-top: 5px;
  border: 1px solid rgba(255,255,255,0.1);
}

.giveaway-main {
  padding: 40px 20px;
  max-width: 900px;
  margin: 0 auto;
}

/* Glass Card */
.hero-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 40px;
  padding: 50px 30px;
  text-align: center;
  position: relative;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  margin-top: 20px;
}

.hero-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  width: 100%;
}

.status-badge-active {
  background: var(--bs-red);
  color: white;
  padding: 8px 20px;
  border-radius: 50px;
  font-weight: 900;
  font-size: 0.75rem;
  box-shadow: 0 0 15px rgba(254, 65, 65, 0.5);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(254, 65, 65, 0.7); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(254, 65, 65, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(254, 65, 65, 0); }
}

.prize-image-wrapper {
  margin: 30px auto;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(248, 211, 22, 0.15) 0%, transparent 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.prize-image-wrapper img {
  width: 170px;
  filter: drop-shadow(0 10px 25px rgba(0,0,0,0.5));
}

.floating { animation: floating 4s ease-in-out infinite; }
@keyframes floating {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-15px) rotate(2deg); }
}

/* Countdown */
.countdown-container { margin: 30px 0; }
.countdown-label { font-weight: 900; color: #888; font-size: 0.8rem; letter-spacing: 2px; margin-bottom: 15px; }
.bs-countdown { display: flex; justify-content: center; gap: 15px; }
.time-block {
  background: rgba(0, 0, 0, 0.3);
  padding: 12px;
  border-radius: 18px;
  min-width: 80px;
  border: 1px solid rgba(255,255,255,0.05);
}
.time-block span { 
  font-family: 'Luckiest Guy', cursive; 
  font-size: clamp(1.2rem, 5vw, 2.2rem); 
  color: var(--bs-white); 
  text-shadow: 2px 2px 0px #000;
}
.time-block small { font-size: 0.6rem; font-weight: 900; color: #888; display: block; margin-top: 5px; }

/* Quest Cards */
.registration-form {
  margin-top: 40px;
  background: rgba(0, 0, 0, 0.15);
  padding: 30px;
  border-radius: 35px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.registration-form h3 {
  font-family: 'Luckiest Guy', cursive;
  font-size: 1.8rem;
  color: var(--bs-white);
  text-shadow: 2px 2px 0px #000;
  margin-bottom: 25px;
  letter-spacing: 1px;
}

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

.condition-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 2px solid rgba(255, 255, 255, 0.05);
  padding: 30px 15px;
  border-radius: 25px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.condition-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
  opacity: 0;
  transition: 0.3s;
}

.condition-btn:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
}

.condition-btn:hover::before { opacity: 1; }

.condition-btn i:first-child,
.condition-btn img {
  font-size: 3.5rem;
  width: 55px; /* Za slike */
  height: 55px; /* Za slike */
  object-fit: contain;
  filter: drop-shadow(0 5px 15px rgba(0,0,0,0.3));
  transition: 0.3s;
  display: block;
  margin-bottom: 10px;
}

.condition-btn:hover i:first-child,
.condition-btn:hover img { 
  transform: scale(1.15) rotate(5deg); 
}

.condition-btn span {
  font-family: 'Luckiest Guy', cursive;
  font-size: 1.1rem;
  letter-spacing: 1px;
  color: #ddd;
  text-align: center;
}

/* Completed State */
.condition-btn.completed {
  background: rgba(83, 252, 24, 0.08);
  border-color: #53fc18;
  pointer-events: none;
}

.condition-btn.completed span { color: #53fc18; }
.condition-btn.completed i:first-child { opacity: 0.5; filter: grayscale(0.5); }

.check-icon {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(1.2);
  transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 2;
}

.check-icon i {
  font-size: 4rem !important;
  color: #53fc18;
  filter: drop-shadow(0 0 20px #53fc18);
}

.condition-btn.completed .check-icon {
  opacity: 1;
  transform: scale(1);
}

/* Form Styling */
.input-wrapper {
  max-width: 500px;
  margin: 30px auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

/* Buttons */
.bs-button {
  font-family: 'Luckiest Guy', cursive;
  padding: 18px 45px;
  border-radius: 20px;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  transition: 0.2s;
  text-transform: uppercase;
  margin-top: 30px;
  text-shadow: 2px 2px 0px rgba(0,0,0,0.3);
}

.bs-button.yellow {
  background: linear-gradient(to bottom, #f8d316, #c1a30d);
  color: #4b3e00;
  border-bottom: 6px solid #8a7400;
  box-shadow: 0 10px 25px rgba(248, 211, 22, 0.3);
}

.bs-button.yellow:hover { transform: translateY(-3px); filter: brightness(1.1); }
.bs-button:active { transform: translateY(4px); border-bottom-width: 2px; }

.bs-button.red {
  background: linear-gradient(to bottom, #fe4141, #c62828);
  color: white;
  border-bottom: 6px solid #8b1818;
  font-size: 2.5rem;
  padding: 25px 60px;
}

.bs-button.purple {
  background: linear-gradient(to bottom, #7360f2, #503bb1);
  color: white;
  border-bottom: 6px solid #3c2a91;
  font-size: 1.2rem;
  padding: 15px 30px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.winner-instructions {
  margin: 30px 0;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.1);
}

.winner-instructions p {
  margin-bottom: 20px;
  font-weight: 700;
  color: #ddd;
}

.viber-reminder {
  margin-top: 30px;
  background: rgba(115, 96, 242, 0.15);
  border: 2px solid rgba(115, 96, 242, 0.4);
  border-radius: 20px;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  animation: slideInUp 0.5s ease-out;
}

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

.viber-content img {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,0.3));
}

.viber-content p {
  font-family: 'Luckiest Guy', cursive;
  font-size: 0.9rem;
  color: #fff;
  text-align: left;
  line-height: 1;
  margin: 4px 0 0 0; /* Slight top margin to align with Luckiest Guy font baseline */
}

.viber-link-btn {
  background: #7360f2;
  color: white;
  font-family: 'Luckiest Guy', cursive;
  padding: 8px 15px;
  border-radius: 12px;
  text-decoration: none;
  font-size: 0.8rem;
  transition: 0.3s;
  white-space: nowrap;
  border-bottom: 3px solid #503bb1;
}

.viber-link-btn:hover {
  transform: scale(1.05);
  background: #8474f5;
}

.battle-alert {
  font-family: 'Luckiest Guy', cursive;
  font-size: 2.5rem;
  color: var(--bs-red);
  margin-bottom: 25px;
  text-shadow: 2px 2px 0 #000, 0 0 20px rgba(254, 65, 65, 0.4);
  animation: shake 0.6s infinite;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px) rotate(-1deg); }
  75% { transform: translateX(4px) rotate(1deg); }
}

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 40px; }
.stat-card {
  background: rgba(255,255,255,0.04);
  padding: 20px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  gap: 15px;
}
.stat-card i { font-size: 1.8rem; color: var(--bs-yellow); }
.stat-info span { font-weight: 900; font-size: 1.8rem; line-height: 1; }
.stat-info small { font-size: 0.65rem; color: #888; font-weight: 700; letter-spacing: 1px; }

.hidden { display: none !important; }

.msg {
  margin-top: 25px;
  font-family: 'Luckiest Guy', cursive;
  font-size: 1.3rem;
  padding: 15px 25px;
  border-radius: 15px;
  display: inline-block;
  letter-spacing: 1px;
  animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
  border: 2px solid rgba(255,255,255,0.1);
}

.msg:empty {
  display: none;
}

@keyframes popIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.msg.success {
  background: linear-gradient(135deg, #11998e, #38ef7d);
  color: white;
  border-color: #53fc18;
  text-shadow: 2px 2px 0 rgba(0,0,0,0.2);
}

.msg.error {
  background: linear-gradient(135deg, #cb2d3e, #ef473a);
  color: white;
  border-color: #ff5252;
  text-shadow: 2px 2px 0 rgba(0,0,0,0.2);
}

/* FULL MOBILE OPTIMIZATION - FINAL FIX */
@media (max-width: 768px) {
  .hero-card { padding: 25px 15px; border-radius: 25px; }
  .bs-title { font-size: 2.2rem; }
  .bs-subtitle { font-size: 1.1rem; }
  
  .bs-countdown { gap: 8px; }
  .time-block { min-width: 55px; padding: 10px 5px; border-radius: 15px; }
  .time-block span { font-size: 1.4rem; }
  
  .conditions-grid { grid-template-columns: 1fr; gap: 10px; }
  
  /* Overlays Fix */
  .fs-number { font-size: 25vw; line-height: 1; }
  .fs-label { font-size: 2rem; margin-top: 10px; letter-spacing: 2px; }
  .fs-title { font-size: 10vw; margin: 0 0 30px 0; padding: 0 15px; line-height: 1.1; width: 100%; }
  
  #fs-claim-btn { 
    font-size: 7vw !important; 
    padding: 25px 20px !important; 
    width: 90vw !important; 
    margin: 0 auto !important;
    white-space: normal !important; 
    line-height: 1.2 !important;
    border-radius: 25px !important;
    max-width: 500px;
  }
}

@media (max-width: 480px) {
  .viber-reminder { margin-top: 20px; padding: 12px; }
  .viber-content p { font-size: 0.75rem; }
  .time-block { min-width: 50px; padding: 8px 4px; }
  .time-block span { font-size: 1.2rem; }
  
  /* OVERLAYS - ATOMIC MOBILE FIX */
  .fs-number { font-size: 22vw; }
  .fs-label { font-size: 1.2rem; margin-top: -10px; }
  
  .fs-title { 
    font-size: 2.2rem !important; 
    width: 95% !important;
    margin: 0 auto 30px !important;
    line-height: 1.1 !important;
  }

  #fs-claim-btn { 
    font-size: 1.6rem !important;
    width: 92% !important;
    max-width: 320px !important;
    height: auto !important;
    min-height: 90px !important;
    padding: 20px 15px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    white-space: nowrap !important;
    line-height: 1.1 !important;
    border-radius: 20px !important;
    box-shadow: 0 15px 30px rgba(254, 65, 65, 0.4) !important;
  }

  .desktop-text { display: none !important; }

  .qr-container { padding: 25px 20px; width: 90%; }
  .qr-frame img { width: 180px; height: 180px; }
}

.late-msg {
  font-family: 'Luckiest Guy', cursive;
  font-size: 1.2rem;
  color: #fff;
  text-shadow: 2px 2px 0 #000;
  margin-top: 10px;
  animation: fadeIn 0.5s ease-out;
}

/* List Sections */
.giveaway-list-section {
  margin-top: 80px;
  padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.section-title {
  font-family: 'Luckiest Guy', cursive;
  font-size: 2rem;
  color: var(--bs-yellow);
  text-align: center;
  margin-bottom: 30px;
  text-shadow: 3px 3px 0 #000;
}

.giveaway-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
}

.giveaway-item {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 30px;
  padding: 25px;
  text-align: center;
  transition: 0.3s;
  position: relative;
  overflow: hidden;
}

.giveaway-item:hover {
  transform: translateY(-10px);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--bs-yellow);
}

.giveaway-item img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 15px;
  filter: drop-shadow(0 5px 15px rgba(0,0,0,0.4));
}

.giveaway-item h3 {
  font-family: 'Luckiest Guy', cursive;
  font-size: 1.4rem;
  margin-bottom: 10px;
  color: #fff;
}

.giveaway-item .status-badge {
  font-size: 0.7rem;
  font-weight: 900;
  padding: 5px 15px;
  border-radius: 50px;
  text-transform: uppercase;
  margin-top: 10px;
  display: inline-block;
}

.status-badge.history { background: rgba(255,255,255,0.1); color: #888; }
.status-badge.active { background: var(--bs-red); color: #fff; }

.giveaway-item .date {
  font-size: 0.8rem;
  color: #aaa;
  margin-top: 10px;
  font-weight: 700;
}

/* Intense Mode - Zadnjih 10 sekundi */
.intense-mode::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  box-shadow: inset 0 0 150px rgba(254, 65, 65, 0.5);
  pointer-events: none;
  z-index: 9999;
  animation: redPulse 0.5s infinite alternate;
}

.intense-mode .hero-card {
  animation: shake 0.2s infinite;
  border-color: #fe4141;
  box-shadow: 0 0 50px rgba(254, 65, 65, 0.4);
}

.intense-mode #seconds {
  color: #fe4141;
  text-shadow: 0 0 15px #fe4141;
  transform: scale(1.2);
  display: inline-block;
  animation: vibrate 0.1s infinite;
}

@keyframes redPulse {
  from { opacity: 0.3; }
  to { opacity: 1; }
}

@keyframes shake {
  0% { transform: translate(1px, 1px) rotate(0deg); }
  10% { transform: translate(-1px, -2px) rotate(-1deg); }
  20% { transform: translate(-3px, 0px) rotate(1deg); }
  30% { transform: translate(3px, 2px) rotate(0deg); }
  40% { transform: translate(1px, -1px) rotate(1deg); }
  50% { transform: translate(-1px, 2px) rotate(-1deg); }
  60% { transform: translate(-3px, 1px) rotate(0deg); }
  70% { transform: translate(3px, 1px) rotate(-1deg); }
  80% { transform: translate(-1px, -1px) rotate(1deg); }
  90% { transform: translate(1px, 2px) rotate(0deg); }
  100% { transform: translate(1px, -2px) rotate(-1deg); }
}

@keyframes vibrate {
  0% { transform: scale(1.2) translate(0); }
  25% { transform: scale(1.2) translate(2px, 2px); }
  50% { transform: scale(1.2) translate(-2px, -2px); }
  75% { transform: scale(1.2) translate(2px, -2px); }
  100% { transform: scale(1.2) translate(0); }
}

/* Fullscreen Overlays */
.fs-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.98);
  z-index: 10000;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
}

.fs-overlay.hidden { display: none; }

.fs-number {
  font-family: 'Luckiest Guy', cursive;
  font-size: 30rem;
  color: #fe4141;
  text-shadow: 0 0 50px rgba(254, 65, 65, 0.8), 0 0 100px rgba(254, 65, 65, 0.4);
  line-height: 1;
  margin: 0;
  animation: zoomAndVibrate 1s infinite cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.fs-label {
  font-family: 'Luckiest Guy', cursive;
  font-size: 4rem;
  color: #fff;
  letter-spacing: 5px;
  margin-top: 10px;
  text-shadow: 2px 2px 0 #000;
}

.fs-claim-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: epicEntry 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.fs-title {
  font-family: 'Luckiest Guy', cursive;
  font-size: 6rem;
  color: var(--bs-yellow);
  text-shadow: 5px 5px 0 #000;
  margin: 0 0 40px 0;
  width: 100%;
  text-align: center;
}

#fs-claim-btn {
  font-size: 5rem !important;
  padding: 40px 100px !important;
}

.big-pulse {
  animation: bigPulse 0.5s infinite alternate;
}

@keyframes zoomAndVibrate {
  0% { transform: scale(0.3); opacity: 0; filter: blur(10px); }
  30% { transform: scale(1.3) rotate(5deg); opacity: 1; filter: blur(0); }
  50% { transform: scale(1.1) rotate(-5deg); }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes bigPulse {
  from { transform: scale(1); box-shadow: 0 0 50px rgba(254, 65, 65, 0.5); }
  to { transform: scale(1.15); box-shadow: 0 0 150px rgba(254, 65, 65, 1); }
}

@keyframes epicEntry {
  from { transform: scale(0) rotate(720deg); opacity: 0; }
  to { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* QR & Share */
.share-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 8px 15px;
  border-radius: 12px;
  font-family: 'Luckiest Guy', cursive;
  font-size: 0.9rem;
  cursor: pointer;
  transition: 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.share-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.qr-container {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(25px);
  border: 2px solid rgba(255, 255, 255, 0.1);
  padding: 40px;
  border-radius: 40px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  animation: epicEntry 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.qr-frame {
  background: white;
  padding: 15px;
  border-radius: 20px;
  margin: 20px 0;
  display: inline-block;
}

.qr-frame img {
  display: block;
}
