/* ============================================================
   Plinkod Progress System — Styles
   Covers: auth page, progress page, leaderboard page,
           header user widget, points notification toast
   ============================================================ */

/* -- Design tokens ----------------------------------- */
:root {
    --pg-bg:          #0c0d14;
    --pg-card:        #161724;
    --pg-card-border: #2a2b3d;
    --pg-accent:      #4b45d2;
    --pg-accent-glow: rgba(141, 104, 255, 0.25);
    --pg-accent-light:#a587ff;
    --pg-text:        #e4e4e7;
    --pg-text-muted:  #8b8b9e;
    --pg-success:     #34d399;
    --pg-warn:        #fbbf24;
    --pg-gold:        #ffd700;
    --pg-silver:      #c0c0c0;
    --pg-bronze:      #cd7f32;
    --pg-radius:      14px;
    --pg-font:        'Montserrat', sans-serif;
}

/* Icon utilities */
.pg-icon-img {
    height: 1.25em;
    width: auto;
    vertical-align: -0.2em;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    margin-right: 4px;
}

.hw-icon-img {
    height: 1.4em;
    width: auto;
    vertical-align: middle;
    filter: drop-shadow(0 0 5px var(--pg-accent-glow));
    margin-right: 6px;
}

/* --- Page wrapper ----------------------------------- */
.pg-page {
    min-height: 100vh;
    background: var(--pg-bg);
    color: var(--pg-text);
    font-family: var(--pg-font);
    padding: 90px 20px 60px;
    margin-left: 60px;
}
@media (max-width: 976px) {
    .pg-page { margin-left: 0; padding-top: 75px; }
}

.pg-container {
    max-width: 960px;
    margin: 0 auto;
}

/* --- Auth page -------------------------------------- */
.auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 160px);
}

.auth-card {
    background: var(--pg-card);
    border: 1px solid var(--pg-card-border);
    border-radius: var(--pg-radius);
    padding: 40px 36px;
    width: 100%;
    max-width: 420px;
    position: relative;
    overflow: hidden;
}
.auth-card::before {
    content: '';
    position: absolute;
    top: -80px; right: -80px;
    width: 200px; height: 200px;
    background: var(--pg-accent);
    opacity: 0.07;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
}

.auth-card h1 {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0 0 6px;
    text-align: center;
}
.auth-card .auth-subtitle {
    text-align: center;
    color: var(--pg-text-muted);
    font-size: 0.85rem;
    margin: 0 0 28px;
}

.auth-tabs {
    display: flex;
    gap: 4px;
    background: rgba(255,255,255,0.04);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 28px;
}
.auth-tab {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.25s;
    color: var(--pg-text-muted);
    border: none;
    background: none;
    font-family: var(--pg-font);
}
.auth-tab.active {
    background: var(--pg-accent);
    color: #fff;
    box-shadow: 0 2px 12px var(--pg-accent-glow);
}

.auth-form { display: none; }
.auth-form.active { display: block; }

.auth-field {
    margin-bottom: 18px;
}
.auth-field label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--pg-text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.auth-field input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--pg-card-border);
    border-radius: 10px;
    color: var(--pg-text);
    font-size: 0.95rem;
    font-family: var(--pg-font);
    outline: none;
    transition: border 0.25s, box-shadow 0.25s;
    box-sizing: border-box;
}
.auth-field input:focus {
    border-color: var(--pg-accent);
    box-shadow: 0 0 0 3px var(--pg-accent-glow);
}

.auth-submit {
    width: 100%;
    padding: 13px;
    background: var(--pg-accent);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.25s, transform 0.15s;
    font-family: var(--pg-font);
    margin-top: 6px;
}
.auth-submit:hover { background: var(--pg-accent-light); transform: translateY(-1px); }
.auth-submit:active { transform: translateY(0); }
.auth-submit:disabled { opacity: 0.5; cursor: not-allowed; }

