/* ============================================================
   RATING CARDS v5 — Dark Editorial Redesign
   Animated, modern, premium casino cards
   Layout: rank | logo | content | cta
   ============================================================ */

/* ── Card staggered entrance animation ───────────────────── */

@keyframes cardReveal {
    from {
        opacity: 0;
        transform: translateY(28px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes shimmer {
    0%   { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}

@keyframes glowPulse {
    0%, 100% { box-shadow: 0 2px 28px rgba(192,64,200,0.22); }
    50%       { box-shadow: 0 2px 44px rgba(192,64,200,0.40); }
}

@keyframes rankPop {
    0%   { transform: scale(0.5); opacity: 0; }
    70%  { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes btnGlow {
    0%, 100% { box-shadow: 0 4px 22px rgba(192,64,200,0.50); }
    50%       { box-shadow: 0 4px 38px rgba(192,64,200,0.78); }
}

/* ── Wrap ────────────────────────────────────────────────── */

.rating-cards-wrap {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin: 36px 0 56px;
}

/* ── Card ────────────────────────────────────────────────── */

.rc-card {
    position: relative;
    display: grid;
    grid-template-columns: 62px 190px 1fr 172px;
    align-items: stretch;
    background: rgba(22, 22, 30, 0.85);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    overflow: visible;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    /* Entrance animation — staggered by data-rank */
    animation: cardReveal 0.55s cubic-bezier(0.34, 1.08, 0.64, 1) both;
}

.rc-card[data-rank="1"] { animation-delay: 0.05s; }
.rc-card[data-rank="2"] { animation-delay: 0.12s; }
.rc-card[data-rank="3"] { animation-delay: 0.19s; }
.rc-card[data-rank="4"] { animation-delay: 0.26s; }
.rc-card[data-rank="5"] { animation-delay: 0.33s; }
.rc-card[data-rank="6"] { animation-delay: 0.40s; }
.rc-card[data-rank="7"] { animation-delay: 0.47s; }
.rc-card[data-rank="8"] { animation-delay: 0.54s; }
.rc-card[data-rank="9"] { animation-delay: 0.61s; }
.rc-card[data-rank="10"] { animation-delay: 0.68s; }

/* Top shimmer line on hover */
.rc-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, #c040c8, #7b2fff, #00d4ff, #ff6b35);
    border-radius: 18px 18px 0 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.rc-card:hover::before { opacity: 1; }

.rc-card:hover {
    border-color: rgba(192,64,200,0.45);
    box-shadow: 0 8px 40px rgba(192,64,200,0.20), 0 2px 8px rgba(0,0,0,0.5);
    transform: translateY(-3px);
    z-index: 2;
    transition: border-color 0.25s, box-shadow 0.25s, transform 0.22s;
}

.rc-card {
    transition: border-color 0.25s, box-shadow 0.25s, transform 0.22s;
}

/* ── Rank #1 — gold/purple premium style ─────────────────── */

.rc-card[data-rank="1"] {
    background: linear-gradient(135deg,
        rgba(192,64,200,0.18) 0%,
        rgba(22,22,30,0.95) 50%,
        rgba(123,47,255,0.12) 100%);
    border-color: rgba(192,64,200,0.50);
    animation: cardReveal 0.55s cubic-bezier(0.34,1.08,0.64,1) 0.05s both,
               glowPulse 3s ease-in-out 1s infinite;
}

/* Crown badge for #1 */
.rc-card[data-rank="1"]::after {
    content: '👑';
    position: absolute;
    top: -14px;
    left: 28px;
    font-size: 22px;
    filter: drop-shadow(0 2px 6px rgba(192,64,200,0.6));
    animation: rankPop 0.6s cubic-bezier(0.34,1.56,0.64,1) 0.6s both;
}

/* ── Rank ────────────────────────────────────────────────── */

.rc-rank {
    display: flex;
    align-items: center;
    justify-content: center;
}

.rc-rank-num {
    font-family: "Funnel Display", "DM Sans", sans-serif;
    font-size: 24px;
    font-weight: 800;
    color: rgba(255,255,255,0.35);
    line-height: 1;
    transition: color 0.25s, transform 0.25s;
}

.rc-card:hover .rc-rank-num {
    color: rgba(255,255,255,0.65);
    transform: scale(1.1);
}

.rc-card[data-rank="1"] .rc-rank-num {
    color: #d49fd5;
    animation: rankPop 0.7s cubic-bezier(0.34,1.56,0.64,1) 0.4s both;
}

.rc-card[data-rank="2"] .rc-rank-num { color: rgba(200,200,200,0.6); }
.rc-card[data-rank="3"] .rc-rank-num { color: rgba(205,145,90,0.7); }

/* ── Logo ────────────────────────────────────────────────── */

.rc-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
    border-right: 1px solid rgba(255,255,255,0.06);
}

.rc-logo a {
    display: block;
    line-height: 0;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

/* Shimmer on logo hover */
.rc-logo a::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        transparent 35%,
        rgba(255,255,255,0.20) 50%,
        transparent 65%
    );
    background-size: 400px 100%;
    opacity: 0;
    transition: opacity 0.2s;
}

.rc-card:hover .rc-logo a::after {
    opacity: 1;
    animation: shimmer 0.7s ease forwards;
}

.rc-logo img {
    width: 148px;
    height: auto;
    border-radius: 12px;
    display: block;
    transition: transform 0.28s cubic-bezier(0.4,0,0.2,1), filter 0.28s;
}

.rc-card:hover .rc-logo img {
    transform: scale(1.06);
    filter: brightness(1.08) saturate(1.1);
}

/* ── Content ─────────────────────────────────────────────── */

.rc-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px 28px;
    gap: 10px;
    border-right: 1px solid rgba(255,255,255,0.06);
    min-width: 0;
    overflow: hidden;
}

/* Bonus text — large, dominant */
.rc-bonus-text {
    font-family: "Funnel Display", "DM Sans", sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    line-height: 1.25;
    white-space: normal;
    transition: color 0.2s;
}

.rc-card:hover .rc-bonus-text { color: #fff; }

.rc-bonus-text p,
.rc-bonus-text strong {
    font-size: inherit !important;
    font-weight: inherit !important;
    color: #fff !important;
    line-height: inherit !important;
    margin: 0 !important;
    white-space: normal;
}

/* Badge */
.rc-bonus-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(192,64,200,0.18);
    border: 1px solid rgba(192,64,200,0.42);
    color: #d49fd5;
    font-size: 11.5px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 30px;
    white-space: nowrap;
    align-self: flex-start;
    letter-spacing: 0.04em;
    transition: background 0.2s, border-color 0.2s;
}

.rc-card:hover .rc-bonus-badge {
    background: rgba(192,64,200,0.30);
    border-color: rgba(192,64,200,0.65);
}

/* Features */
.rc-features {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
    min-width: 0;
}

.rc-features .feature-item,
.rc-features ul li {
    display: flex;
    align-items: baseline;
    gap: 7px;
    font-size: 12.5px;
    font-weight: 400;
    color: rgba(255,255,255,0.45);
    line-height: 1.4;
    list-style: none;
    min-width: 0;
    transition: color 0.2s;
}

.rc-card:hover .rc-features .feature-item,
.rc-card:hover .rc-features ul li {
    color: rgba(255,255,255,0.60);
}

.rc-features .feature-item > *:first-child,
.rc-features ul li > *:first-child { flex-shrink: 0; }

.rc-features ul { display: contents; list-style: none; padding: 0; margin: 0; }

.rc-features .fi { font-size: 13px; flex-shrink: 0; opacity: .7; }
.rc-features span { color: rgba(255,255,255,0.45); font-size: 12.5px; white-space: normal !important; }

/* ── CTA ─────────────────────────────────────────────────── */

.rc-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 20px;
}

.rc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(150deg, #c040c8, #8a30a0, #6e2070);
    color: #fff !important;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .10em;
    text-transform: uppercase;
    padding: 15px 24px;
    border-radius: 50px;
    text-decoration: none !important;
    white-space: nowrap;
    box-shadow: 0 4px 22px rgba(192,64,200,0.50);
    transition: filter 0.22s, box-shadow 0.22s, transform 0.22s, gap 0.2s;
    position: relative;
    overflow: hidden;
}

/* Shimmer on button */
.rc-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        transparent 35%,
        rgba(255,255,255,0.18) 50%,
        transparent 65%
    );
    background-size: 300px 100%;
    opacity: 0;
}

