/* ===== RewardGT Landing Pages — Premium iOS App-Matching Design ===== */

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Montserrat', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #F5F5FA;
    color: #2D2D3A;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== HEADER ===== */
.header {
    background: linear-gradient(135deg, #6C63FF 0%, #9B8FE8 45%, #BA97BD 100%);
    padding: 48px 24px 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Decorative circles — matching iOS MainPage */
.header .circle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}
.header .circle-1 {
    width: 200px; height: 200px;
    top: -60px; right: -40px;
    background: rgba(255,255,255,0.10);
}
.header .circle-2 {
    width: 140px; height: 140px;
    bottom: -50px; left: -30px;
    background: rgba(255,255,255,0.08);
}
.header .circle-3 {
    width: 80px; height: 80px;
    top: 30px; left: 15%;
    background: rgba(255,255,255,0.06);
}

.header-content {
    position: relative;
    z-index: 1;
}

.header .app-icon {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    margin: 0 auto 16px;
    display: block;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    background: #fff;
}

.header h1 {
    font-weight: 700;
    font-size: 2rem;
    color: #fff;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}

.header p {
    color: rgba(255,255,255,0.88);
    font-size: 1rem;
    font-weight: 500;
    max-width: 320px;
    margin: 0 auto;
    line-height: 1.4;
}

/* ===== SEARCH BAR (home) ===== */
.search-bar {
    max-width: 480px;
    margin: -24px auto 0;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

.search-bar input {
    width: 100%;
    padding: 14px 18px 14px 46px;
    border-radius: 16px;
    border: none;
    background: #fff;
    box-shadow: 0 4px 20px rgba(108,99,255,0.15);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.92rem;
    font-weight: 500;
    color: #2D2D3A;
    outline: none;
    transition: box-shadow 0.3s;
}

.search-bar input::placeholder { color: #B0B0C0; }
.search-bar input:focus {
    box-shadow: 0 4px 24px rgba(108,99,255,0.25);
}

.search-bar .search-icon {
    position: absolute;
    left: 36px;
    top: 50%;
    transform: translateY(-50%);
    color: #9B8FE8;
    font-size: 1.1rem;
    pointer-events: none;
}

/* ===== NAV (Game pill tabs) ===== */
.nav {
    background: #fff;
    padding: 14px 16px;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }

.nav a {
    color: #8E8E9A;
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 24px;
    font-size: 0.82rem;
    font-weight: 600;
    background: #F0F0F6;
    transition: all 0.25s ease;
    white-space: nowrap;
    flex-shrink: 0;
}
.nav a:hover {
    background: #E8E6F8;
    color: #6C63FF;
}
.nav a.active {
    background: linear-gradient(135deg, #6C63FF, #9B8FE8);
    color: #fff;
    box-shadow: 0 2px 10px rgba(108,99,255,0.3);
}

/* ===== CONTAINER ===== */
.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 28px 16px 16px;
}

/* ===== SECTION TITLE ===== */
.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2D2D3A;
    margin-bottom: 6px;
    text-align: center;
}

.section-subtitle {
    text-align: center;
    color: #8E8E9A;
    font-size: 0.88rem;
    font-weight: 500;
    margin-bottom: 24px;
}

/* ===== HOME PAGE — GAME GRID ===== */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 14px;
}

.game-card {
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    overflow: hidden;
    text-decoration: none;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,0.07);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    animation: fadeUp 0.5s ease both;
}
.game-card:nth-child(1)  { animation-delay: 0.02s; }
.game-card:nth-child(2)  { animation-delay: 0.05s; }
.game-card:nth-child(3)  { animation-delay: 0.08s; }
.game-card:nth-child(4)  { animation-delay: 0.11s; }
.game-card:nth-child(5)  { animation-delay: 0.14s; }
.game-card:nth-child(6)  { animation-delay: 0.17s; }
.game-card:nth-child(7)  { animation-delay: 0.20s; }
.game-card:nth-child(8)  { animation-delay: 0.23s; }
.game-card:nth-child(9)  { animation-delay: 0.26s; }
.game-card:nth-child(10) { animation-delay: 0.29s; }
.game-card:nth-child(11) { animation-delay: 0.32s; }
.game-card:nth-child(12) { animation-delay: 0.35s; }

.game-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(108,99,255,0.16);
}

