@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap");

:root {
  --background-body: #f4f4f4;
  --background-content: #ffffff;
  --text-primary: #ac224b;
  --text-secondary: #777777;
  --border-color: #eaeaea;
  --card-background: #ffffff;
  --accent-color: #ac224b;
}

body {
  font-family: "Poppins", sans-serif;
  color: var(--text-primary);
  margin: 0;
  overflow-x: hidden;
  min-height: 100vh;
  background-color: var(--background-body);
  background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23dddddd' fill-opacity='0.6' fill-rule='evenodd'%3E%3Cpath d='M0 40L40 0H20L0 20M40 40V20L20 40'/%3E%3C/g%3E%3C/svg%3E");
  background-attachment: fixed;
}

body::before,
body::after {
  content: none;
}

.nav-bg-color {
  background-color: #172430;
  height: 60px;
  width: 111%;
  margin-left: -20px;
}

.logo {
  color: #fff;
  width: 240px;
  align-items: center;
  display: flex;
  margin-left: auto;
  margin-right: auto;
}

.nav-btn {
  z-index: 99;
  transition: all 0.3s ease;
  position: absolute;
  left: 15px;
}

.nav-relative {
  position: relative !important;
}

.mt-1 {
  margin-top: 10px;
}

.container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  background-color: var(--background-content);
  position: relative;
  z-index: 1;
  padding: 0 12px 20px 12px;
  box-sizing: border-box;
}

/* Fixed width for screens larger than mobile */
@media (min-width: 480px) {
  .container {
    max-width: 398px;
    padding: 0 16px 20px 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  }
}

header h1 {
  text-align: center;
  color: var(--accent-color);
  margin-top: 10px;
  margin-bottom: 20px;
  font-size: 2.2em;
  font-weight: 700;
}
.search-bar {
  width: calc(100% - 24px);
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-sizing: border-box;
  background-color: #f7f7f7;
  color: var(--text-primary);
  font-size: 1em;
}
.search-bar::placeholder {
  color: var(--text-secondary);
}
.header-description {
  text-align: center;
  font-size: 0.9em;
  color: var(--text-secondary);
  margin-bottom: 25px;
  padding: 0 10px;
}
.header-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 30px;
}

.spGames {
  background-color: transparent;
  padding: 10px;
  text-align: center;
  box-shadow: rgba(0, 0, 0, 0.25) 0 12px 22px -12px;
  border-radius: 15px;
  border: 1.5px dotted var(--border-color);
}

.btn {
  background-color: var(--accent-color);
  color: white;
  font-weight: 600;
  border: 2px solid var(--accent-color);
  border-radius: 50px;
  padding: 10px 22px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
}
.btn:hover {
  background-color: #444;
  border-color: #444;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}
.btn:active {
  transform: translateY(0);
}

.section-title {
  text-align: center;
  font-size: 1.8em;
  margin-bottom: 20px;
  color: var(--text-primary);
  font-weight: 600;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--accent-color);
  display: inline-block;
  width: auto;
}
.all-games-section {
  text-align: center;
}
.title-decorator {
  display: none;
}
.games-grid {
  display: grid;
  grid-template-columns: repeat(2, 175px);
  justify-content: center;
  gap: 12px;
  margin-bottom: 30px;
}

.game-item {
  width: 175px;
  flex-shrink: 0;
  background-color: var(--card-background);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease-in-out;
  overflow: hidden;
  position: relative;
}

.game-item:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 15px 35px rgba(172, 34, 75, 0.2);
  border-color: var(--accent-color);
}

.game-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(172, 34, 75, 0.1) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.game-item:hover::after {
  opacity: 1;
}

.game-item img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 0;
  background-color: #e0e0e0;
  border: none;
  transition: transform 0.3s ease;
}

.game-item:hover img {
  transform: scale(1.05);
}