.rc-btn:hover::before {
    opacity: 1;
    animation: shimmer 0.6s ease forwards;
}

.rc-btn:hover {
    filter: brightness(1.16);
    box-shadow: 0 8px 32px rgba(192,64,200,0.70);
    transform: translateY(-2px) scale(1.02);
    gap: 12px;
    color: #fff !important;
}

/* #1 card btn — continuous glow */
.rc-card[data-rank="1"] .rc-btn {
    animation: btnGlow 2.5s ease-in-out 1s infinite;
}

.rc-btn svg { width: 14px; height: 14px; flex-shrink: 0; opacity: .9; transition: transform 0.2s; }
.rc-btn:hover svg { transform: translateX(3px); }

/* ── Responsive ─────────────────────────────────────────── */

@media (max-width: 1199px) {
    .rc-card         { grid-template-columns: 52px 164px 1fr 152px; }
    .rc-logo img     { width: 130px; }
    .rc-logo         { padding: 18px 14px; }
    .rc-content      { padding: 18px 22px; gap: 8px; }
    .rc-bonus-text   { font-size: 20px; }
    .rc-cta          { padding: 18px 16px; }
    .rc-btn          { padding: 13px 18px; font-size: 12px; }
}

@media (max-width: 1059px) {
    .rc-card         { grid-template-columns: 44px 148px 1fr 138px; }
    .rc-logo img     { width: 116px; }
    .rc-logo         { padding: 16px 12px; }
    .rc-content      { padding: 16px 18px; gap: 7px; }
    .rc-bonus-text   { font-size: 18px; }
    .rc-cta          { padding: 16px 12px; }
    .rc-btn          { padding: 12px 14px; font-size: 12px; letter-spacing: .07em; }
}

