/* =========================
   🧠 CARD SYSTEM
   ========================= */

.ap-home-hero__content,
.ap-home-hero__panel,
.ap-home-affiliate__box,
.ap-home-cta__box,
.ap-upgrade-hero__box,
.ap-upgrade-cta__box,
.ap-compare-card,
.ap-surge-upgrade-panel__box,
.ap-points-progress__box,
.ap-upgrade-trigger__box {
    background: linear-gradient(180deg, var(--ap-bg-darker) 0%, var(--ap-bg-dark) 100%);
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius-md, 18px);
    padding: 28px;
    box-shadow: var(--ap-shadow-md, 0 12px 30px rgba(0,0,0,0.18));

    transition:
        transform var(--ap-speed-fast, 0.2s) var(--ap-ease, ease),
        box-shadow var(--ap-speed-fast, 0.2s) var(--ap-ease, ease),
        border-color var(--ap-speed-fast, 0.2s) var(--ap-ease, ease);
}

/* hover lift (only interactive cards) */
.ap-compare-card:hover,
.ap-surge-card:hover,
.ap-locked-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--ap-shadow-lg, 0 16px 36px rgba(0,0,0,0.28));
    border-color: var(--ap-border-strong, rgba(255,255,255,0.10));
}

/* =========================
   📦 GRID SYSTEM
   ========================= */

.ap-card-grid--three {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--ap-space-xl, 20px);
}

.ap-feature-stack {
    display: grid;
    gap: var(--ap-space-lg, 16px);
}

/* =========================
   🧩 FEATURE ROW
   ========================= */

.ap-feature-row {
    display: flex;
    justify-content: space-between;
    gap: var(--ap-space-xl, 20px);
    align-items: center;

    background: linear-gradient(180deg, var(--ap-bg-darker) 0%, var(--ap-bg-dark) 100%);
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius-md, 18px);
    padding: var(--ap-space-xl, 20px);
    box-shadow: var(--ap-shadow-md);

    transition: transform 0.15s ease;
}

.ap-feature-row:hover {
    transform: translateY(-2px);
}

.ap-feature-row h3 {
    margin: 0 0 var(--ap-space-sm, 8px);
}

.ap-feature-row p {
    margin: 0;
    color: var(--ap-text-muted);
}

.ap-feature-row__tag {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    padding: var(--ap-space-sm, 8px) var(--ap-space-md, 12px);
    border-radius: var(--ap-radius-pill, 999px);

    background: rgba(255,255,255,0.05);
    border: 1px solid var(--ap-border);
    color: var(--ap-blue);
    font-size: var(--ap-text-xs, 0.78rem);
    font-weight: 700;
}

/* =========================
   📊 STAT SYSTEM
   ========================= */

.ap-stat-grid,
.ap-points-stats,
.ap-upgrade-trigger__stats {
    display: grid;
    gap: var(--ap-space-lg, 16px);
}

.ap-stat-grid {
    grid-template-columns: 1fr 1fr;
    margin-top: var(--ap-space-md, 12px);
}

.ap-points-stats,
.ap-upgrade-trigger__stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: var(--ap-space-xl, 20px);
}

.ap-stat-card,
.ap-points-stat,
.ap-upgrade-trigger__stat,
.ap-surge-card,
.ap-locked-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius-md, 18px);
    padding: var(--ap-space-lg, 16px);

    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

/* stat hover (subtle) */
.ap-stat-card:hover,
.ap-points-stat:hover {
    transform: translateY(-2px);
    box-shadow: var(--ap-shadow-sm);
}

.ap-stat-card--live {
    background: linear-gradient(135deg, rgba(34,197,94,0.14), rgba(56,189,248,0.08));
}

/* =========================
   🔘 BUTTON SYSTEM
   ========================= */

.ap-btn {
    background: transparent !important;
    color: var(--ap-mint) !important;
    border: 2px solid var(--ap-mint) !important;

    padding: 12px 16px;
    font-weight: 600;
    border-radius: var(--ap-radius-md, 10px);
    line-height: 1.2;

    width: 100%;
    cursor: pointer;

    transition:
        transform 0.1s ease,
        box-shadow 0.15s ease,
        background 0.2s ease,
        color 0.2s ease;
}

/* hover */
.ap-btn:hover {
    background: var(--ap-mint) !important;
    color: #000 !important;
    box-shadow: 0 0 14px rgba(0,255,136,0.35);
    transform: translateY(-1px);
}

/* click / press feel */
.ap-btn:active {
    transform: translateY(1px) scale(0.98);
    box-shadow: none;
}

/* focus (accessibility + polish) */
.ap-btn:focus-visible {
    outline: 2px solid var(--ap-cyan, #38bdf8);
    outline-offset: 2px;
}

/* PRIMARY */
.ap-btn--primary {
    position: relative;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(0,255,159,0.35),
        0 10px 28px rgba(0,255,159,0.18);
}

/* shimmer */
.ap-btn--primary::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,.2), transparent);
    opacity: 0;
    animation: apBtnShimmer 3s infinite;
}

/* SECONDARY */
.ap-btn--secondary {
    opacity: 0.85;
}

.ap-btn--secondary:hover {
    opacity: 1;
}

/* =========================
   🎬 MOTION CONTROL
   ========================= */

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* animation */
@keyframes apBtnShimmer {
    0% { transform: translateX(-60%); opacity: 0; }
    40% { opacity: .25; }
    100% { transform: translateX(60%); opacity: 0; }
}

/* =========================
   📱 RESPONSIVE
   ========================= */

@media (max-width: 980px) {
    .ap-card-grid--three {
        grid-template-columns: 1fr;
    }

    .ap-feature-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .ap-home-hero__content,
    .ap-home-hero__panel,
    .ap-home-affiliate__box,
    .ap-home-cta__box,
    .ap-upgrade-hero__box,
    .ap-upgrade-cta__box,
    .ap-compare-card,
    .ap-surge-upgrade-panel__box,
    .ap-points-progress__box,
    .ap-upgrade-trigger__box {
        padding: var(--ap-space-2xl, 24px);
    }
}

@media (max-width: 900px) {
    .ap-points-stats,
    .ap-upgrade-trigger__stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .ap-stat-grid {
        grid-template-columns: 1fr;
    }
}