.game-item h3 {
  font-size: 0.95em;
  margin: 10px 10px 5px 10px;
  color: var(--text-primary);
  line-height: 1.3;
  flex-grow: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* User Count - Active Users */
.game-item .user-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  color: #22c55e;
  margin: 0 10px 8px 10px;
  font-weight: 600;
}

.game-item .user-count::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse-dot 1.5s ease-in-out infinite;
}

.game-item .user-count::after {
  content: '';
  width: 14px;
  height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2322c55e'%3E%3Cpath d='M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  margin-left: 2px;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}


/* .play-now-btn,
.play-game-button {
  padding: 15px;
  margin: 10px auto 15px auto;
  background-color: transparent;
  border: 2px solid var(--accent-color);
  border-radius: 50%;
  position: relative;
  transition: all 0.3s ease;
  font-size: 16px;
  cursor: pointer;
}
.play-now-btn:hover,
.play-game-button:hover {
  background-color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.play-now-btn::after,
.play-game-button::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 55%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 14px solid var(--accent-color);
  transition: border-left-color 0.3s ease;
}
.play-now-btn:hover::after,
.play-game-button:hover::after {
  border-left-color: white;
}

.play-now-btn {
  width: 48px;
  height: 48px;
} */

.play-now-btn {
  background-color: var(--accent-color);
  color: white;
  font-weight: 600;
  border: none;
  padding: 10px 24px;
  cursor: pointer;
  font-size: 0.9em;
  text-shadow: 0px -1px 1px rgba(0, 0, 0, 0.2);
  box-shadow: inset 0 -2px 2px rgba(0, 0, 0, 0.2), 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.15s ease-out;
}
.play-game-button {
  background-color: var(--accent-color);
  color: white;
  font-weight: 600;
  border: none;
  padding: 10px 24px;
  border-radius: 30px;
  cursor: pointer;
  font-size: 0.9em;
  text-shadow: 0px -1px 1px rgba(0, 0, 0, 0.2);
  box-shadow: inset 0 -2px 2px rgba(0, 0, 0, 0.2), 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.15s ease-out;
}
.play-game-button:hover,
.play-now-btn:hover {
  background-color: var(--accent-color);
  box-shadow: inset 0 -1px 1px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.2);
  transform: translateY(1px);
}

.play-now-btn:active {
  background-color: var(--accent-color);
  transform: translateY(2px);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* .play-game-button {
  width: 50px;
  height: 50px;
  border-width: 3px;
} */

/* .play-game-button::after {
  border-top-width: 12px;
  border-bottom-width: 12px;
  border-left-width: 20px;
} */

.more-button-container {
  text-align: center;
  margin-bottom: 30px;
}
.what-is-section h2 {
  text-align: left;
  font-size: 1.3em;
  margin-bottom: 10px;
  color: var(--text-primary);
  padding-bottom: 5px;
  border-bottom: 2px solid var(--accent-color);
  display: inline-block;
}
.what-is-section p,
.what-is-section ul {
  font-size: 0.9em;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 15px;
}
.what-is-section ul {
  padding-left: 20px;
}
.what-is-section li {
  margin-bottom: 8px;
}
footer {
  display: flex;
  justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  margin-top: 20px;
}
footer .btn {
  padding: 8px 15px;
  font-size: 0.85em;
}

.game-details-page .container {
  height: 100vh;
  padding: 0;
}
.header {
  background-color: var(--accent-color);
  color: white;
  text-align: center;
  padding: 12px 0;
  font-size: 1.8em;
  font-weight: bold;
  width: 100%;
}
.header-link-wrapper {
  text-decoration: none;
}
.content-area {
  padding: 10px;
  background-color: var(--background-content);
}
.game-display-area {
  width: 100%;
  height: 250px;
  background-color: #eaeaea;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 15px;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}
/* Game Coin Bar - Separate row for coins */
.game-coin-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 15px;
  background: linear-gradient(135deg, #fdf2f5 0%, #f8e1e7 100%);
  border: 2px solid var(--accent-color);
  border-radius: 10px;
  margin-bottom: 12px;
}

.coin-bar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.coin-bar-left .coin-icon {
  font-size: 1.4rem;
}

.coin-bar-left .coin-balance {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent-color);
}

.coin-bar-left .coin-label {
  font-size: 0.85rem;
  color: #666;
}

.coin-bar-right .cost-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-color);
  background: #fff;
  padding: 5px 12px;
  border-radius: 15px;
  border: 1px solid var(--accent-color);
}

