@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&family=Kanit:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

:root {
    --dark-bg-start: #0f0c29;
    /* Darker purple */
    --dark-bg-mid: #302b63;
    /* Medium purple */
    --dark-bg-end: #24243e;
    /* Dark blue-purple */
    --card-bg: #1e1e2f;
    --primary-purple: #904e95;
    /* Slightly muted but rich purple */
    --accent-gold: #f9d423;
    /* Brighter gold */
    --text-light: #EAEAEA;
    --text-muted: #B0B0B0;
    --border-radius: 15px;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    --card-hover-shadow: 0 15px 45px rgba(var(--primary-purple-rgb), 0.3);

    --primary-purple-rgb: 144, 78, 149;
    --accent-gold-rgb: 249, 212, 35;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Chakra Petch", sans-serif;
    font-weight: 700;
    /* font-family: "Kanit", sans-serif; */
    /* font-family: 'Poppins', sans-serif; */
    /* font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; */
    color: var(--text-light);
    line-height: 1.7;
    padding: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    /* Animated Gradient Background */
    /* background: linear-gradient(135deg, var(--dark-bg-start), var(--dark-bg-mid), var(--dark-bg-end)); */
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    background-size: 600% 600%;
    /* Larger size for smoother animation */
    animation: gradientBackgroundAnimation 20s ease infinite;
    position: relative;
    /* For pseudo-elements */
    overflow-x: hidden;
    /* Prevent horizontal scroll from large pseudo-elements */
}

/* Subtle animated pattern on body background */
body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(45deg, rgba(var(--primary-purple-rgb), 0.03) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(var(--primary-purple-rgb), 0.03) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(var(--primary-purple-rgb), 0.03) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(var(--primary-purple-rgb), 0.03) 75%);
    background-size: 80px 80px;
    background-position: 0 0;
    animation: movePattern 25s linear infinite;
    z-index: 0;
    /* Behind content but above main gradient if needed, or -1 */
    opacity: 0.5;
}

@keyframes gradientBackgroundAnimation {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes movePattern {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 160px 80px;
    }
}

.menu-header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    /* Ensure it's above body::before */
    z-index: 1;
}

.menu-header h1 {
    font-size: 2.8rem;
    /* color: var(--primary-purple); */
    color: var(--accent-gold);
    margin-bottom: 15px;
    font-weight: 700;
    opacity: 0;
    transform: translateY(-30px);
    /* Multiple animations: entrance + continuous glow */
    animation: fadeInDown 0.8s ease-out forwards, textGlow 3s ease-in-out infinite alternate 1s;
}

.menu-header p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 650px;
    opacity: 0;
    transform: translateY(-20px);
    animation: fadeInDown 0.8s ease-out 0.3s forwards;
    /* Delayed start */
}

@keyframes fadeInDown {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes textGlow {
    from {
        text-shadow: 0 0 10px rgba(var(--primary-purple-rgb), 0.6),
            0 0 20px rgba(var(--primary-purple-rgb), 0.4),
            0 0 5px rgba(var(--accent-gold-rgb), 0.2);
    }

    to {
        text-shadow: 0 0 20px rgba(var(--primary-purple-rgb), 0.8),
            0 0 35px rgba(var(--primary-purple-rgb), 0.6),
            0 0 10px rgba(var(--accent-gold-rgb), 0.4);
    }
}

.menu-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    width: 100%;
    max-width: 1300px;
    position: relative;
    /* Ensure it's above body::before */
    z-index: 1;
}

.menu-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 30px;
    text-decoration: none;
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
        box-shadow 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
        border-color 0.4s ease;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    box-shadow: var(--card-shadow);
    /* Entrance Animation */
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    animation: cardEntrance 0.6s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

/* Staggered animation delays for cards */
.menu-card:nth-child(1) {
    animation-delay: 0.2s;
}

.menu-card:nth-child(2) {
    animation-delay: 0.3s;
}

.menu-card:nth-child(3) {
    animation-delay: 0.4s;
}

.menu-card:nth-child(4) {
    animation-delay: 0.5s;
}

.menu-card:nth-child(5) {
    animation-delay: 0.6s;
}

.menu-card:nth-child(6) {
    animation-delay: 0.7s;
}

@keyframes cardEntrance {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.menu-card:hover {
    transform: translateY(-12px) scale(1.05);
    box-shadow: var(--card-hover-shadow), 0 0 20px rgba(var(--accent-gold-rgb), 0.3);
    border-color: var(--accent-gold);
}

.card-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #9d4edd, #ffd700);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    color: #fff;
    box-shadow: 0 10px 30px rgba(157, 78, 221, 0.4);
    transition: all 0.3s ease;
}

.menu-card:hover .card-icon {
    transform: rotate(360deg) scale(1.1);
    box-shadow: 0 15px 40px rgba(255, 215, 0, 0.5);
}

.card-content {
    flex-grow: 1;
}

.card-title {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-light);
    transition: color 0.3s ease, transform 0.3s ease;
}

.menu-card:hover .card-title {
    color: var(--primary-purple);
    transform: translateY(-4px);
}

.card-description {
    font-size: 0.95rem;
    color: var(--text-muted);
    min-height: 55px;
    transition: color 0.3s ease, opacity 0.3s ease;
}

.menu-card:hover .card-description {
    color: var(--text-light);
    opacity: 0.9;
}

.card-shine {
    position: absolute;
    top: -60%;
    left: -200%;
    /* Start further left */
    width: 120px;
    height: 350%;
    background: linear-gradient(to right,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.1) 40%,
            /* More defined shine */
            rgba(255, 255, 255, 0.12) 50%,
            rgba(255, 255, 255, 0.1) 60%,
            rgba(255, 255, 255, 0) 100%);
    transform: rotate(25deg);
    transition: left 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
    /* Slower, smoother transition */
    pointer-events: none;
    opacity: 0.7;
    /* Make shine a bit more visible */
}

.menu-card:hover .card-shine {
    left: 150%;
    opacity: 1;
}

.card-url {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: #9d4edd;
    background: rgba(157, 78, 221, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(157, 78, 221, 0.3);
    display: inline-block;
    transition: all 0.3s ease;
}

.menu-card:hover .card-url {
    background: rgba(255, 215, 0, 0.1);
    color: #ffd700;
    border-color: #ffd700;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .menu-container {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    body {
        padding: 20px;
    }

    .menu-header h1 {
        font-size: 2.2rem;
    }

    .menu-header p {
        font-size: 1.1rem;
    }

    .menu-container {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .menu-card {
        padding: 25px;
    }

    .card-icon {
        font-size: 3rem;
        width: 80px;
        height: 80px;
    }

    .card-title {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 15px;
    }

    .menu-header h1 {
        font-size: 1.9rem;
    }

    .menu-header p {
        font-size: 1rem;
    }

    .menu-card {
        padding: 20px;
    }

    .card-icon {
        font-size: 2.5rem;
        width: 70px;
        height: 70px;
    }

    .card-title {
        font-size: 1.3rem;
    }

    .card-description {
        font-size: 0.9rem;
    }
}