/* CozyFun / Stacked Feast Diner — shared diner-theme styles */
@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

:root {
    --red: #D62828;
    --red-dark: #9B2226;
    --cream: #FFF8F0;
    --wood: #6B4226;
    --gold: #FFB703;
    --gold-dark: #FB8500;
    --sky: #48CAE4;
    --ink: #2B2D42;
    --muted: #5C5F72;
    --sidebar-w: 240px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--cream);
    background-image:
        radial-gradient(circle at 10% 20%, rgba(255,183,3,.12) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(214,40,40,.08) 0%, transparent 40%);
    color: var(--ink);
    min-height: 100vh;
}

h1, h2, h3, .display-font {
    font-family: 'Baloo 2', cursive;
    font-weight: 800;
}

.layout {
    display: flex;
    min-height: 100vh;
    max-width: 1200px;
    margin: 0 auto;
    background: #fff;
    box-shadow: 0 0 60px rgba(43,45,66,.15);
}

/* ── Sidebar ── */
.sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    background: var(--ink);
    color: #fff;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    padding: 28px 20px 22px;
    text-align: center;
    border-bottom: 4px solid var(--gold);
    background: linear-gradient(180deg, var(--red-dark) 0%, var(--ink) 100%);
}

.sidebar-brand img {
    width: 88px;
    height: 88px;
    border-radius: 20px;
    border: 3px solid var(--gold);
    margin-bottom: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,.35);
}

.sidebar-brand .studio {
    font-family: 'Baloo 2', cursive;
    font-size: 13px;
    color: var(--gold);
    line-height: 1.35;
    display: block;
}

.sidebar-brand .game-tag {
    display: inline-block;
    margin-top: 8px;
    background: var(--red);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: .5px;
}

.sidebar-nav { flex: 1; padding: 20px 14px; }

.sidebar-nav ul { list-style: none; }

.sidebar-nav li { margin-bottom: 6px; }

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    color: rgba(255,255,255,.75);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    transition: all .2s;
    border-left: 3px solid transparent;
}

.sidebar-nav a:hover {
    background: rgba(255,255,255,.08);
    color: #fff;
}

.sidebar-nav a.active {
    background: rgba(214,40,40,.35);
    color: #fff;
    border-left-color: var(--gold);
}

.sidebar-nav .nav-icon {
    width: 22px;
    text-align: center;
    font-size: 15px;
}

.sidebar-footer {
    padding: 16px 14px 24px;
    border-top: 1px solid rgba(255,255,255,.1);
}

.sidebar-footer a {
    display: block;
    color: rgba(255,255,255,.5);
    text-decoration: none;
    font-size: 12px;
    padding: 6px 14px;
    transition: color .2s;
}

.sidebar-footer a:hover { color: var(--gold); }

/* ── Main ── */
.main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.main-inner { flex: 1; padding: 0; }

/* Awning stripe bar */
.awning {
    height: 14px;
    background: repeating-linear-gradient(
        90deg,
        var(--red) 0px, var(--red) 20px,
        #fff 20px, #fff 40px
    );
}

.page-footer {
    background: var(--ink);
    color: rgba(255,255,255,.65);
    padding: 22px 32px;
    text-align: center;
    font-size: 13px;
}

.page-footer a {
    color: var(--gold);
    text-decoration: none;
    margin: 0 8px;
}

.page-footer a:hover { text-decoration: underline; }

.page-footer p { margin-bottom: 8px; }

/* Section label chip */
.section-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--red);
    color: #fff;
    font-family: 'Baloo 2', cursive;
    font-size: 13px;
    padding: 5px 14px;
    border-radius: 6px;
    margin-bottom: 14px;
    letter-spacing: .3px;
}

.section-title {
    font-family: 'Baloo 2', cursive;
    font-size: 30px;
    color: var(--ink);
    margin-bottom: 20px;
    line-height: 1.2;
}

.section-title em {
    font-style: normal;
    color: var(--red);
}

/* ── Hero (homepage) ── */
.hero-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 460px;
}

.hero-visual {
    position: relative;
    overflow: hidden;
    background: var(--sky);
}

.hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
	object-position: left;
}

.hero-visual::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(214,40,40,.15), transparent 60%);
}

.hero-copy {
    padding: 48px 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--cream);
    border-left: 6px solid var(--gold);
}

.hero-copy h1 {
    font-size: 34px;
    color: var(--red-dark);
    margin-bottom: 16px;
    line-height: 1.15;
}