.auth-error {
    background: rgba(239,68,68,0.12);
    border: 1px solid rgba(239,68,68,0.3);
    color: #fca5a5;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    margin-bottom: 16px;
    display: none;
}
.auth-error.show { display: block; animation: pgShake 0.3s ease-in-out; }

@keyframes pgShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

/* --- Progress page ---------------------------------- */
.pg-hero {
    text-align: center;
    padding: 30px 20px 10px;
}
.pg-hero-avatar {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pg-accent), #6c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    font-size: 2rem;
    font-weight: 900;
    color: #fff;
    box-shadow: 0 0 30px var(--pg-accent-glow);
}
.pg-hero h1 { font-size: 1.5rem; margin: 0 0 4px; }
.pg-hero .pg-rank-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.06);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    color: var(--pg-warn);
    font-weight: 700;
}

/* Stats grid */
.pg-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin: 24px 0;
}
.pg-stat-card {
    background: var(--pg-card);
    border: 1px solid var(--pg-card-border);
    border-radius: var(--pg-radius);
    padding: 20px;
    position: relative;
    overflow: hidden;
}
.pg-stat-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--pg-accent);
    border-radius: 3px 3px 0 0;
    opacity: 0.6;
}
.pg-stat-card .pg-stat-icon {
    font-size: 1.4rem;
    margin-bottom: 8px;
}
.pg-stat-card .pg-stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
}
.pg-stat-card .pg-stat-label {
    font-size: 0.75rem;
    color: var(--pg-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* Progress bar */
.pg-milestone {
    background: var(--pg-card);
    border: 1px solid var(--pg-card-border);
    border-radius: var(--pg-radius);
    padding: 20px;
    margin-bottom: 24px;
}
.pg-milestone h3 {
    font-size: 0.9rem;
    margin: 0 0 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.pg-milestone h3 span { color: var(--pg-accent); }
.pg-progress-track {
    height: 10px;
    background: rgba(255,255,255,0.06);
    border-radius: 5px;
    overflow: hidden;
}
.pg-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--pg-accent), #6c3aed);
    border-radius: 5px;
    transition: width 1s ease;
    box-shadow: 0 0 12px var(--pg-accent-glow);
}

/* Activity feed */
.pg-activity {
    background: var(--pg-card);
    border: 1px solid var(--pg-card-border);
    border-radius: var(--pg-radius);
    padding: 20px;
}
.pg-activity h3 {
    font-size: 0.95rem;
    margin: 0 0 16px;
}
.pg-activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.pg-activity-item:last-child { border-bottom: none; }
.pg-activity-icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: rgba(141,104,255,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}
.pg-activity-text {
    flex: 1;
    font-size: 0.85rem;
}
.pg-activity-text .game-name { color: #fff; font-weight: 600; }
.pg-activity-pts {
    color: var(--pg-success);
    font-weight: 700;
    font-size: 0.85rem;
    white-space: nowrap;
}
.pg-activity-time {
    color: var(--pg-text-muted);
    font-size: 0.72rem;
    white-space: nowrap;
}

/* --- Leaderboard page ------------------------------- */
.lb-header {
    text-align: center;
    padding: 20px 0 30px;
}
.lb-header h1 {
    font-size: 1.8rem;
    margin: 0 0 6px;
}
.lb-header p {
    color: var(--pg-text-muted);
    font-size: 0.88rem;
    margin: 0;
}

/* Top 3 podium */
.lb-podium {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 14px;
    margin-bottom: 30px;
}
.lb-podium-card {
    background: var(--pg-card);
    border: 1px solid var(--pg-card-border);
    border-radius: var(--pg-radius);
    padding: 20px 16px 16px;
    text-align: center;
    width: 160px;
    position: relative;
    transition: transform 0.3s;
}
.lb-podium-card:hover { transform: translateY(-4px); }
.lb-podium-card.gold   { border-color: var(--pg-gold); box-shadow: 0 0 20px rgba(255,215,0,0.15); }
.lb-podium-card.silver { border-color: var(--pg-silver); }
.lb-podium-card.bronze { border-color: var(--pg-bronze); }
.lb-podium-card.gold   { order: 2; padding-top: 28px; }
.lb-podium-card.silver { order: 1; }
.lb-podium-card.bronze { order: 3; }

.lb-podium-rank {
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 0.9rem;
    margin: 0 auto 10px;
}
.gold   .lb-podium-rank { background: var(--pg-gold); color: #000; }
.silver .lb-podium-rank { background: var(--pg-silver); color: #000; }
.bronze .lb-podium-rank { background: var(--pg-bronze); color: #fff; }

.lb-podium-avatar {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pg-accent), #6c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
}
.lb-podium-name {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lb-podium-pts {
    color: var(--pg-accent);
    font-weight: 800;
    font-size: 1.1rem;
}
.lb-podium-time {
    color: var(--pg-text-muted);
    font-size: 0.7rem;
    margin-top: 2px;
}

/* Table-style list */
.lb-table {
    background: var(--pg-card);
    border: 1px solid var(--pg-card-border);
    border-radius: var(--pg-radius);
    overflow: hidden;
}
.lb-row {
    display: grid;
    grid-template-columns: 60px 1fr 120px 120px;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background 0.2s;
}
.lb-row:last-child { border-bottom: none; }
.lb-row:hover { background: rgba(255,255,255,0.02); }
.lb-row.lb-self { background: rgba(141,104,255,0.08); border-left: 3px solid var(--pg-accent); }

.lb-rank-num {
    font-weight: 800;
    font-size: 1rem;
    color: var(--pg-text-muted);
}
.lb-user {
    display: flex;
    align-items: center;
    gap: 10px;
}
.lb-user-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pg-accent), #6c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}
.lb-user-name { font-weight: 600; font-size: 0.88rem; }
.lb-pts { font-weight: 700; color: var(--pg-accent); text-align: right; }
.lb-time { color: var(--pg-text-muted); font-size: 0.8rem; text-align: right; }

.lb-load-more {
    display: block;
    margin: 20px auto;
    padding: 12px 32px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--pg-card-border);
    border-radius: 10px;
    color: var(--pg-text);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    font-family: var(--pg-font);
}
.lb-load-more:hover { background: var(--pg-accent); border-color: var(--pg-accent); }

/* --- Points notification toast ---------------------- */
#points-toast {
    position: fixed;
    bottom: -90px;
    right: 24px;
    background: rgba(22, 23, 36, 0.92);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(141,104,255,0.35);
    border-radius: 14px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 999999;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 20px var(--pg-accent-glow);
    transition: bottom 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    min-width: 220px;
    max-width: 340px;
}
#points-toast.show { bottom: 24px; }
#points-toast .pt-icon {
    width: 38px; height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--pg-accent), #6c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}
#points-toast .pt-body { flex: 1; }
#points-toast .pt-title {
    font-weight: 700;
    font-size: 0.92rem;
    color: #fff;
}
#points-toast .pt-sub {
    font-size: 0.72rem;
    color: var(--pg-text-muted);
    margin-top: 2px;
}
#points-toast .pt-amount {
    font-weight: 900;
    font-size: 1.3rem;
    color: var(--pg-success);
    white-space: nowrap;
    margin-right: 28px;
}
#points-toast .pt-close {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255,255,255,0.3);
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    transition: color 0.2s;
}
#points-toast .pt-close:hover {
    color: #fff;
}