.game-card .card-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}

.game-card .card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 36px 12px 14px;
    background: linear-gradient(to top, rgba(0,0,0,0.70) 0%, rgba(0,0,0,0.0) 100%);
}

.game-card .game-name {
    color: #fff;
    font-weight: 700;
    font-size: 0.88rem;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
    line-height: 1.2;
}

.game-card .game-count {
    color: rgba(255,255,255,0.8);
    font-size: 0.72rem;
    font-weight: 500;
    margin-top: 2px;
}

/* ===== GAME PAGE HEADER ===== */
.game-hero {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 24px;
    padding: 20px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    animation: fadeUp 0.4s ease both;
}

.game-hero img {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    flex-shrink: 0;
}

.game-hero .info h2 {
    font-weight: 700;
    font-size: 1.4rem;
    color: #2D2D3A;
    line-height: 1.2;
}

.game-hero .info .tagline {
    color: #8E8E9A;
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 4px;
}

.game-hero .info .live-dot {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #4ECDC4;
}

.game-hero .info .live-dot::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ECDC4;
    display: inline-block;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(78,205,196,0.5); }
    50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(78,205,196,0); }
}

/* ===== DATE GROUP ===== */
.date-group {
    margin-bottom: 24px;
    animation: fadeUp 0.5s ease both;
}

.date-group-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding-left: 4px;
}

.date-group-label .bar {
    width: 4px;
    height: 20px;
    border-radius: 2px;
    background: linear-gradient(180deg, #6C63FF, #9B8FE8);
    flex-shrink: 0;
}

.date-group-label span {
    font-size: 0.85rem;
    font-weight: 700;
    color: #2D2D3A;
}

/* ===== REWARD CARD ===== */
.rewards-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.reward-card {
    background: #fff;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: fadeUp 0.4s ease both;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.reward-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.09);
}

/* Left icon area */
.reward-card .reward-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}
.reward-card .reward-icon.icon-code {
    background: linear-gradient(135deg, rgba(108,99,255,0.12), rgba(155,143,232,0.12));
    color: #6C63FF;
}
.reward-card .reward-icon.icon-link {
    background: linear-gradient(135deg, rgba(78,205,196,0.12), rgba(69,183,170,0.12));
    color: #4ECDC4;
}

/* Right content */
.reward-card .reward-body {
    flex: 1;
    min-width: 0;
}

.reward-card .reward-type {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
}
.reward-card .reward-type.type-code { color: #6C63FF; }
.reward-card .reward-type.type-link { color: #4ECDC4; }

.reward-card .desc {
    color: #2D2D3A;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
}

/* Code display */
.reward-card .code-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #F5F5FA;
    border: 1.5px solid #E8E8F0;
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
}
.reward-card .code-box:hover {
    background: #EDECF6;
    border-color: #C5C1EC;
}
.reward-card .code-box:active {
    transform: scale(0.98);
}

.reward-card .code-box .code-text {
    font-family: 'Montserrat', monospace;
    font-weight: 700;
    font-size: 1rem;
    color: #6C63FF;
    letter-spacing: 0.5px;
}

.reward-card .code-box .copy-btn {
    background: linear-gradient(135deg, #6C63FF, #9B8FE8);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 6px 14px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.reward-card .code-box .copy-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 10px rgba(108,99,255,0.3);
}

/* Link button */
.reward-card .link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #4ECDC4, #38B2AC);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 10px 20px;
    border-radius: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: 8px;
    box-shadow: 0 2px 10px rgba(78,205,196,0.25);
}
.reward-card .link-btn:hover {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 4px 16px rgba(78,205,196,0.35);
}
.reward-card .link-btn svg {
    width: 14px;
    height: 14px;
}

/* Meta info row */
.reward-card .meta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
}
.reward-card .meta span {
    color: #A0A0B0;
    font-size: 0.72rem;
    font-weight: 500;
}

/* Copied toast */
.copied-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(60px);
    background: #2D2D3A;
    color: #fff;
    padding: 12px 28px;
    border-radius: 14px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.copied-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ===== CTA SECTION ===== */