/* ── ≤767px: full stack ──────────────────────────────────── */

@media (max-width: 767px) {
    .rc-card {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        border-radius: 16px;
    }

    .rc-rank, .rc-logo, .rc-content, .rc-cta {
        grid-column: 1;
        border-right: none;
    }

    .rc-rank {
        grid-row: 1;
        justify-content: flex-start;
        padding: 16px 18px 0;
    }

    .rc-logo {
        grid-row: 2;
        border-bottom: 1px solid rgba(255,255,255,0.07);
        padding: 16px 20px;
        justify-content: center;
    }

    .rc-logo img { width: 160px; }

    .rc-content {
        grid-row: 3;
        border-bottom: 1px solid rgba(255,255,255,0.07);
        padding: 20px 20px 18px;
        align-items: center;
        text-align: center;
        gap: 10px;
    }

    .rc-bonus-text   { font-size: 20px; }
    .rc-bonus-badge  { align-self: center; }

    .rc-features {
        align-items: center;
        gap: 5px;
    }

    .rc-features .feature-item,
    .rc-features ul li { justify-content: flex-start; flex-wrap: wrap; }

    .rc-cta { grid-row: 4; padding: 16px 20px 22px; }

    .rc-btn {
        width: 100%;
        max-width: 280px;
        padding: 16px 28px;
        font-size: 14px;
    }

    .rc-card:hover { transform: none; }

    /* Disable glow animation on mobile for performance */
    .rc-card[data-rank="1"] { animation: cardReveal 0.55s cubic-bezier(0.34,1.08,0.64,1) 0.05s both; }
    .rc-card[data-rank="1"] .rc-btn { animation: none; box-shadow: 0 4px 22px rgba(192,64,200,0.5); }
}

/* ── Accessibility: reduced motion ──────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .rc-card,
    .rc-card[data-rank="1"],
    .rc-card[data-rank="1"] .rc-btn,
    .rc-card[data-rank="1"]::after,
    .rc-card[data-rank="1"] .rc-rank-num {
        animation: none !important;
    }

    .rc-card:hover { transform: none; }
}