.game-meta-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  background-color: #f9f9f9;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin-bottom: 15px;
}

.game-icon {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #ddd;
}

.game-title-details {
  flex: 1;
  min-width: 0;
}

.game-title-details h2 {
  margin: 0 0 5px 0;
  font-size: 1.2em;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-plays {
  margin: 0;
  font-size: 0.85em;
  color: #777;
}
.game-description-content {
  padding: 15px;
  border: 2px dashed var(--accent-color);
  border-radius: 5px;
  background-color: #fff;
  margin-bottom: 20px;
}
.game-description-content h3 {
  font-size: 1.2em;
  color: #333;
  margin-top: 0;
  margin-bottom: 8px;
}
.game-description-content h4 {
  font-size: 1em;
  color: #444;
  margin-top: 0;
  margin-bottom: 10px;
  font-weight: bold;
}
.game-description-content p {
  font-size: 0.9em;
  line-height: 1.6;
  color: #555;
  margin-bottom: 0;
}
.game-iframe {
  display: none;
  width: 100%;
  height: 100%;
  border: none;
  background-color: #000;
}
.game-controls-overlay {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  display: flex;
  gap: 6px;
}
.control-btn {
  background-color: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 5px;
  cursor: pointer;
  padding: 4px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background-color 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.control-btn:hover {
  background-color: rgba(0, 0, 0, 0.6);
}
.control-btn svg {
  width: 24px;
  height: 24px;
  fill: #ffffff;
}
#closeGameBtn {
  display: none;
}
.game-display-area.is-playing .play-game-button {
  display: none;
}
.game-display-area.is-playing .game-iframe,
.game-display-area.is-playing #closeGameBtn {
  display: block;
}

/* ==================== REWARD SYSTEM STYLES - Attractive Design ==================== */

/* Reward Section Container */
.reward-section {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 20px;
  background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
  margin: 10px 0;
  border-radius: 16px;
  box-shadow: 0 3px 12px rgba(255, 193, 7, 0.2);
  border: 1px solid rgba(255, 193, 7, 0.3);
}

/* Coin Display - Attractive Style */
.coin-display {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  padding: 8px 16px 8px 10px;
  border-radius: 25px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border: 2px solid #ffd700;
}

.coin-svg {
  flex-shrink: 0;
  animation: coinSpin 3s ease-in-out infinite;
}

@keyframes coinSpin {
  0%, 100% { transform: rotateY(0deg); }
  50% { transform: rotateY(180deg); }
}

.coin-icon {
  font-size: 1.2rem;
}

.coin-balance {
  font-weight: 800;
  font-size: 1.1rem;
  color: #d4a000;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.coin-label {
  display: none;
}

/* Earn Coins Button - Attractive Style */
.earn-coins-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
  color: #fff;
  border: none;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
  position: relative;
  overflow: hidden;
}

.earn-coins-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s ease;
}

.earn-coins-btn:hover::before {
  left: 100%;
}

.earn-coins-btn:hover {
  background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.5);
}

.earn-coins-btn:active {
  transform: translateY(0);
}

.ad-icon {
  flex-shrink: 0;
}

.earn-coins-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-icon {
  font-size: 1rem;
}

.btn-text {
  font-weight: 600;
}

.earn-description {
  display: none;
}

/* Search Bar - Attractive Design */
/* Search & Category Combined Container */
.search-category-container {
  background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 20px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.search-container {
  width: 100%;
  margin-bottom: 12px;
  position: relative;
}

.search-container::before {
  content: '🔍';
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  z-index: 1;
  pointer-events: none;
}

.game-search-input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  font-size: 0.95rem;
  background: #fff;
  color: var(--text-primary);
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.game-search-input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(172, 34, 75, 0.1);
}