.cta-section {
    margin-top: 36px;
    background: linear-gradient(135deg, #6C63FF 0%, #9B8FE8 45%, #BA97BD 100%);
    border-radius: 24px;
    padding: 40px 28px;
    text-align: center;
    position: relative;
    overflow: hidden;
    animation: fadeUp 0.5s ease both;
}

/* Decorative elements */
.cta-section .deco-1 {
    position: absolute;
    width: 140px; height: 140px;
    top: -40px; right: -30px;
    border-radius: 50%;
    background: rgba(255,255,255,0.10);
    pointer-events: none;
}
.cta-section .deco-2 {
    position: absolute;
    width: 80px; height: 80px;
    bottom: -20px; left: 10%;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    pointer-events: none;
}

.cta-section h3 {
    font-weight: 700;
    font-size: 1.4rem;
    color: #fff;
    margin-bottom: 8px;
    position: relative;
}

.cta-section p {
    color: rgba(255,255,255,0.88);
    margin-bottom: 24px;
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.5;
    position: relative;
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 16px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.88rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.cta-btn:hover {
    transform: scale(1.05);
}

.cta-btn.apple {
    background: #fff;
    color: #2D2D3A;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.cta-btn.apple:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,0.18);
}

.cta-btn.google {
    background: rgba(255,255,255,0.18);
    color: #fff;
    border: 2px solid rgba(255,255,255,0.35);
    backdrop-filter: blur(8px);
}
.cta-btn.google:hover {
    background: rgba(255,255,255,0.28);
    border-color: rgba(255,255,255,0.5);
}

.cta-btn svg {
    width: 20px;
    height: 20px;
}

/* ===== FEATURES STRIP ===== */
.features-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 28px;
    position: relative;
}

.feat {
    background: rgba(255,255,255,0.13);
    border-radius: 16px;
    padding: 18px 10px;
    text-align: center;
    backdrop-filter: blur(6px);
}
.feat .feat-num {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
}
.feat .feat-label {
    color: rgba(255,255,255,0.78);
    font-size: 0.72rem;
    font-weight: 600;
}

/* ===== SEO CONTENT ===== */
.seo-content {
    margin-top: 32px;
    color: #8E8E9A;
    font-size: 0.82rem;
    line-height: 1.8;
    background: #fff;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.seo-content h3 {
    color: #2D2D3A;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 10px;
}

/* ===== STATES ===== */
.no-rewards {
    text-align: center;
    padding: 56px 28px;
    color: #8E8E9A;
    font-weight: 500;
    font-size: 0.92rem;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.05);
    line-height: 1.6;
}

.no-rewards .empty-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    display: block;
}

.loading {
    text-align: center;
    padding: 56px 24px;
    color: #6C63FF;
    font-weight: 600;
    font-size: 0.92rem;
}

.loading::after {
    content: '';
    display: block;
    width: 36px;
    height: 36px;
    margin: 16px auto 0;
    border: 3px solid #E8E8F0;
    border-top-color: #6C63FF;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== FOOTER ===== */
footer {
    text-align: center;
    padding: 28px 16px;
    color: #A0A0B0;
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 36px;
}
footer a {
    color: #6C63FF;
    text-decoration: none;
    font-weight: 600;
}
footer p + p { margin-top: 4px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
    .header { padding: 36px 20px 52px; }
    .header h1 { font-size: 1.6rem; }
    .search-bar { margin-top: -22px; }
    .container { padding: 24px 14px 14px; }
    .games-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .game-hero { padding: 16px; gap: 14px; }
    .game-hero img { width: 60px; height: 60px; border-radius: 16px; }
    .game-hero .info h2 { font-size: 1.15rem; }
    .reward-card { padding: 14px; gap: 12px; }
    .reward-card .reward-icon { width: 44px; height: 44px; font-size: 1.2rem; border-radius: 12px; }
    .cta-section { padding: 32px 20px; border-radius: 20px; }
    .cta-buttons { flex-direction: column; align-items: center; }
    .cta-btn { width: 100%; max-width: 280px; justify-content: center; }
    .features-strip { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .feat { padding: 14px 6px; }
    .feat .feat-num { font-size: 1.1rem; }
}

@media (max-width: 380px) {
    .games-grid { grid-template-columns: repeat(2, 1fr); }
}