.hero-copy .tagline {
    font-size: 16px;
    color: var(--muted);
    line-height: 1.75;
    margin-bottom: 28px;
}

.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.cta-row a {
    display: block;
    transition: transform .2s, filter .2s;
}

.cta-row a:hover {
    transform: translateY(-3px);
    filter: brightness(1.05);
}

.cta-row img { height: 48px; width: auto; border-radius: 8px; }

/* Stats ribbon */
.stats-ribbon {
    display: flex;
    background: var(--ink);
    overflow: hidden;
}

.stat-item {
    flex: 1;
    text-align: center;
    padding: 18px 12px;
    border-right: 1px solid rgba(255,255,255,.08);
    color: #fff;
}

.stat-item:last-child { border-right: none; }

.stat-item .num {
    font-family: 'Baloo 2', cursive;
    font-size: 26px;
    color: var(--gold);
    display: block;
}

.stat-item .lbl {
    font-size: 12px;
    color: rgba(255,255,255,.6);
    margin-top: 2px;
}

/* Content blocks */
.content-block {
    padding: 48px 36px;
}

.content-block.alt-bg { background: var(--cream); }

.content-block.dark-bg {
    background: var(--ink);
    color: #fff;
}

.content-block.dark-bg .section-title { color: #fff; }
.content-block.dark-bg .section-title em { color: var(--gold); }

/* About — magazine 2-col */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
}

.about-pull {
    background: var(--red);
    color: #fff;
    padding: 28px;
    border-radius: 16px;
    font-family: 'Baloo 2', cursive;
    font-size: 20px;
    line-height: 1.5;
    position: relative;
}

.about-pull::before {
    content: '\201C';
    font-size: 60px;
    line-height: 0;
    display: block;
    opacity: .3;
    margin-bottom: 10px;
}

.about-text p {
    font-size: 15px;
    line-height: 1.85;
    color: var(--muted);
    margin-bottom: 14px;
}

.value-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.value-tag {
    background: #fff;
    border: 2px solid var(--gold);
    color: var(--wood);
    font-size: 12px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 20px;
}

/* Game — stacked floors gallery */
.game-showcase {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
    align-items: center;
}

.game-logo-wrap {
    text-align: center;
    padding: 24px;
    background: #fff;
    border-radius: 20px;
    border: 3px solid var(--gold);
    box-shadow: 0 8px 0 var(--gold-dark);
}

.game-logo-wrap img {
    width: 100%;
    border-radius: 14px;
    margin-bottom: 14px;
}

.game-logo-wrap .badge {
    background: var(--gold);
    color: var(--ink);
    font-family: 'Baloo 2', cursive;
    font-size: 13px;
    padding: 6px 16px;
    border-radius: 20px;
    display: inline-block;
}

.game-desc p {
    font-size: 15px;
    line-height: 1.85;
    color: #d5d5d5;
    margin-bottom: 20px;
}

.feature-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
}

.feature-item .fi { font-size: 20px; }

/* Stacked screenshot tower */
.stack-gallery {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 720px;
    margin: 0 auto;
}

.stack-floor {
    display: flex;
    align-items: stretch;
    margin-bottom: -8px;
}

.stack-floor:nth-child(even) { flex-direction: row-reverse; }

.floor-label {
    width: 80px;
    flex-shrink: 0;
    background: var(--red);
    color: #fff;
    font-family: 'Baloo 2', cursive;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    border-radius: 10px 0 0 10px;
    letter-spacing: 1px;
}

.stack-floor:nth-child(even) .floor-label {
    border-radius: 0 10px 10px 0;
}

.floor-img {
    flex: 1;
    border-radius: 12px;
    overflow: hidden;
    border: 4px solid var(--gold);
    box-shadow: 0 6px 24px rgba(0,0,0,.18);
    transition: transform .3s;
}

.floor-img:hover { transform: scale(1.02); z-index: 2; position: relative; }

.floor-img img {
    width: 100%;
    display: block;
    height: 160px;
    object-fit: cover;
}

/* Inner pages */
.page-header {
    padding: 36px 36px 28px;
    background: linear-gradient(135deg, var(--red-dark), var(--red));
    color: #fff;
}

.page-header h1 {
    font-size: 32px;
    margin-bottom: 6px;
}

.page-header p { opacity: .85; font-size: 15px; }

.page-body { padding: 36px; }

/* Contact cards */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 28px;
}