@media (max-width: 600px) {
    #points-toast { right: 12px; left: 12px; max-width: none; min-width: 0; }
    #points-toast.show { bottom: 12px; }
}

/* --- Header user widget ----------------------------- */
.header-user-widget {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 8px;
}
@media (max-width: 976px) {
    .header .header-user-widget { display: none !important; }
}

.header-user-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(141,104,255,0.15);
    border: 1px solid rgba(141,104,255,0.3);
    color: #fff;
    padding: 5px 14px;
    border-radius: 20px;
    font-family: var(--pg-font);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    text-decoration: none;
    white-space: nowrap;
}
.header-user-btn:hover {
    background: var(--pg-accent);
    border-color: var(--pg-accent);
    transform: translateY(-1px);
}
.header-user-btn .hw-points {
    color: var(--pg-success);
    font-weight: 800;
}

.header-auth-btns {
    display: flex;
    gap: 6px;
}
.header-auth-btn {
    padding: 5px 14px;
    border-radius: 20px;
    font-family: var(--pg-font);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    border: 1px solid rgba(141,104,255,0.3);
    text-decoration: none;
    white-space: nowrap;
}
.header-auth-btn.signin {
    background: var(--pg-accent);
    color: #fff;
    border-color: var(--pg-accent);
}
.header-auth-btn.signup {
    background: transparent;
    color: var(--pg-accent);
}
.header-auth-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--pg-accent-glow);
}

