/*
Theme Name: Ysivitonen Casino Affiliate
Theme URI: https://ysivitonen.com
Author: Steven
Description: A casino affiliate theme with custom post types, drag-and-drop reordering, and options page.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: ysivitonen
*/

:root {
  --bg-start: #2b0a5c;
  --bg-end: #b12684;
  --card: #18062f;
  --card-2: #230c47;
  --text: #f7eaff;
  --muted: #ccb6e6;
  --accent: #ff5bbd;
  --accent-2: #ffa83a;
  --shadow: 0 20px 40px rgba(0,0,0,.35), 0 8px 24px rgba(177,38,132,.25);
}

* { 
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box; 
}
html { 
  height: 100%; 
  margin: 0; 
  padding: 0;
}
body { 
  min-height: 100%; 
  margin: 0; 
  padding: 0;
}

@-webkit-keyframes floatLeft {
  0%, 100% { -webkit-transform: translateY(0); transform: translateY(0); }
  50% { -webkit-transform: translateY(-20px); transform: translateY(-20px); }
}
@keyframes floatLeft {
  0%, 100% { -webkit-transform: translateY(0); transform: translateY(0); }
  50% { -webkit-transform: translateY(-20px); transform: translateY(-20px); }
}

@-webkit-keyframes floatRight {
  0%, 100% { -webkit-transform: translateY(0); transform: translateY(0); }
  50% { -webkit-transform: translateY(20px); transform: translateY(20px); }
}
@keyframes floatRight {
  0%, 100% { -webkit-transform: translateY(0); transform: translateY(0); }
  50% { -webkit-transform: translateY(20px); transform: translateY(20px); }
}

@-webkit-keyframes marquee {
  0% { -webkit-transform: translateX(0); transform: translateX(0); }
  100% { -webkit-transform: translateX(-50%); transform: translateX(-50%); }
}
@keyframes marquee {
  0% { -webkit-transform: translateX(0); transform: translateX(0); }
  100% { -webkit-transform: translateX(-50%); transform: translateX(-50%); }
}

.marquee-banner {
  display: block;
  background: #ffc63b;
  padding: 12px 0;
  overflow: hidden;
  position: relative;
  z-index: 100;
  border-bottom: 2px solid #ff9500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  text-decoration: none;
  cursor: pointer;
  -webkit-transition: background .3s ease;
  transition: background .3s ease;
}

.marquee-banner:hover {
  background: #ffb020;
}

.marquee-track {
  display: flex;
  width: max-content;
  -webkit-animation: marquee 30s linear infinite;
  animation: marquee 30s linear infinite;
}

.marquee-content {
  display: flex;
  flex-shrink: 0;
}

.marquee-content span {
  display: inline-block;
  padding: 0 60px;
  font-weight: 900;
  font-size: 16px;
  color: #1e0c35;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
  white-space: nowrap;
}

