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

:root {
    --bright-yellow: hsl(56, 100%, 50%);
    --ocean-blue: hsl(198, 100%, 44%);
    --primary-color: var(--ocean-blue);
    --secondary-color: var(--bright-yellow);
    --accent-color: hsl(56, 80%, 45%);
    --text-color: hsl(200, 50%, 25%);
    --bg-color: hsl(200, 30%, 96%);
    --card-bg: #ffffff;
    --shadow: 0 10px 30px rgba(0, 140, 186, 0.15);
    --gradient: linear-gradient(135deg, var(--ocean-blue) 0%, hsl(200, 90%, 35%) 100%);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--gradient);
    min-height: 100vh;
    padding: 2rem;
    color: var(--text-color);
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/logo.png');
    background-size: 200px 200px;
    background-repeat: repeat;
    background-position: center;
    filter: blur(3px) opacity(0.1);
    z-index: -1;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    animation: slideUp 0.8s ease forwards;
    border: 3px solid transparent;
    background-clip: padding-box;
    position: relative;
}

.container::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: var(--ocean-blue);
    border-radius: 23px;
    z-index: -1;
}

@keyframes slideUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.header {
    background: var(--gradient);
    color: white;
    text-align: center;
    padding: 3rem 2rem;
    position: relative;
    overflow: hidden;
    border-bottom: 3px solid var(--bright-yellow);
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 243, 0, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

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

.header h1 {
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.header p {
    font-size: 1.2rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.menu-content {
    padding: 0;
}

.menu-controls {
    display: flex;
    background: var(--ocean-blue);
    padding: 0.5rem 1rem;
}

.category-tabs {
    display: flex;
    background: var(--ocean-blue);
    border-radius: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex: 1;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    cursor: ew-resize;
}

.category-tabs::-webkit-scrollbar {
    display: none;
}

.category-tab {
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    min-width: max-content;
    border-radius: 8px;
    margin: 0 0.2rem;
}

.category-tab:hover {
    background: rgba(255, 243, 0, 0.1);
    color: var(--bright-yellow);
}

.category-tab.active {
    background: rgba(255, 243, 0, 0.15);
    color: var(--bright-yellow);
    border-bottom-color: var(--bright-yellow);
    font-weight: 600;
}

.category-content {
    padding: 2rem;
    display: none;
}

.category-content.active {
    display: block;
}

.category-content h1 {
    display: none;
}

.loading {
    text-align: center;
    padding: 4rem 2rem;
    color: #666;
    background: hsl(198, 30%, 95%);
    border-radius: 15px;
    border: 2px solid var(--bright-yellow);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(0, 140, 186, 0.3);
    border-top: 5px solid var(--ocean-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
    box-shadow: 0 0 20px rgba(0, 140, 186, 0.4);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error {
    text-align: center;
    padding: 2rem;
    color: var(--ocean-blue);
    background: hsl(198, 30%, 96%);
    border: 2px solid var(--bright-yellow);
    border-radius: 10px;
    margin: 1rem 0;
}

/* Markdown content styling */
.menu-markdown h1 {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--bright-yellow);
    margin: 2rem 0 1.5rem 0;
    padding: 1rem 1.5rem 0.5rem 1.5rem;
    border-bottom: 3px solid var(--accent-color);
    position: relative;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, rgba(0, 140, 186, 0.05) 0%, rgba(0, 140, 186, 0.1) 100%);
    border-radius: 15px 15px 0 0;
}

.menu-markdown h1:first-child {
    margin-top: 0;
}

.menu-markdown h1::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--bright-yellow);
    transition: width 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 243, 0, 0.5);
}

.menu-markdown h1::before {
    content: '•';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--bright-yellow);
    text-shadow: 0 0 8px rgba(255, 243, 0, 0.6);
    animation: sparkle 2s ease-in-out infinite alternate;
}

@keyframes sparkle {
    0% { opacity: 0.6; transform: translateY(-50%) scale(1); }
    100% { opacity: 1; transform: translateY(-50%) scale(1.2); }
}

.menu-markdown h2 {
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--bright-yellow);
    margin: 1.5rem 0 1rem 0;
    padding-left: 1rem;
    border-left: 4px solid var(--ocean-blue);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.menu-markdown h3 {
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--bright-yellow);
    margin: 1.2rem 0 0.8rem 0;
    padding-left: 0.8rem;
    border-left: 3px solid var(--ocean-blue);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.menu-markdown h4 {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--bright-yellow);
    margin: 1rem 0 0.6rem 0;
    padding-left: 0.6rem;
    border-left: 2px solid var(--ocean-blue);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.menu-markdown ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
}