.contact-tile {
    background: var(--cream);
    border: 2px solid #eee;
    border-radius: 16px;
    padding: 24px;
    transition: border-color .2s, box-shadow .2s;
}

.contact-tile:hover {
    border-color: var(--gold);
    box-shadow: 0 6px 20px rgba(255,183,3,.15);
}

.contact-tile .tile-icon {
    font-size: 28px;
    margin-bottom: 12px;
}

.contact-tile h4 {
    font-family: 'Baloo 2', cursive;
    font-size: 15px;
    color: var(--red);
    margin-bottom: 6px;
}

.contact-tile p, .contact-tile a {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.6;
    text-decoration: none;
}

.contact-tile a:hover { color: var(--red); }

.contact-banner {
    border-radius: 16px;
    overflow: hidden;
    border: 4px solid var(--gold);
    box-shadow: 0 8px 30px rgba(0,0,0,.12);
}

.contact-banner img { width: 100%; display: block; }

/* Shop overrides */
.shop-intro {
    background: var(--cream);
    border: 2px dashed var(--gold);
    border-radius: 16px;
    padding: 22px 26px;
    margin-bottom: 28px;
}

.shop-intro ol {
    padding-left: 20px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.75;
}

.shop-intro ol li { margin-bottom: 6px; }

.goods-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin-bottom: 32px;
}

.goods-card {
    background: #fff;
    border: 3px solid #eee;
    border-radius: 14px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all .2s;
    box-shadow: 0 3px 0 #eee;
}

.goods-card:hover { border-color: var(--sky); transform: translateY(-2px); }

.goods-card.selected {
    border-color: var(--gold);
    background: #FFFBF0;
    box-shadow: 0 4px 0 var(--gold-dark);
}

.goods-card img { width: 52px; height: 52px; margin-bottom: 8px; }

.goods-card .title { font-weight: 700; font-size: 13px; color: var(--ink); margin-bottom: 4px; }

.goods-card .price {
    font-family: 'Baloo 2', cursive;
    color: var(--red);
    font-size: 20px;
}

.goods-loading { text-align: center; padding: 30px; color: var(--muted); font-weight: 700; }

.order-panel {
    background: var(--cream);
    border: 2px solid #eee;
    border-radius: 16px;
    padding: 28px;
}

.order-panel h3 {
    font-family: 'Baloo 2', cursive;
    font-size: 20px;
    color: var(--ink);
    margin-bottom: 20px;
}

.form-row { margin-bottom: 16px; }

.form-row label {
    display: block;
    font-weight: 700;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 6px;
}

.form-row input[type="text"],
.form-row input[type="email"] {
    width: 100%;
    padding: 11px 14px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
}

.form-row input:focus { outline: none; border-color: var(--red); }

