/* Premium Modern SaaS Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700;900&display=swap');

:root {
    /* SaaS Color Palette */
    --md-sys-color-background: #f8fafc;
    /* Slate 50 */
    --md-sys-color-on-background: #0f172a;
    /* Slate 900 */
    --md-sys-color-surface: #ffffff;
    --md-sys-color-surface-variant: #f1f5f9;
    /* Slate 100 */
    --md-sys-color-on-surface: #0f172a;
    --md-sys-color-on-surface-variant: #475569;
    /* Slate 600 */

    --md-sys-color-primary: #4f46e5;
    /* Indigo 600 */
    --md-sys-color-on-primary: #ffffff;
    --md-sys-color-primary-container: #e0e7ff;
    /* Indigo 100 */

    --md-sys-color-secondary: #06b6d4;
    /* Cyan 500 */
    --md-sys-color-on-secondary: #ffffff;
    --md-sys-color-secondary-container: #ecfeff;
    /* Cyan 50 */

    --md-sys-color-tertiary: #7c3aed;
    /* Violet 600 */
    --md-sys-color-on-tertiary: #ffffff;
    --md-sys-color-tertiary-container: #f5f3ff;
    /* Violet 50 */

    --md-sys-color-yellow: #eab308;
    /* Yellow 500 */
    --md-sys-color-yellow-container: #fef9c3;
    /* Yellow 100 */

    --md-sys-color-outline: #e2e8f0;
    /* Slate 200 */
    --md-sys-color-outline-variant: #cbd5e1;
    /* Slate 300 */

    /* Smooth Premium Shadow Scales */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 20px rgba(79, 70, 229, 0.15);

    /* Geometry */
    --radius-pill: 9999px;
    --radius-large: 16px;
    --radius-medium: 8px;

    /* Fonts */
    --font-heading: 'Roboto', sans-serif;
    --font-body: 'Roboto', sans-serif;

    scroll-behavior: smooth;
}

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

body {
    background-color: var(--md-sys-color-background);
    color: var(--md-sys-color-on-background);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--md-sys-color-on-surface);
    letter-spacing: -0.02em;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Glassmorphism Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 72px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--md-sys-color-outline);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 48px;
    z-index: 1000;
}

.logo {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--md-sys-color-on-surface);
}

.logo svg {
    fill: var(--md-sys-color-primary);
}

nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

nav a {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 500;
    color: var(--md-sys-color-on-surface-variant);
    padding: 8px 16px;
    border-radius: var(--radius-medium);
    transition: all 0.2s ease;
}

nav a:hover {
    background-color: var(--md-sys-color-surface-variant);
    color: var(--md-sys-color-primary);
}

nav a.active {
    background-color: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Header Gems Counter Pill */
.header-gems {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 14px;
    color: var(--md-sys-color-on-surface);
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--md-sys-color-outline);
    background-color: var(--md-sys-color-surface);
    box-shadow: var(--shadow-sm);
}

/* Header Time Pass Pill (Active / Inactive) */
.header-time-pass {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 14px;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--md-sys-color-outline);
    background-color: var(--md-sys-color-surface-variant);
    color: var(--md-sys-color-on-surface-variant);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.header-time-pass.active {
    background-color: var(--md-sys-color-primary);
    color: #ffffff;
    border-color: var(--md-sys-color-primary);
    box-shadow: var(--shadow-glow);
}

.header-time-pass:hover {
    background-color: var(--md-sys-color-outline);
}

.header-time-pass.active:hover {
    background-color: #4338ca;
    /* Darker Indigo */
}

