:root {
    --primary-gradient: linear-gradient(90deg, #ff0f7b, #f89b29);
    /* Fallback/Alternative */
    --button-gradient: linear-gradient(90deg, #E91E63, #9C27B0);
    --bg-gradient: radial-gradient(circle at 50% 20%, #1a1a2e 0%, #0f0f12 100%);
    --text-color: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.7);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #0b0b14;
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 480px;
    /* Mobile width constraint */
    background: var(--bg-gradient);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding-bottom: 40px;
    overflow: hidden;
    /* Ensure background doesn't spill */
}

/* Animated Background */
.container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Use the new Mahjong background */
    background: url('assets/bg_mahjong.jpg');
    background-size: cover;
    background-position: center;

    /* Animation: Slow Zoom/Pan effect */
    animation: background-move 20s ease-in-out infinite alternate;

    /* Overlay for readability */
    z-index: 0;
    opacity: 0.3;
    /* Low opacity to blend with dark theme */
    filter: brightness(0.6);
}

/* Animation Keyframes */
@keyframes background-move {
    0% {
        transform: scale(1) translateY(0);
    }

    100% {
        transform: scale(1.1) translateY(-10px);
    }
}

/* Hero Section */
.hero {
    width: 100%;
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    margin-top: 10px;
    margin-bottom: 20px;
}

.image-wrapper {
    width: 90%;
    max-width: 300px;
    position: relative;
    padding: 10px;
    /* Space for the frame */
    border-radius: 20px;
    /* Create a stacking context */
    z-index: 1;
}

.image-wrapper::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 6px;
    /* Thicker border for frame effect */

    /* Gold Gradient mimicking the slot machine frame with Shine */
    background: linear-gradient(120deg,
            #aa771c 0%,
            #bf953f 25%,
            #fbf5b7 45%,
            #fffffc 50%,
            #fbf5b7 55%,
            #bf953f 75%,
            #aa771c 100%);
    background-size: 200% 200%;

    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;

    animation: gold-shine-border 3s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    box-shadow: 0 0 15px rgba(251, 245, 183, 0.5);
    /* Golden Glow */
}

@keyframes gold-shine-border {
    0% {
        background-position: 100% 100%;
    }

    100% {
        background-position: 0% 0%;
    }
}

/* Optional: Add a subtle glow behind */
.image-wrapper::after {
    content: "";
    position: absolute;
    inset: 6px;
    border-radius: 20px;
    background: linear-gradient(45deg, #b38728, #fcf6ba);
    filter: blur(15px);
    z-index: -1;
    opacity: 0.6;
    animation: breathe 3s ease-in-out infinite;
}

@keyframes rotate-border {
    0% {
        filter: hue-rotate(0deg);
    }

    100% {
        filter: hue-rotate(360deg);
    }
}

@keyframes breathe {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(0.98);
    }

    50% {
        opacity: 0.6;
        transform: scale(1.02);
    }
}

.spaceman-img {
    width: 100%;
    height: auto;
    display: block;
    /* Simulate the cut-off/fade at bottom if image isn't perfect */
    -webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
}

/* Content Section */
.content {
    z-index: 2;
    text-align: center;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0px;
    margin-top: -20px;
    /* Overlap slightly */
}

.title-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.subtitle {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 3px;
    margin-top: 30px;
    z-index: 10;

    /* Shine Animation */
    background: linear-gradient(to right, #ffffff 20%, #ffd700 40%, #ffffff 60%, #ffffff 80%);
    background-size: 200% auto;
    color: #fff;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 4s linear infinite;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}

.title {
    font-size: 42px;
    font-weight: 900;
    text-transform: uppercase;
    line-height: 2;
    letter-spacing: 1px;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.description {
    font-size: 12px;
    line-height: 1.6;
    max-width: 100%;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 0 20px rgb(255, 255, 255);
}

/* Button */
.btn-primary {
    background: var(--button-gradient);
    border: none;
    color: white;
    padding: 16px 40px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(233, 30, 99, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
    max-width: 300px;

    /* Link specific styles */
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;

    /* Glossy Animation Setup */
    position: relative;
    overflow: hidden;
}

/* Shine Effect */
.btn-primary::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.4),
            transparent);
    transition: none;
    animation: shine-button 1s infinite;
}

@keyframes shine-button {
    0% {
        left: -100%;
    }

    20% {
        left: 100%;
    }

    100% {
        left: 100%;
    }
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(233, 30, 99, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-chat {
    margin-top: 15px;
    /* Spacing between buttons */
    background: linear-gradient(90deg, #00C9FF, #92FE9D);
    /* Premium Blue-Green Gradient */
}