/* --- Reward Notification (PHP Port) ---------------- */
#ad-notification {
    position: fixed;
    top: -120px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(22, 23, 36, 0.9);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(141, 104, 255, 0.4);
    border-radius: 50px;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 2000;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 20px var(--pg-accent-glow);
    transition: top 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    min-width: 320px;
    max-width: 90vw;
}

#ad-notification.show {
    top: 30px;
}#ad-notification.gem-variant.show,
#ad-notification.gift-variant.show,
#ad-notification.drop-variant.show {
    animation: reward-pulse 4s infinite ease-in-out;
}

@keyframes reward-pulse {
    0%, 100% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.03); box-shadow: 0 15px 50px var(--pg-accent-glow); }
}

#ad-notification .ad-icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
    filter: drop-shadow(0 0 5px var(--pg-accent-glow));
}

#ad-notification .ad-text {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

#ad-notification .ad-btn {
    background: linear-gradient(135deg, var(--pg-accent), #6c3aed);
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
    font-family: var(--pg-font);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

#ad-notification .ad-btn:hover {
    transform: scale(1.05) translateY(-1px);
    box-shadow: 0 6px 16px var(--pg-accent-glow);
}

#ad-notification .ad-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 24px;
    cursor: pointer;
    padding: 0 4px;
    transition: color 0.3s;
    line-height: 1;
}

#ad-notification .ad-close:hover { 
    color: #fff; 
}

#ad-notification .ad-progress-container {
    position: absolute;
    bottom: -1px;
    left: 40px;
    right: 40px;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

#ad-notification .ad-progress-bar {
    height: 100%;
    background: var(--pg-accent);
    width: 100%;
    box-shadow: 0 0 10px var(--pg-accent);
}

#ad-notification.show .ad-progress-bar {
    animation: reward-shrink 12s linear forwards;
}

@keyframes reward-shrink {
    from { width: 100%; }
    to { width: 0%; }
}
@font-face {
    font-family: 'Amiri';
    src: url('https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&display=swap');
}
.arabic-text {
    font-family: 'Amiri', serif;
}
.sidebar-user-card {
    padding: 14px 12px;
    margin: 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sidebar-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.sidebar-user-avatar {
    width: 36px; height: 36px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--pg-accent), #6c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 12px var(--pg-accent-glow);
}
.sidebar-user-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s;
    white-space: nowrap;
}
.sidebar:hover .sidebar-user-name,
.sidebar.pcactive .sidebar-user-name { opacity: 1; }

.sidebar-user-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.sidebar-user-links a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0px;
    border-radius: 12px;
    color: var(--pg-text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
    font-family: var(--pg-font);
}
.sidebar-user-links a:hover {
    background: rgba(141, 104, 255, 0.1);
    color: #fff;
    transform: translateX(4px);
}
.sidebar-user-links .link-icon {
    width: 20px;
    text-align: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}