.game-search-input::placeholder {
  color: #aaa;
  font-weight: 500;
}

/* Category Filter Buttons - Light Theme with 30% Dark */
.category-filters {
  display: flex;
  gap: 10px;
  justify-content: flex-start;
  margin-bottom: 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border: none;
}

.category-filters::-webkit-scrollbar {
  display: none;
}

.category-filters a {
  text-decoration: none;
  flex-shrink: 0;
}

.category-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px 14px;
  min-width: 65px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #555;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.cat-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.cat-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #666;
}

.category-btn:hover {
  transform: translateY(-2px);
  background: #fff;
  border-color: rgba(172, 34, 75, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.category-btn:hover .cat-label {
  color: var(--accent-color);
}

.category-btn:active {
  transform: translateY(0);
}

.category-btn.active {
  background: linear-gradient(135deg, #2d2d3a 0%, #1a1a2e 100%);
  border-color: #2d2d3a;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.category-btn.active .cat-label {
  color: #fff;
}

.category-btn.active .cat-icon {
  transform: scale(1.05);
}

.category-btn.active:hover {
  background: linear-gradient(135deg, #3d3d4a 0%, #2a2a3e 100%);
  color: #fff;
}

/* Recent Games Section */
.recent-games-section {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 2px dashed var(--border-color);
}

.recent-games-section .section-title {
  font-size: 1.4em;
  margin-bottom: 15px;
}

/* Recent Games in Game Details Page */
.game-details-page .recent-games-section {
  margin-top: 20px;
  padding: 15px;
  background: #f9f9f9;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  border-top: 1px solid var(--border-color);
}

.game-details-page .recent-games-section .section-title {
  font-size: 1.2em;
  margin-bottom: 12px;
  padding-bottom: 8px;
}

.game-details-page .recent-games-section .games-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 0;
}

.game-details-page .recent-games-section .game-item {
  padding: 0;
}

.game-details-page .recent-games-section .game-item img {
  height: 80px;
}

.game-details-page .recent-games-section .game-item h3 {
  font-size: 0.85em;
  margin: 8px 5px;
}

.game-details-page .recent-games-section .coin-cost-text {
  font-size: 0.65rem;
  margin: 0 5px 5px 5px;
  padding: 3px 6px;
}

.game-details-page .recent-games-section .play-now-btn {
  font-size: 0.75em;
  padding: 6px 12px;
}

.no-recent {
  text-align: center;
  color: #888;
  padding: 30px 20px;
  font-style: italic;
  grid-column: 1 / -1;
}

.recent-game-item {
  border: 2px solid #4CAF50;
  position: relative;
}

.recent-game-item::before {
  content: "Recent";
  position: absolute;
  top: 8px;
  left: 8px;
  background: #4CAF50;
  color: #fff;
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
  z-index: 1;
}

/* Game Coin Info in Details Page */
.game-coin-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 12px;
  background: linear-gradient(135deg, #fdf2f5 0%, #f8e1e7 100%);
  border-radius: 12px;
  border: 1px solid var(--accent-color);
}

.game-coin-info .coin-icon {
  font-size: 1.2rem;
}

.game-coin-info .coin-balance {
  font-size: 1.1rem;
  min-width: auto;
  color: var(--accent-color);
}

.coin-cost {
  color: var(--accent-color);
  font-size: 0.7rem;
  font-weight: 600;
}

/* Game Card Coin Cost Badge - Light Theme with Line Break */
.game-item .coin-cost-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--accent-color);
  font-weight: 700;
  margin: 8px 10px 8px 10px;
  padding: 5px 12px;
  background: #fff;
  border-radius: 15px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
}

.game-item .coin-cost-text::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 1px;
  background: #e0e0e0;
}