.menu-markdown li {
    background: linear-gradient(135deg, hsl(198, 30%, 95%) 0%, hsl(200, 40%, 97%) 100%);
    margin: 0.5rem 0;
    padding: 1.2rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 2px solid hsl(198, 20%, 85%);
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 60px;
}

.menu-markdown li.has-link {
    cursor: pointer;
}

.menu-markdown li.has-link:hover {
    border-left-color: var(--bright-yellow);
    transform: translateX(5px) translateY(-2px);
}

.link-icon {
    display: inline-block;
    margin-left: 0.5rem;
    color: var(--ocean-blue);
    vertical-align: middle;
    transition: all 0.3s ease;
}

.menu-markdown li.has-link:hover .link-icon {
    color: var(--bright-yellow);
    transform: translate(2px, -2px);
}

.menu-markdown li::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 140, 186, 0.1), transparent);
    transition: left 0.5s ease;
}

.menu-markdown li:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 140, 186, 0.25), 0 5px 15px rgba(255, 243, 0, 0.1);
    border-color: var(--bright-yellow);
    background: linear-gradient(135deg, hsl(198, 40%, 93%) 0%, hsl(200, 50%, 95%) 100%);
}

.menu-markdown li:hover::before {
    left: 100%;
}

.menu-item-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
}

.item-name {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-color);
    flex: 1;
    margin-top: 0.6rem;
    padding-left: 1.5rem;
    position: relative;
}

.item-name::before {
    content: '•';
    color: var(--ocean-blue);
    font-weight: bold;
    position: absolute;
    left: 0;
    text-shadow: 0 0 3px rgba(0, 140, 186, 0.3);
}

.price-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.item-price-variant,
.sub-item-price-variant {
    font-size: 1rem;
    font-weight: 500;
    color: white;
    background: var(--ocean-blue);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 140, 186, 0.3);
    border: 1px solid hsl(198, 100%, 40%);
}

.item-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #000000;
    background: var(--bright-yellow);
    padding: 0.4rem 1rem;
    border-radius: 25px;
    white-space: nowrap;
    margin-left: 1rem;
    box-shadow: 0 3px 12px rgba(255, 243, 0, 0.4);
    border: 2px solid hsl(56, 100%, 45%);
    transition: all 0.3s ease;
}

.price-wrapper .item-price {
    margin-left: 0;
}

.item-price:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(255, 243, 0, 0.6);
}

.no-price .menu-item-content {
    justify-content: flex-start;
}

.price-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
}

.price-group .price-wrapper {
    width: 100%;
    justify-content: flex-end;
}

.sub-item-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #000000;
    background: var(--bright-yellow);
    padding: 0.4rem 1rem;
    border-radius: 25px;
    white-space: nowrap;
    box-shadow: 0 3px 12px rgba(255, 243, 0, 0.4);
    border: 2px solid hsl(56, 100%, 45%);
    transition: all 0.3s ease;
}

.price-wrapper .sub-item-price {
    margin-left: 0;
}

.sub-item-price:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(255, 243, 0, 0.6);
}

.sub-item-name::before {
    content: '';
}

.menu-markdown p {
    margin: 0.5rem 0;
    line-height: 1.6;
}

/* Animation for items */
.menu-markdown h1,
.menu-markdown h2,
.menu-markdown h3,
.menu-markdown h4,
.menu-markdown li {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.menu-markdown h1:nth-of-type(1) { animation-delay: 0.1s; }
.menu-markdown h1:nth-of-type(2) { animation-delay: 0.2s; }
.menu-markdown h1:nth-of-type(3) { animation-delay: 0.3s; }

.menu-markdown li:nth-child(odd) { animation-delay: 0.1s; }
.menu-markdown li:nth-child(even) { animation-delay: 0.2s; }

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

/* Link Modal Styles */
.link-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.link-modal.active {
    opacity: 1;
}

.link-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    cursor: pointer;
}

.link-modal-content {
    position: relative;
    width: 90%;
    height: 85%;
    max-width: 1200px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.link-modal.active .link-modal-content {
    transform: scale(1);
}

.link-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bright-yellow);
    border: 2px solid hsl(56, 100%, 45%);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.link-modal-close:hover {
    background: hsl(56, 100%, 45%);
    transform: rotate(90deg);
}

.link-modal-close svg {
    stroke: #000;
}

.link-modal-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.link-modal-media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  overflow: hidden; /* ensures no scrollbars from media */
}

.link-modal-media img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
}

.footer a {
    text-decoration: none;
    color: var(--bright-yellow);
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.2rem 0.5rem;
    border-radius: 5px;
}

.footer a:hover {
    background: rgba(255, 243, 0, 0.1);
    text-shadow: 0 0 10px rgba(255, 243, 0, 0.5);
}