.form-row input[readonly] { background: #f0f0f0; }

.payment-options { display: flex; gap: 10px; flex-wrap: wrap; }

.payment-option {
    flex: 1; min-width: 130px;
    padding: 16px 10px;
    border: 2px solid #ddd;
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
    background: #fff;
    transition: all .2s;
    position: relative;
}

.payment-option:hover { border-color: var(--sky); }

.payment-option.selected {
    border-color: var(--red);
    background: rgba(214,40,40,.05);
}

.payment-option input {  }

.payment-option span { font-weight: 700; font-size: 13px; color: var(--ink); }

.agreement { margin: 18px 0; font-size: 13px; color: var(--muted); }

.agreement a { color: var(--red); }

.agreement input { margin-right: 6px; }

.btn-submit {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    color: #fff;
    font-family: 'Baloo 2', cursive;
    font-size: 17px;
    cursor: pointer;
    box-shadow: 0 4px 0 var(--red-dark);
    transition: all .2s;
}

.btn-submit:hover:not(:disabled) { transform: translateY(-2px); }

.btn-submit:disabled { background: #ccc; box-shadow: none; cursor: not-allowed; }

.message {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
    display: none;
    font-weight: 600;
    font-size: 14px;
}

.message.success { background: #d4edda; color: #155724; display: block; }

.message.error { background: #fee2e2; color: #991B1B; display: block; }

/* Transaction pages (confirm / payfinish / error) */
.tx-body {
    background: var(--cream);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.tx-card {
    width: 100%;
    max-width: 640px;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(43,45,66,.2);
    border: 3px solid var(--gold);
}

.tx-header {
    background: linear-gradient(135deg, var(--red-dark), var(--red));
    color: #fff;
    padding: 26px 32px;
    text-align: center;
}

.tx-header h1 { font-family: 'Baloo 2', cursive; font-size: 24px; }

.tx-header p { font-size: 13px; opacity: .85; margin-top: 4px; }

.tx-header.error-hd { background: linear-gradient(135deg, #991B1B, var(--red)); }

.tx-content { padding: 32px; }

.tx-panel {
    background: var(--cream);
    border-radius: 14px;
    padding: 28px;
    text-align: center;
}

.tx-icon {
    width: 76px; height: 76px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 18px;
    font-size: 36px; color: #fff;
}

.tx-icon.ok { background: linear-gradient(135deg, #52B788, #2D6A4F); }

.tx-icon.fail { background: linear-gradient(135deg, var(--red), var(--red-dark)); }

.tx-panel h2 { font-family: 'Baloo 2', cursive; font-size: 22px; margin-bottom: 12px; }

.tx-panel .sub { color: var(--muted); font-size: 14px; line-height: 1.7; margin-bottom: 22px; }

.tx-rows { text-align: left; margin-bottom: 20px; }

.tx-row {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.tx-row:last-child { border-bottom: none; }

.tx-row .lbl { width: 110px; font-weight: 700; color: var(--muted); flex-shrink: 0; }

.tx-row .val { flex: 1; font-weight: 600; word-break: break-all; }

.tx-row .val.hl { font-family: 'Baloo 2', cursive; color: var(--red); font-size: 18px; }

.tx-row .val.code {
    font-family: monospace;
    background: #fff;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid #ddd;
    color: var(--red-dark);
}

.btn-tx {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    color: #fff;
    font-family: 'Baloo 2', cursive;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 4px 0 var(--red-dark);
    margin-top: 8px;
}

.btn-tx:hover { transform: translateY(-2px); }

.tx-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

.tx-btns a {
    flex: 1; min-width: 130px;
    padding: 13px 16px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    text-align: center;
}

.tx-btns .primary { background: var(--red); color: #fff; }

.tx-btns .secondary { background: #fff; color: var(--red); border: 2px solid var(--red); }

.notice {
    background: #FFFBF0;
    border-left: 4px solid var(--gold);
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 16px;
    font-size: 13px;
    color: var(--wood);
    text-align: left;
    line-height: 1.6;
}

.tx-footer {
    background: var(--cream);
    padding: 16px 32px;
    text-align: center;
    font-size: 12px;
    color: var(--muted);
    border-top: 1px solid #eee;
}

.tx-footer a { color: var(--red); text-decoration: none; margin: 0 5px; }

.err-box {
    background: #fee2e2;
    border-left: 4px solid var(--red);
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    color: #991B1B;
    font-size: 14px;
    text-align: left;
    line-height: 1.6;
}

.help-box {
    background: #EFF6FF;
    border-left: 4px solid var(--sky);
    padding: 14px 18px;
    border-radius: 8px;
    margin-top: 18px;
    color: #1E40AF;
    font-size: 13px;
    text-align: left;
    line-height: 1.6;
}

.help-box ul { margin-left: 18px; margin-top: 6px; }

.back-link {
    display: block;
    text-align: center;
    margin-top: 14px;
    color: var(--red);
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
}

.back-link:hover { text-decoration: underline; }

.loading-tx { text-align: center; padding: 40px; color: var(--muted); font-weight: 700; }

@media (max-width: 900px) {
    .layout { flex-direction: column; }
    .sidebar {
        width: 100%; height: auto; position: relative;
        flex-direction: row; flex-wrap: wrap;
    }
    .sidebar-brand { flex: 1; min-width: 200px; border-bottom: none; border-right: 4px solid var(--gold); }
    .sidebar-nav { flex: 2; padding: 12px; }
    .sidebar-nav ul { display: flex; flex-wrap: wrap; gap: 4px; }
    .sidebar-nav li { margin-bottom: 0; }
    .sidebar-footer { display: none; }
    .hero-split { grid-template-columns: 1fr; }
    .about-grid, .game-showcase { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .goods-grid { grid-template-columns: repeat(3, 1fr); }
    .stats-ribbon { flex-wrap: wrap; }
    .stat-item { min-width: 50%; }
}

@media (max-width: 600px) {
    .goods-grid { grid-template-columns: repeat(2, 1fr); }
    .feature-list { grid-template-columns: 1fr; }
    .content-block { padding: 32px 20px; }
    .page-body { padding: 24px 20px; }
}