/* Floating Entry Badge on Card - Light Theme */
.game-item .entry-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--accent-color);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 10px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 3px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

/* Not Enough Coins Modal */
.coin-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
  box-sizing: border-box;
}

.coin-modal-content {
  background: #fff;
  padding: 15px 14px;
  border-radius: 14px;
  text-align: center;
  max-width: 280px;
  width: 100%;
  border: 1px solid #e0e0e0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  animation: modalSlideIn 0.2s ease;
  position: relative;
}

.modal-close-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  color: #666;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 0;
  z-index: 20;
}

.modal-close-btn:hover {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: #fff;
}

.modal-close-btn svg {
  width: 16px;
  height: 16px;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.coin-modal-content h3 {
  color: var(--accent-color);
  margin: 0 0 10px 0;
  font-size: 1.1rem;
}

.coin-modal-content p {
  margin: 4px 0;
  color: #555;
  font-size: 0.8rem;
}

.coin-modal-content .earn-coins-btn {
  margin: 10px 0 8px 0;
  width: 100%;
  padding: 8px 14px;
  font-size: 0.8rem;
  border-radius: 20px;
}

/* Modal Divider */
.modal-divider {
  display: flex;
  align-items: center;
  margin: 6px 0;
  color: #999;
  font-size: 0.7rem;
}

.modal-divider::before,
.modal-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e0e0e0;
}

.modal-divider span {
  padding: 0 10px;
  font-weight: 600;
}

/* Skip/Play Anyway Button */
.skip-ad-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  background: transparent;
  color: #666;
  border: none;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.skip-ad-btn:hover {
  color: #333;
}

.skip-ad-btn:active {
  color: #000;
}

/* 3D Oops Modal Title - Pop Out Effect */
.coin-modal-content h3 {
  font-size: 2.5rem;
  font-weight: 900;
  color: #ff6b6b;
  text-shadow:
    0 3px 0 #ff5252,
    0 4px 0 #f44336,
    0 5px 0 #e53935,
    0 6px 0 #d32f2f,
    0 7px 15px rgba(0, 0, 0, 0.35);
  margin: 0;
  letter-spacing: 3px;
  position: relative;
  top: -35px;
  margin-bottom: -22px;
  transform: perspective(500px) rotateX(-15deg);
  z-index: 10;
}

.modal-cancel-btn {
  margin-top: 10px;
  background: transparent;
  border: 2px solid #999;
  color: #666;
  width: 100%;
}

.modal-cancel-btn:hover {
  background: #f5f5f5;
  border-color: #666;
  color: #333;
}

/* Oops Ad Overlay - Light Compact */
.oops-ad-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  padding: 15px;
  box-sizing: border-box;
}

.oops-ad-content {
  text-align: center;
  max-width: 300px;
  position: relative;
  background: #fff;
  padding: 18px 16px;
  border-radius: 14px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Close Button - Top Right */
.oops-close-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  color: #666;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.oops-close-btn:hover {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: #fff;
}

.oops-close-btn svg {
  width: 16px;
  height: 16px;
}

.oops-ad-content h2 {
  color: var(--accent-color);
  font-size: 1.1rem;
  margin-bottom: 8px;
  margin-top: 8px;
}

.oops-ad-content p {
  color: #666;
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.oops-ad-image {
  width: 100%;
  max-width: 280px;
  height: auto;
  border-radius: 8px;
  margin-bottom: 12px;
  border: 1px solid #e0e0e0;
}

.oops-ad-slot {
  width: 100%;
  max-width: 300px;
  min-height: 250px;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 0.8rem;
  border: 1px solid #e0e0e0;
}

.oops-countdown {
  color: var(--accent-color);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.oops-continue-btn {
  padding: 10px 24px;
  background: var(--accent-color);
  color: #fff;
  border: none;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.oops-continue-btn:hover {
  background: #c41e4a;
}

.oops-continue-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.oops-continue-btn:not(:disabled):hover {
  transform: scale(1.05);
}