.sidebar-user-links .link-label {
    opacity: 0;
    transition: opacity 0.3s;
    white-space: nowrap;
}
.sidebar:hover .link-label,
.sidebar.pcactive .link-label { opacity: 1; }

@media (max-width: 976px) {
    .sidebar-user-name,
    .sidebar .link-label { opacity: 1 !important; }
}

/* Responsive leaderboard */
@media (max-width: 700px) {
    .lb-podium { flex-direction: column; align-items: center; }
    .lb-podium-card { width: 90%; max-width: 280px; }
    .lb-podium-card.gold, .lb-podium-card.silver, .lb-podium-card.bronze { order: unset; }
    .lb-row { grid-template-columns: 45px 1fr 80px; gap: 4px; padding: 12px 14px; }
    .lb-time { display: none; }
    .pg-stats { grid-template-columns: repeat(2, 1fr); }
}

/* Empty state */
.pg-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--pg-text-muted);
}
.pg-empty-icon { font-size: 3rem; margin-bottom: 12px; opacity: 0.4; }
.pg-empty h3 { color: var(--pg-text); margin: 0 0 6px; }
.pg-empty p { font-size: 0.88rem; margin: 0; }
.pg-empty a {
    display: inline-block;
    margin-top: 16px;
    padding: 10px 24px;
    background: var(--pg-accent);
    color: #fff;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    transition: background 0.25s;
}
.pg-empty a:hover { background: var(--pg-accent-light); }
/* --- Remove Ads Notification --- */
#ad-notification {
    position: fixed;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(26, 26, 36, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(141, 104, 255, 0.3);
    border-radius: 50px;
    padding: 8px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 1000000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: top 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    min-width: 300px;
    max-width: 95vw;
}

#ad-notification.show {
    top: 20px;
}

#ad-notification.gem-variant.show,
#ad-notification.gift-variant.show,
#ad-notification.gift2-variant.show,
#ad-notification.gem2-variant.show,
#ad-notification.drop-variant.show,
#ad-notification.bonus-variant.show {
    animation: gem-pulse 3s infinite ease-in-out;
}

@keyframes gem-pulse {
    0%, 100% { transform: translateX(-50%) scale(1); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
    50% { transform: translateX(-50%) scale(1.04); box-shadow: 0 10px 40px rgba(141, 104, 255, 0.6); }
}

#ad-notification .ad-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

#ad-notification .ad-text {
    font-size: 19px;
    color: #ffffff !important;
    white-space: nowrap;
    font-family: Montserrat, sans-serif;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

#ad-notification .ad-btn {
    background: #4b45d2;
    color: #fff;
    border: none;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 12px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    font-family: "Montserrat", serif !important;
}

#ad-notification .ad-btn:hover {
    background: #a587ff;
    transform: scale(1.05);
}

#ad-notification .ad-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 20px;
    cursor: pointer;
    padding: 0 5px;
    transition: color 0.3s;
    line-height: 1;
}

#ad-notification .ad-close:hover {
    color: #fff;
}

#ad-notification .ad-progress-container {
    position: absolute;
    bottom: 0;
    left: 25px;
    right: 25px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

#ad-notification .ad-progress-bar {
    height: 100%;
    background: #4b45d2;
    width: 100%;
    animation: ad-shrink 12s linear forwards;
}

@keyframes ad-shrink {
    from { width: 100%; }
    to { width: 0%; }
}

@media (max-width: 768px) {
    #ad-notification {
        padding: 5px 12px;
        gap: 8px;
    }
    #ad-notification .ad-text {
        font-size: 15px;
    }
    #ad-notification .ad-icon {
        width: 28px;
        height: 28px;
    }
    #ad-notification .ad-btn {
        padding: 4px 10px;
        font-size: 12px;
    }
}