body {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial;
  color: var(--text);
  background-color: #2b0a5c;
  background-image: -webkit-gradient(linear, left bottom, right top, from(#2b0a5c), to(#b12684));
  background-image: -webkit-linear-gradient(225deg, #2b0a5c, #b12684);
  background-image: -moz-linear-gradient(225deg, #2b0a5c, #b12684);
  background-image: -o-linear-gradient(225deg, #2b0a5c, #b12684);
  background-image: linear-gradient(135deg, #2b0a5c, #b12684);
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: cover;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  min-height: 100%;
  background: rgba(0, 0, 0, 0.4);
  pointer-events: none;
  z-index: -2;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.bg-left {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 40%;
  height: 100vh;
  background-position: left bottom;
  background-repeat: no-repeat;
  background-size: contain;
  z-index: -1;
  -webkit-animation: floatLeft 6s ease-in-out infinite;
  animation: floatLeft 6s ease-in-out infinite;
  opacity: 0.7;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  will-change: transform;
  pointer-events: none;
}

.bg-right {
  position: fixed;
  right: 0;
  top: 0;
  width: 40%;
  height: 100vh;
  background-position: right top;
  background-repeat: no-repeat;
  background-size: contain;
  z-index: -1;
  -webkit-animation: floatRight 6s ease-in-out infinite;
  animation: floatRight 6s ease-in-out infinite;
  opacity: 0.7;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  will-change: transform;
  pointer-events: none;
}

.wrap { 
  max-width: 1140px; 
  margin: 0 auto; 
  padding: 0 20px 40px; 
  position: relative; 
  z-index: 1;
}

header { display: flex; align-items: center; justify-content: center; padding: 20px 0 0; }
.logo { width: 100%; text-align: center; }
.logo img { width: 100%; max-width: 600px; height: auto; display: inline-block; filter: drop-shadow(0 6px 16px rgba(0,0,0,.35)); }

.hero { text-align: center; margin-top: -20px; padding-bottom: 70px; }
.hero h2 { font-size: clamp(28px, 5vw, 44px); line-height: 1.1; margin: 8px 0 10px; text-shadow: 0 3px 14px rgba(0,0,0,0.6); }

.hero-bottom { 
  text-align: center; 
  margin-top: 0; 
  padding: 0 0 40px;
}

.hero-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin: 0 auto;
}

.hero-card {
  background: var(--card);
  background: -webkit-linear-gradient(top, var(--card-2), var(--card));
  background: -moz-linear-gradient(top, var(--card-2), var(--card));
  background: -o-linear-gradient(top, var(--card-2), var(--card));
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid #ffc63b;
  border-radius: 22px;
  padding: 32px 28px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  min-height: 280px;
}

.hero-card > p {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-card p {
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
  margin: 0;
  text-align: center;
}

.hero-card-title {
  font-weight: 900;
  font-size: 18px;
  color: #ffc63b !important;
  margin-bottom: 8px !important;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 32px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 800;
  font-size: 18px;
  -webkit-transition: -webkit-transform .15s ease, box-shadow .15s ease;
  transition: transform .15s ease, box-shadow .15s ease;
  box-shadow: 0 6px 16px rgba(0,0,0,.4);
  width: 100%;
  max-width: 100%;
}

.hero-btn:hover {
  -webkit-transform: translateY(-3px);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,.5);
}

.hero-btn svg {
  width: 28px;
  height: 28px;
}

/* Default card button colors (will be overridden by dynamic CSS) */
.card1-btn {
  background: #53FC18;
  color: #000;
  border: 1px solid #45D013;
}

.card2-btn {
  background: #5865F2;
  color: #fff;
  border: 1px solid #4752C4;
}

/* Embed Section */
.embed-section {
  padding: 0 0 40px;
}
.embed-container {
  background: rgba(0,0,0,0.2);
  border-radius: 18px;
  padding: 20px;
  overflow: hidden;
}
.embed-container iframe {
  max-width: 100%;
  border-radius: 12px;
  display: block;
}

/* Xmas Calendar */
.xmas-calendar {
  padding: 0 0 40px;
}

/* Extra padding when xmas calendar is above the featured cards */
.xmas-calendar.xmas-above-offers {
  padding-bottom: 70px; /* Account for the center card translateY(-34px) offset */
}

.xmas-header {
  text-align: center;
  margin-bottom: 24px;
}

.xmas-header h2 {
  font-size: 28px;
  font-weight: 900;
  color: #ffffff;
  margin: 0 0 8px;
  text-shadow: 0 3px 10px rgba(0,0,0,0.5);
}

.xmas-header p {
  color: var(--text);
  font-size: 15px;
  opacity: 0.9;
  margin: 0;
}

/* Week navigation */
.xmas-weeks-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.xmas-week-nav {
  position: relative;
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 2px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 14px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

/* Past weeks - clickable, slightly dimmed but visible */
.xmas-week-nav.past {
  opacity: 0.7;
  cursor: pointer;
}

.xmas-week-nav.past:hover {
  opacity: 1;
  border-color: rgba(255,255,255,0.3);
  transform: translateY(-2px);
}

/* Future weeks - locked, greyed out */
.xmas-week-nav.future.locked {
  opacity: 0.35;
  filter: grayscale(100%);
  cursor: not-allowed;
}

/* Current/Active week */
.xmas-week-nav.active,
.xmas-week-nav.current {
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(255, 198, 59, 0.25);
  cursor: pointer;
}

.xmas-week-nav.active:hover {
  transform: translateY(-2px);
}

.xmas-week-nav.big-prize.active {
  border-color: #ff6b6b;
  box-shadow: 0 0 20px rgba(255, 107, 107, 0.3);
}

.xmas-week-num {
  width: 32px;
  height: 32px;
  background: linear-gradient(180deg, #c41e3a, #8b1528);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 16px;
  color: #fff;
}

.xmas-week-nav.big-prize .xmas-week-num {
  background: linear-gradient(180deg, #ffc63b, #ff9500);
  color: #1e0c35;
}

.xmas-week-nav-title {
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
}

.xmas-lock {
  font-size: 14px;
  opacity: 0.6;
}

.xmas-check {
  font-size: 14px;
  color: var(--accent);
}

/* Winners section for completed weeks */
.xmas-winners-section {
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 2px solid var(--accent);
  border-radius: 12px;
  padding: 25px;
  margin: 20px 20px 20px;
}

.xmas-winners-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.xmas-winners-header h4 {
  margin: 0;
  font-size: 18px;
  color: var(--accent);
}

.xmas-winners-prize {
  background: linear-gradient(180deg, #ffc63b, #ff9500);
  color: #1e0c35;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

.xmas-winners-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 15px;
}

.xmas-winner-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.05);
  padding: 12px 15px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
}

.xmas-winner-icon {
  font-size: 16px;
}

.xmas-winner-email {
  font-family: monospace;
  font-size: 14px;
  color: var(--text);
}

.xmas-no-winners {
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  margin: 0;
  padding: 20px;
}

.xmas-winners-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

/* Badge for completed weeks */
.xmas-card-badge.completed {
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  color: #1e0c35;
}

/* Main Week Card - matches theme card styling */
.xmas-card {
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 2px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.xmas-card.big-prize {
  background: linear-gradient(180deg, #3d1a5c, #2a0f42);
  border-color: rgba(255, 107, 107, 0.3);
}

/* Two Column Layout */
.xmas-card-columns {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 280px;
}

/* Left Column - Image */
.xmas-card-left {
  background: rgba(0,0,0,0.2);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-right: 1px solid rgba(255,255,255,0.1);
}

.xmas-prize-image {
  width: 180px;
  height: 180px;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 16px;
  background: rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.xmas-prize-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.xmas-prize-placeholder {
  font-size: 56px;
}

.xmas-prize-text {
  font-size: 17px;
  font-weight: 900;
  color: var(--accent);
  text-align: center;
  line-height: 1.3;
}

.xmas-week-title-below {
  font-size: 22px;
  font-weight: 900;
  color: var(--text);
  text-align: center;
  margin-top: 8px;
  opacity: 0.9;
}

.xmas-card.big-prize .xmas-prize-text,
.xmas-card.big-prize .xmas-week-title-below {
  color: #ff6b6b;
}

/* Right Column - Info */
.xmas-card-right {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}

.xmas-card-badge {
  display: inline-block;
  background: linear-gradient(180deg, #4caf50, #2e7d32);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 14px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  width: fit-content;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

.xmas-card-title {
  font-size: 24px;
  font-weight: 900;
  color: var(--text);
  margin: 0;
}

.xmas-card-dates {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: var(--accent);
  font-weight: 600;
}

.xmas-dates-icon {
  font-size: 16px;
}

.xmas-card-description {
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
  white-space: normal;
  flex-grow: 1;
}

.xmas-card-casinos {
  margin-top: auto;
  padding-top: 8px;
}

.xmas-casinos-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.xmas-casinos-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.xmas-casino-chip {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  padding: 10px 14px;
  text-decoration: none;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.xmas-casino-chip:hover {
  background: rgba(255,255,255,0.2);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.xmas-casino-chip img {
  max-height: 32px;
  max-width: 100px;
  object-fit: contain;
}

.xmas-casino-chip span {
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
}

/* Form Section */
.xmas-card-form {
  background: rgba(0,0,0,0.15);
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 24px 28px;
}

.xmas-card-form h4 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 16px;
}

.xmas-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 14px;
  align-items: end;
}

.xmas-form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.xmas-form-field label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.xmas-form-field input,
.xmas-form-field select {
  padding: 12px 14px;
  background: rgba(0,0,0,0.3);
  border: 2px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.2s ease;
}

.xmas-form-field input:focus,
.xmas-form-field select:focus {
  outline: none;
  border-color: var(--accent);
}

.xmas-form-field input::placeholder {
  color: rgba(255,255,255,0.35);
}

.xmas-form-field select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23ffffff' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.xmas-form-field select option {
  background: #1e0c35;
  color: #fff;
}

.xmas-form-btn {
  justify-content: flex-end;
}

.xmas-submit-btn {
  padding: 12px 28px;
  background: linear-gradient(180deg, #c41e3a, #8b1528);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 6px 20px rgba(196, 30, 58, 0.35);
  white-space: nowrap;
}

.xmas-submit-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(196, 30, 58, 0.45);
}

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

.xmas-form-message {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
}

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

.xmas-form-message.error {
  background: rgba(244, 67, 54, 0.2);
  border: 1px solid #f44336;
  color: #ef9a9a;
}

/* Snowfall Animation */
.snowfall {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.snowflake {
  position: absolute;
  top: -10px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1em;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
  animation: snowfall linear infinite;
  opacity: 0;
}
@keyframes snowfall {
  0% {
    opacity: 0;
    transform: translateY(0) rotate(0deg);
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(100vh) rotate(360deg);
  }
}

.offers { 
  display: grid; 
  grid-template-columns: repeat(3, 1fr); 
  gap: 22px; 
  align-items: stretch; 
  margin: 0 auto;
  padding: 0 0 40px;
}
.offer { 
  position: relative; 
  background: var(--card);
  background: -webkit-linear-gradient(top, var(--card-2), var(--card));
  background: -moz-linear-gradient(top, var(--card-2), var(--card));
  background: -o-linear-gradient(top, var(--card-2), var(--card));
  background: linear-gradient(180deg, var(--card-2), var(--card)); 
  border: 2px solid rgba(255,255,255,0.1); 
  border-radius: var(--radius); 
  padding: 20px; 
  padding-top: 56px; 
  box-shadow: var(--shadow); 
  -webkit-transition: -webkit-transform .25s ease, box-shadow .25s ease;
  transition: transform .25s ease, box-shadow .25s ease; 
  overflow: hidden;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.offer:hover { 
  -webkit-transform: translateY(-6px);
  transform: translateY(-6px); 
  box-shadow: 0 28px 60px rgba(0,0,0,.45); 
}

.offer.center { 
  -webkit-transform: translateY(-34px);
  transform: translateY(-34px); 
}
.offer.center:hover { 
  -webkit-transform: translateY(-42px);
  transform: translateY(-42px); 
}

/* Offer Logo */
.offer-logo {
  display: block;
  width: 180px;
  height: 90px;
  margin: 0 auto 8px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 8px 20px rgba(0,0,0,.35);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.offer-logo:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}
.offer-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Offer Rating */
.offer-rating {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
}
.offer-rating-score {
  font-size: 18px;
  font-weight: 900;
  color: var(--accent);
}
.offer-rating-text {
  font-size: 12px;
  color: var(--muted);
}

/* Offer Name */
.offer-name {
  font-size: 20px;
  font-weight: 900;
  color: var(--text);
  text-decoration: none;
  transition: color 0.15s ease;
  display: block;
}
.offer-name:hover {
  color: var(--accent);
}

/* Offer Bonus */
.offer-bonus {
  font-size: 22px;
  font-weight: 900;
  color: var(--text);
  line-height: 1.2;
  padding: 8px 0;
}

/* Offer Terms */
.offer-terms {
  display: flex;
  justify-content: center;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}
.offer-terms span {
  background: rgba(255,255,255,0.08);
  padding: 4px 10px;
  border-radius: 20px;
}

/* Offer Features */
.offer-features {
  list-style: none;
  padding: 0;
  margin: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: center;
  align-items: center;
}
.offer-features li {
  font-size: 13px;
  color: var(--text);
  padding-left: 20px;
  position: relative;
  line-height: 1.4;
  text-align: left;
}
.offer-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #4caf50;
  font-weight: bold;
}

/* Payment Icons */
.offer-payments,
.listing-payments {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 8px 0;
}
.payment-icon {
  width: 40px;
  height: 26px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  border-radius: 4px;
  background-color: rgba(255,255,255,0.95);
  display: inline-block;
  padding: 2px;
  position: relative;
  cursor: pointer;
}
.payment-icon[title] {
  position: relative;
}
.payment-icon[title]::after {
  content: attr(title);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  pointer-events: none;
  z-index: 100;
}
.payment-icon[title]::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--accent);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  pointer-events: none;
  z-index: 100;
}
.payment-icon[title]:hover::after,
.payment-icon[title]:hover::before {
  opacity: 1;
  visibility: visible;
}
.payment-visa { background-image: url('images/payments/visa.svg'); }
.payment-mastercard { background-image: url('images/payments/mastercard.svg'); }
.payment-maestro { background-image: url('images/payments/maestro.svg'); }
.payment-american-express { background-image: url('images/payments/american-express.svg'); }
.payment-paypal { background-image: url('images/payments/paypal.svg'); }
.payment-paysafecard { background-image: url('images/payments/paysafecard.svg'); }
.payment-paynplay { background-image: url('images/payments/PaynPlay.svg'); }
.payment-skrill { background-image: url('images/payments/skrill.svg'); }
.payment-neteller { background-image: url('images/payments/neteller.svg'); }
.payment-klarna { background-image: url('images/payments/klarna.svg'); }
.payment-trustly { background-image: url('images/payments/trustly.svg'); }
.payment-zimpler { background-image: url('images/payments/zimpler.svg'); }
.payment-brite { background-image: url('images/payments/brite.svg'); }
.payment-swish { background-image: url('images/payments/swish.svg'); }
.payment-trumopay { background-image: url('images/payments/trumopay.svg'); }
.payment-giropay { background-image: url('images/payments/giropay.svg'); }
.payment-ideal { background-image: url('images/payments/ideal.svg'); }
.payment-sepa { background-image: url('images/payments/sepa.svg'); }
.payment-apple-pay { background-image: url('images/payments/apple-pay.svg'); }
.payment-google-pay { background-image: url('images/payments/google-pay.svg'); }
.payment-amazon-pay { background-image: url('images/payments/amazon-pay.svg'); }

/* Offer CTA */
.offer-cta {
  margin-top: auto;
  padding-top: 8px;
}
.btn { 
  width: 100%;
  max-width: 100%;
  display: -webkit-inline-flex;
  display: inline-flex; 
  align-items: center; 
  justify-content: center; 
  padding: 12px 14px; 
  border-radius: 14px; 
  border: 1px solid var(--button-border); 
  text-decoration: none; 
  font-weight: 800; 
  color: var(--button-text); 
  background: var(--button-bg);
  background: linear-gradient(180deg, var(--button-bg), var(--button-bg-end)); 
  box-shadow: 0 10px 24px var(--button-shadow); 
  -webkit-transition: -webkit-transform .15s ease;
  transition: transform .15s ease; 
}
.btn:hover { 
  -webkit-transform: translateY(-2px);
  transform: translateY(-2px); 
}

.ribbon {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: var(--ribbon-bg);
  color: var(--ribbon-text);
  font-weight: 900;
  font-size: 14px;
  padding: 10px 20px;
  text-align: center;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  z-index: 3;
  border-radius: calc(var(--radius) - 2px) calc(var(--radius) - 2px) 0 0;
}

.legal { margin-top: 34px; color: var(--muted); font-size: 12px; text-align: center; }

/* Listing Section */
.listing-section { 
  margin: 0;
  padding: 0 0 40px;
}
.listing-section h3 { 
  text-align: center; 
  font-size: clamp(24px, 4vw, 36px); 
  margin: 0 0 30px; 
  text-shadow: 0 3px 14px rgba(0,0,0,0.6);
}

.listing-cards { display: grid; gap: 16px; }

.listing-card {
  background: var(--card);
  background: -webkit-linear-gradient(top, var(--card-2), var(--card));
  background: -moz-linear-gradient(top, var(--card-2), var(--card));
  background: -o-linear-gradient(top, var(--card-2), var(--card));
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 2px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 16px 24px 16px 84px;
  display: grid;
  grid-template-columns: 180px auto 1fr auto 280px;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

/* Left Ribbon Rank */
.listing-rank {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 50px;
  background: linear-gradient(180deg, var(--rank-bg-start), var(--rank-bg-end));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 900;
  color: var(--rank-text);
  border-right: 1px solid rgba(0,0,0,0.2);
  box-shadow: 2px 0 8px rgba(0,0,0,0.3);
}

.listing-rank::after {
  content: "";
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-left: 10px solid var(--rank-bg-end);
}

.listing-logo {
  flex-shrink: 0;
  width: 100%;
  height: 80px;
  display: grid;
  place-items: center;
  text-decoration: none;
  -webkit-transition: -webkit-transform .15s ease;
  transition: transform .15s ease;
  background: rgba(0,0,0,0.2);
  border-radius: 10px;
  padding: 10px;
}

.listing-logo:hover {
  -webkit-transform: translateY(-2px);
  transform: translateY(-2px);
}

.listing-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.listing-divider {
  width: 1px;
  height: 60px;
  background: rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

/* Middle: Name, Rating, Terms, Payments */
.listing-middle {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}

.listing-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  -webkit-transition: color .15s ease;
  transition: color .15s ease;
}

.listing-name:hover {
  color: var(--accent);
}

.listing-rating {
  display: flex;
  align-items: center;
  gap: 6px;
}

.listing-rating-score {
  font-size: 15px;
  font-weight: 800;
  color: var(--accent);
}

.listing-terms {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}
.listing-terms span {
  background: rgba(255,255,255,0.06);
  padding: 3px 8px;
  border-radius: 12px;
}

.listing-payments {
  justify-content: flex-start;
  margin: 4px 0 0;
}

/* Right: Bonus + Button */
.listing-right {
  flex-shrink: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.listing-bonus {
  font-size: 16px;
  font-weight: 900;
  color: var(--text);
  line-height: 1.3;
  max-width: 260px;
  word-wrap: break-word;
  text-align: center;
}

.listing-rating-text {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.3;
  max-width: 200px;
  text-align: center;
  margin-top: 4px;
}

.listing-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 10px;
  border: 1px solid var(--button-border);
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
  color: var(--button-text);
  background: var(--button-bg);
  background: linear-gradient(180deg, var(--button-bg), var(--button-bg-end));
  box-shadow: 0 6px 16px var(--button-shadow);
  -webkit-transition: -webkit-transform .15s ease;
  transition: transform .15s ease;
  white-space: nowrap;
}

.listing-btn:hover {
  -webkit-transform: translateY(-2px);
  transform: translateY(-2px);
}

/* Tablet styles - 768px to 1024px */
@media (min-width: 768px) and (max-width: 1024px) {
  .wrap { 
    padding: 0 20px 40px; 
  }
  .hero-cards {
    grid-template-columns: 1fr;
  }
  .offers { 
    grid-template-columns: 1fr; 
    display: flex; 
    flex-direction: column; 
    gap: 16px;
    padding: 0 0 40px;
  }
  .offer { 
    transform: none !important;
    width: 100%;
  }
  .offer:hover { 
    transform: none !important; 
    box-shadow: var(--shadow) !important; 
  }
  .offer.center { 
    transform: none !important; 
    order: -1; 
  }
  .offer.center:hover { 
    transform: none !important; 
  }
  .offer:first-child { order: 1; }
  .offer:last-child { order: 2; }
  
  .listing-card {
    grid-template-columns: 140px auto 1fr auto 200px;
    gap: 10px;
    padding: 14px 20px 14px 80px;
  }
  .listing-divider {
    height: 50px;
  }
  .listing-logo {
    width: 100%;
    height: 60px;
  }
  .listing-right {
    width: 100%;
  }
  .listing-bonus {
    font-size: 14px;
    max-width: 180px;
  }
  
  /* Xmas Calendar Tablet */
  .xmas-card-columns {
    grid-template-columns: 200px 1fr;
    min-height: 260px;
  }
  .xmas-prize-image {
    width: 150px;
    height: 150px;
  }
  .xmas-card-right {
    padding: 20px;
  }
  .xmas-card-title {
    font-size: 22px;
  }
  .xmas-form-row {
    grid-template-columns: 1fr 1fr;
  }
  .xmas-form-btn {
    grid-column: span 2;
  }
  .xmas-submit-btn {
    width: 100%;
  }
}

/* Medium screens - 1025px to 1200px */
@media (min-width: 1025px) and (max-width: 1200px) {
  .wrap { 
    padding: 0 30px 40px; 
  }
  .offers { 
    grid-template-columns: repeat(3, 1fr); 
    gap: 16px;
  }
  .offer.center { 
    -webkit-transform: translateY(-20px);
    transform: translateY(-20px); 
  }
  .offer.center:hover { 
    -webkit-transform: translateY(-28px);
    transform: translateY(-28px); 
  }
}

/* Mobile styles - below 768px */
@media (max-width: 767px) {
  .wrap { 
    padding: 0 16px 30px; 
  }
  .marquee-content span {
    padding: 0 40px;
    font-size: 14px;
  }
  
  /* Consistent section spacing */
  .hero {
    padding-bottom: 24px;
    margin-top: -10px;
  }
  
  .offers {
    padding: 0 0 24px;
    gap: 16px;
    grid-template-columns: 1fr; 
    display: flex; 
    flex-direction: column;
  }
  
  .hero-bottom {
    padding: 0 0 24px;
  }
  
  .listing-section {
    padding: 0;
  }
  
  /* Hero cards */
  .hero-cards {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .hero-card {
    padding: 24px 20px;
    min-height: auto;
  }
  .hero-card p {
    font-size: 15px;
  }
  .hero-btn {
    width: 100%;
  }
  
  /* Top 3 offers */
  .offer { 
    order: 0; 
    transform: none !important;
    width: 100%;
    text-align: center;
    padding: 16px;
    padding-top: 50px;
  }
  .offer:hover { 
    transform: none !important; 
    box-shadow: var(--shadow) !important; 
  }
  .offer.center { 
    transform: none !important; 
    order: -1; 
  }
  .offer.center:hover { 
    transform: none !important; 
  }
  .offer:first-child { order: 1; }
  .offer:last-child { order: 2; }
  .offer-logo {
    width: 208px;
    height: 104px;
    margin: 0 auto 8px;
  }
  .offer-rating-score { font-size: 16px; }
  .offer-name { font-size: 18px; }
  .offer-bonus { font-size: 18px; }
  .offer-features { text-align: left; }
  .offer-payments { gap: 6px; }
  .payment-icon { width: 32px; height: 22px; }
  .ribbon { font-size: 12px; padding: 8px 16px; }
  .bg-left, .bg-right {
    opacity: 0.5;
  }
  
  /* Listing */
  .listing-cards {
    gap: 16px;
  }
  .listing-card {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 14px;
    padding: 20px;
  }
  /* Listing Mobile */
  .listing-cards {
    gap: 16px;
  }
  .listing-card {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 14px;
    padding: 60px 20px 20px 20px;
    padding-left: 20px;
  }
  .listing-rank {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: auto;
    width: 100%;
    height: 40px;
    border-radius: calc(var(--radius) - 2px) calc(var(--radius) - 2px) 0 0;
    font-size: 16px;
    border-right: none;
    border-bottom: 1px solid rgba(0,0,0,0.2);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  }
  .listing-rank::after {
    display: none;
  }
  .listing-logo {
    width: 182px;
    height: 91px;
    margin: 0 auto;
  }
  .listing-divider {
    display: none;
  }
  .listing-middle {
    align-items: center;
  }
  .listing-terms {
    flex-wrap: wrap;
    justify-content: center;
  }
  .listing-payments {
    justify-content: center;
  }
  .listing-right {
    min-width: auto;
    width: 100%;
  }
  .listing-btn {
    width: 100%;
  }
  
  /* Embed Section Mobile */
  .embed-section {
    padding: 0 0 30px;
  }
  .embed-container {
    padding: 12px;
  }
  
  /* Xmas Calendar Mobile */
  .xmas-calendar {
    padding: 0 0 30px;
  }
  .xmas-header h2 {
    font-size: 22px;
  }
  .xmas-header p {
    font-size: 13px;
  }
  .xmas-weeks-nav {
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }
  .xmas-week-nav {
    padding: 10px 6px;
    border-radius: 10px;
  }
  .xmas-week-num {
    width: 26px;
    height: 26px;
    font-size: 13px;
  }
  .xmas-week-nav-title {
    font-size: 10px;
  }
  .xmas-lock {
    font-size: 11px;
  }
  .xmas-check {
    font-size: 11px;
  }
  .xmas-winners-section {
    margin: 0 15px 15px;
    padding: 15px;
  }
  .xmas-winners-header {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
  .xmas-winner-item {
    padding: 8px 12px;
  }
  .xmas-winner-email {
    font-size: 12px;
  }
  .xmas-card {
    border-radius: 16px;
  }
  .xmas-card-columns {
    display: flex;
    flex-direction: column;
    min-height: auto;
  }
  .xmas-card-left {
    padding: 0;
    border-right: none;
    border-bottom: none;
    order: -1;
    background: transparent;
    text-align: center;
  }
  .xmas-prize-image {
    width: 100%;
    height: 180px;
    margin-bottom: 0;
    border-radius: 14px 14px 0 0;
  }
  .xmas-prize-image img {
    border-radius: 14px 14px 0 0;
  }
  .xmas-prize-placeholder {
    font-size: 56px;
    border-radius: 14px 14px 0 0;
    background: rgba(0,0,0,0.3);
  }
  .xmas-prize-text {
    font-size: 15px;
    padding: 12px 20px;
    background: rgba(0,0,0,0.2);
    margin: 0;
    text-align: center;
  }
  .xmas-week-title-below {
    font-size: 18px;
    padding: 12px 20px;
    background: rgba(0,0,0,0.2);
    margin: 0;
    text-align: center;
  }
  .xmas-card-right {
    padding: 20px;
    gap: 10px;
    text-align: center;
    align-items: center;
  }
  .xmas-card-badge {
    align-self: center;
  }
  .xmas-card-title {
    font-size: 20px;
    text-align: center;
  }
  .xmas-card-dates {
    font-size: 13px;
    justify-content: center;
  }
  .xmas-card-description {
    font-size: 13px;
    line-height: 1.6;
    word-break: break-word;
    text-align: center;
  }
  .xmas-card-casinos {
    text-align: center;
    align-items: center;
  }
  .xmas-casinos-label {
    display: block;
    text-align: center;
    margin-bottom: 8px;
  }
  .xmas-casinos-list {
    gap: 8px;
    justify-content: center;
  }
  .xmas-casino-chip {
    padding: 8px 12px;
  }
  .xmas-casino-chip img {
    max-height: 26px;
    max-width: 80px;
  }
  .xmas-card-form {
    padding: 20px;
    text-align: center;
  }
  .xmas-card-form h4 {
    font-size: 14px;
    margin-bottom: 14px;
    text-align: center;
  }
  .xmas-form-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .xmas-form-field input,
  .xmas-form-field select {
    padding: 11px 12px;
    font-size: 14px;
  }
  .xmas-submit-btn {
    width: 100%;
    padding: 14px 20px;
    font-size: 14px;
  }
  .listing-rank {
    left: 0;
    right: 0;
    top: 0;
    bottom: auto;
    width: 100%;
    height: 44px;
    font-size: 20px;
    border-right: none;
    border-bottom: 1px solid rgba(0,0,0,0.2);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    border-radius: 17px 17px 0 0;
  }
  .listing-rank::after {
    display: none;
  }
  .listing-rank::before {
    content: "#";
    margin-right: 2px;
  }
  .listing-divider {
    display: none;
  }
  .listing-logo {
    margin: 0 auto;
    width: 160px;
    height: 80px;
  }
  .listing-offer {
    text-align: center;
    width: 100%;
    min-width: auto;
    align-items: center;
    padding: 0;
  }
  .listing-btn {
    width: 100%;
  }
  .listing-info {
    text-align: center;
  }
  .listing-rating {
    justify-content: center;
  }
}