/* SaaS Premium Buttons */
.btn-m3 {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: var(--radius-medium);
    border: 1px solid transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
    background: linear-gradient(135deg, var(--md-sys-color-primary), #6366f1);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.25);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(79, 70, 229, 0.35);
    background: linear-gradient(135deg, #4338ca, #4f46e5);
}

.btn-primary:active {
    transform: translateY(1px);
}

.btn-outline {
    background-color: #ffffff;
    color: var(--md-sys-color-on-surface);
    border-color: var(--md-sys-color-outline);
    box-shadow: var(--shadow-sm);
}

.btn-outline:hover {
    background-color: var(--md-sys-color-surface-variant);
    border-color: var(--md-sys-color-outline-variant);
}

/* Hero Section */
.hero {
    min-height: 80vh;
    padding-top: 130px;
    padding-bottom: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(to bottom, #fcfdff, var(--md-sys-color-background));
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.7;
    pointer-events: auto;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 800px;
    padding: 0 24px;
    pointer-events: none;
}

.hero-content a,
.hero-content button,
.hero-content .hero-badge {
    pointer-events: auto;
}

.hero-badge {
    background-color: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-primary);
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    margin-bottom: 24px;
    display: inline-block;
    border: 1px solid rgba(79, 70, 229, 0.2);
    letter-spacing: 0.05em;
}

.hero h1 {
    font-size: 54px;
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 24px;
}

.hero h1 span {
    background: linear-gradient(to right, var(--md-sys-color-primary), var(--md-sys-color-tertiary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 18px;
    color: var(--md-sys-color-on-surface-variant);
    max-width: 600px;
    margin: 0 auto 36px auto;
    font-weight: 400;
}

.hero-ctas {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.hero-ctas .btn-m3 {
    padding: 12px 32px;
    font-size: 16px;
}

/* Main Container */
.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 60px 24px;
    position: relative;
    z-index: 10;
}

/* Section Header */
.section-header {
    margin-bottom: 40px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.section-header-left h2 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
}

.section-header-left p {
    color: var(--md-sys-color-on-surface-variant);
    font-size: 16px;
    font-weight: 500;
}

/* Category Filter Chips */
.chips-container {
    display: flex;
    gap: 12px;
    margin-bottom: 36px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
}

.chips-container::-webkit-scrollbar {
    display: none;
}

.chip {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 500;
    padding: 8px 20px;
    border-radius: var(--radius-pill);
    background-color: var(--md-sys-color-surface);
    color: var(--md-sys-color-on-surface-variant);
    border: 1px solid var(--md-sys-color-outline);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.chip:hover {
    border-color: var(--md-sys-color-outline-variant);
    color: var(--md-sys-color-on-surface);
}

.chip.active {
    background-color: var(--md-sys-color-primary);
    color: #ffffff;
    border-color: var(--md-sys-color-primary);
    box-shadow: var(--shadow-md);
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
}

/* SaaS Card Layout */
.saas-card {
    background-color: var(--md-sys-color-surface);
    border-radius: var(--radius-large);
    border: 1px solid var(--md-sys-color-outline);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.saas-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.card-media {
    position: relative;
    width: 100%;
    height: 190px;
    background-color: #f1f5f9;
    overflow: hidden;
}

.card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background-color: var(--md-sys-color-primary);
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    background-color: #ffffff;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.tag {
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 500;
    color: var(--md-sys-color-primary);
    background-color: var(--md-sys-color-primary-container);
    padding: 2px 8px;
    border-radius: var(--radius-medium);
}

.card-content h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.card-content p {
    color: var(--md-sys-color-on-surface-variant);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
    flex-grow: 1;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--md-sys-color-outline);
    padding-top: 16px;
    margin-top: auto;
}

.game-stats {
    display: flex;
    gap: 12px;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 12px;
    font-weight: 600;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Locked Card Style */
.saas-card.locked {
    opacity: 0.85;
}

.saas-card.locked:hover {
    transform: none;
    box-shadow: var(--shadow-md);
}

.saas-card.locked .card-media {
    filter: grayscale(0.8) brightness(0.9);
}

.lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.45);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-family: var(--font-heading);
    gap: 8px;
}

.lock-overlay span {
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background-color: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: var(--radius-pill);
}

/* SaaS Pricing Grid */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 24px;
}

.pricing-card {
    background-color: #ffffff;
    border: 1px solid var(--md-sys-color-outline);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-md);
    padding: 32px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.pricing-card.featured {
    border-color: var(--md-sys-color-primary);
    box-shadow: var(--shadow-glow);
}

.pricing-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background-color: var(--md-sys-color-primary);
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pricing-card h3 {
    font-size: 18px;
    color: var(--md-sys-color-on-surface-variant);
    margin-bottom: 8px;
    font-weight: 500;
}

.pricing-price {
    margin-bottom: 20px;
    display: flex;
    align-items: baseline;
}

.pricing-price .amount {
    font-family: var(--font-heading);
    font-size: 36px;
    font-weight: 800;
    color: var(--md-sys-color-on-surface);
}

.pricing-price .period {
    font-size: 14px;
    color: var(--md-sys-color-on-surface-variant);
    margin-left: 4px;
}

.pricing-card .pricing-desc {
    font-size: 14px;
    color: var(--md-sys-color-on-surface-variant);
    margin-bottom: 24px;
    min-height: 48px;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0 0 32px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-grow: 1;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
    color: var(--md-sys-color-on-surface);
    font-weight: 500;
}

.feature-item svg {
    color: #10b981;
    /* Emerald 500 */
    flex-shrink: 0;
    margin-top: 3px;
}

/* Modern Dialog Modal */
.neo-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.neo-modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.neo-modal {
    background-color: #ffffff;
    border: 1px solid var(--md-sys-color-outline);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-xl);
    width: 90%;
    max-width: 400px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.neo-modal-backdrop.active .neo-modal {
    transform: scale(1);
}

.neo-modal-header {
    background-color: #ef4444;
    /* Red 500 for alerts */
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #ffffff;
}

.neo-modal-header.success {
    background: linear-gradient(135deg, var(--md-sys-color-primary), #6366f1);
}

.neo-modal-header .window-title {
    font-weight: 700;
    font-size: 15px;
    color: #ffffff;
}

.neo-modal-content {
    padding: 24px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--md-sys-color-on-surface-variant);
    text-align: center;
}

.neo-modal-footer {
    padding: 16px 24px;
    display: flex;
    justify-content: center;
    border-top: 1px solid var(--md-sys-color-outline);
    background-color: var(--md-sys-color-surface-variant);
}

.neo-modal-footer .btn-m3 {
    width: 100%;
}

/* Ripple */
.ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    animation: ripple-anim 0.6s linear;
    background-color: rgba(0, 0, 0, 0.08);
    pointer-events: none;
}

/* Footer Section */
footer {
    border-top: 1px solid var(--md-sys-color-outline);
    background-color: var(--md-sys-color-surface);
    padding: 48px 24px;
    text-align: center;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 14px;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--md-sys-color-on-surface);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 24px;
}

.footer-links a {
    font-weight: 500;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--md-sys-color-primary);
}


.social-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--md-sys-color-surface-variant);
    border: 1px solid var(--md-sys-color-outline);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--md-sys-color-on-surface-variant);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 13px;
    transition: all 0.2s ease;
}

.social-icon:hover {
    background-color: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-primary);
    border-color: rgba(79, 70, 229, 0.2);
}

@keyframes ripple-anim {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Responsive adjustments */
@media(max-width: 768px) {
    header {
        padding: 0 24px;
    }

    nav {
        display: none;
    }

    .hero h1 {
        font-size: 38px;
    }

    .hero p {
        font-size: 15px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}