/* Rune Vigor — Filament Technology LLC */

:root {
    --ice: #00BFFF;
    --ice-light: #ADD8E6;
    --ice-dark: #0a1628;
    --fire: #FF4500;
    --fire-gold: #FFD700;
    --fire-dark: #331A00;
    --accent: #00BFFF;
    --accent-glow: rgba(0, 191, 255, 0.35);
    --panel-bg: rgba(10, 22, 40, 0.82);
    --panel-border: rgba(255, 215, 0, 0.45);
    --text: #e8f4ff;
    --text-muted: #94a3b8;
    --rail-w: 72px;
    --tab-h: 62px;
    --topbar-h: 64px;
    --font-display: 'Rajdhani', sans-serif;
    --font-body: 'Inter', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--ice-dark);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

body[data-theme="home"] { --accent: #00BFFF; --accent-glow: rgba(0, 191, 255, 0.4); }
body[data-theme="company"] { --accent: #FFD700; --accent-glow: rgba(255, 215, 0, 0.35); }
body[data-theme="events"] { --accent: #a855f7; --accent-glow: rgba(168, 85, 247, 0.35); }
body[data-theme="game"] { --accent: #FF4500; --accent-glow: rgba(255, 69, 0, 0.35); }
body[data-theme="contact"] { --accent: #22d3ee; --accent-glow: rgba(34, 211, 238, 0.35); }
body[data-theme="shop"] { --accent: #FFD700; --accent-glow: rgba(255, 215, 0, 0.4); }

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--ice-light); }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.2;
}

/* Shell */
.rune-shell {
    min-height: 100vh;
    padding-right: var(--rail-w);
    padding-bottom: 0;
}

.rune-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: var(--rail-w);
    height: var(--topbar-h);
    z-index: 100;
    display: flex;
    align-items: center;
    padding: 0 24px;
    background: linear-gradient(180deg, rgba(10, 22, 40, 0.95) 0%, rgba(10, 22, 40, 0.7) 100%);
    border-bottom: 1px solid rgba(255, 215, 0, 0.15);
    backdrop-filter: blur(12px);
}

.rune-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    text-decoration: none;
}

.rune-brand img {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid var(--panel-border);
}

.rune-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.rune-brand-text strong {
    font-family: var(--font-display);
    font-size: 1.05rem;
    color: var(--accent);
}

.rune-brand-text em {
    font-size: 0.72rem;
    font-style: normal;
    color: var(--text-muted);
}

.rune-main {
    padding-top: var(--topbar-h);
    min-height: 100vh;
}

/* Rune Rail — right sidebar nav */
.rune-rail {
    position: fixed;
    top: 0;
    right: 0;
    width: var(--rail-w);
    height: 100vh;
    z-index: 200;
    background: linear-gradient(180deg, rgba(0, 191, 255, 0.08) 0%, rgba(255, 69, 0, 0.08) 100%),
                rgba(10, 22, 40, 0.96);
    border-left: 1px solid rgba(255, 215, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 0;
}

.rune-rail::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--ice) 0%, var(--fire-gold) 50%, var(--fire) 100%);
}

.rune-rail-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    padding: 8px 0;
}

.rune-rail-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 6px;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.25s;
    position: relative;
}

.rune-rail-link:hover,
.rune-rail-link.is-active {
    color: var(--accent);
}

.rune-rail-link.is-active::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 70%;
    background: var(--accent);
    border-radius: 3px 0 0 3px;
    box-shadow: 0 0 12px var(--accent-glow);
}

.rune-rail-icon {
    font-size: 1.15rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.rune-rail-link.is-active .rune-rail-icon {
    background: var(--accent-glow);
    border-color: var(--accent);
    box-shadow: 0 0 16px var(--accent-glow);
}

.rune-rail-label {
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: center;
    max-width: 64px;
    line-height: 1.1;
}

/* Mobile tab bar */
.rune-tabbar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--tab-h);
    z-index: 200;
    background: rgba(10, 22, 40, 0.98);
    border-top: 1px solid rgba(255, 215, 0, 0.2);
    backdrop-filter: blur(12px);
}

.rune-tabbar ul {
    list-style: none;
    display: flex;
    height: 100%;
}

.rune-tab-link {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--text-muted);
    font-size: 0.6rem;
    text-decoration: none;
    padding: 6px 2px;
}

.rune-tab-link i { font-size: 1rem; }
.rune-tab-link.is-active { color: var(--accent); }

/* Footer */
.rune-footer {
    padding: 32px 24px 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.25);
}

.rune-footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

.rune-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px 24px;
    margin-bottom: 12px;
}

.rune-footer-links a {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.rune-footer p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Panels */
.rune-panel {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    padding: 28px;
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.page-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 24px 60px;
}

.page-heading {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    margin-bottom: 8px;
    color: var(--accent);
    text-shadow: 0 0 24px var(--accent-glow);
}

.page-lead {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 32px;
    max-width: 720px;
}

.section-title {
    font-size: 1.4rem;
    color: var(--accent);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i { opacity: 0.8; }

/* Hero — Home */
.hero-cinematic {
    position: relative;
    min-height: calc(100vh - var(--topbar-h));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: url('../images/main.png') center/cover no-repeat;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 30, 60, 0.75) 0%, rgba(51, 26, 0, 0.65) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 40px 24px;
    max-width: 800px;
}

.hero-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    border-radius: 20px;
    border: 3px solid var(--panel-border);
    box-shadow: 0 0 40px var(--accent-glow);
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    margin-bottom: 8px;
    background: linear-gradient(90deg, var(--ice-light), var(--fire-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    align-items: center;
}

.hero-cta a {
    display: block;
    transition: transform 0.2s, filter 0.2s;
}

.hero-cta a:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.hero-cta img {
    height: 52px;
    width: auto;
}

/* Portal cards — home preview */
.portal-section {
    padding: 60px 24px;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.3));
}

.portal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.portal-card {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    padding: 28px;
    transition: transform 0.25s, box-shadow 0.25s;
    display: flex;
    flex-direction: column;
}

.portal-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px var(--accent-glow);
}

.portal-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--accent-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--accent);
    margin-bottom: 16px;
    border: 1px solid var(--accent);
}

.portal-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: var(--accent);
}

.portal-card p {
    font-size: 0.92rem;
    color: var(--text-muted);
    flex: 1;
    margin-bottom: 16px;
}

.portal-card ul {
    list-style: none;
    margin-bottom: 16px;
}

.portal-card li {
    font-size: 0.88rem;
    color: var(--text-muted);
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.portal-card li:last-child { border-bottom: none; }

.btn-rune {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: 1px solid var(--accent);
    background: var(--accent-glow);
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-rune:hover {
    background: var(--accent);
    color: var(--ice-dark);
    box-shadow: 0 0 20px var(--accent-glow);
}

.btn-rune-outline {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.25);
    color: var(--text-muted);
}

.btn-rune-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: transparent;
}

/* Screenshot strip */
.screenshot-strip {
    padding: 40px 0 60px;
    overflow: hidden;
}

.screenshot-strip h2 {
    text-align: center;
    font-size: 1.6rem;
    color: var(--accent);
    margin-bottom: 8px;
    padding: 0 24px;
}

.screenshot-hint,
.gallery-hint {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    padding: 0 24px;
}

.screenshot-scroll-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    padding: 0 8px;
}

.scroll-btn {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--panel-border);
    background: var(--panel-bg);
    color: var(--accent);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, box-shadow 0.2s;
    z-index: 2;
}

.scroll-btn:hover {
    background: var(--accent-glow);
    box-shadow: 0 0 16px var(--accent-glow);
}

.screenshot-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 8px 4px 16px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    flex: 1;
    cursor: grab;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) rgba(255, 255, 255, 0.08);
}

.screenshot-scroll-wrap.is-centered {
    justify-content: center;
}

.screenshot-scroll-wrap.is-centered .scroll-btn {
    display: none;
}

.screenshot-scroll.is-centered {
    flex: 0 1 auto;
    justify-content: center;
    overflow-x: hidden;
    cursor: default;
    scrollbar-width: none;
}

.screenshot-scroll.is-centered::-webkit-scrollbar {
    display: none;
}

.screenshot-scroll.is-dragging {
    cursor: grabbing;
    user-select: none;
}

.screenshot-scroll::-webkit-scrollbar { height: 6px; }
.screenshot-scroll::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.06); border-radius: 3px; }
.screenshot-scroll::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

.screenshot-item,
.gallery-item {
    position: relative;
    padding: 0;
    border: none;
    background: none;
    cursor: zoom-in;
    overflow: hidden;
    border-radius: 12px;
    flex: 0 0 auto;
    scroll-snap-align: start;
}

.screenshot-item {
    width: 280px;
    height: 160px;
}

.screenshot-item img,
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    border: 2px solid var(--panel-border);
    transition: transform 0.25s, filter 0.25s;
    display: block;
}

.screenshot-item:hover img,
.gallery-item:hover img {
    transform: scale(1.04);
    filter: brightness(1.08);
}

.zoom-hint {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 22, 40, 0.55);
    color: #fff;
    font-size: 1.4rem;
    opacity: 0;
    transition: opacity 0.25s;
    border-radius: 12px;
    pointer-events: none;
}

.screenshot-item:hover .zoom-hint,
.gallery-item:hover .zoom-hint {
    opacity: 1;
}

/* Lightbox */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(5, 10, 20, 0.92);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.lightbox-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.lightbox-dialog {
    position: relative;
    max-width: min(960px, 92vw);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: calc(90vh - 80px);
    object-fit: contain;
    border-radius: 12px;
    border: 2px solid var(--panel-border);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    transform: scale(0.92);
    transition: transform 0.3s;
}

.lightbox-overlay.is-open .lightbox-image {
    transform: scale(1);
}

.lightbox-caption {
    margin-top: 14px;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
    max-width: 640px;
}

.lightbox-close {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--panel-border);
    background: var(--panel-bg);
    color: var(--text);
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
    z-index: 3;
}

.lightbox-close:hover {
    background: var(--fire);
    color: #fff;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--panel-border);
    background: rgba(10, 22, 40, 0.85);
    color: var(--accent);
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, box-shadow 0.2s;
}

.lightbox-nav:hover {
    background: var(--accent-glow);
    box-shadow: 0 0 16px var(--accent-glow);
}

.lightbox-prev { left: -56px; }
.lightbox-next { right: -56px; }

.lightbox-counter {
    position: absolute;
    top: -36px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 0.08em;
}

body.lightbox-open {
    overflow: hidden;
}

/* Bottom CTA row */
.bottom-cta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px 60px;
}

/* Company page */
.company-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: center;
    margin-bottom: 48px;
}

.company-image {
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid var(--panel-border);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.company-image img {
    width: 100%;
    height: 320px;
    object-fit: cover;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-item {
    text-align: center;
    padding: 28px 20px;
}

.feature-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--accent-glow);
    border: 2px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--accent);
}

.feature-item h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--accent);
}

.feature-item p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Events timeline */
.timeline-rune {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
}

.timeline-rune::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--ice), var(--accent), var(--fire));
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 0 32px 40px;
}

.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
    padding-right: 48px;
}

.timeline-item:nth-child(even) {
    left: 50%;
    padding-left: 48px;
}

.timeline-badge {
    position: absolute;
    top: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--ice-dark);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--ice-dark);
    box-shadow: 0 0 16px var(--accent-glow);
    z-index: 2;
}

.timeline-item:nth-child(odd) .timeline-badge { right: -18px; }
.timeline-item:nth-child(even) .timeline-badge { left: -18px; }

.timeline-content {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    padding: 20px;
}

.timeline-content p {
    font-size: 0.92rem;
    color: var(--text-muted);
}

/* Game page */
.game-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 32px;
}

.gallery-item {
    width: 100%;
    height: 180px;
    cursor: zoom-in;
}

.game-gallery .gallery-item:first-child {
    grid-column: span 2;
    grid-row: span 2;
    height: 100%;
    min-height: 280px;
}

/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.contact-card {
    text-align: center;
    padding: 36px 24px;
}

.contact-card-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    border-radius: 16px;
    background: var(--accent-glow);
    border: 2px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--accent);
}

.contact-card h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: var(--accent);
}

.contact-card p,
.contact-card a {
    font-size: 0.95rem;
    color: var(--text-muted);
    word-break: break-word;
}

.contact-card a:hover { color: var(--accent); }

/* Shop — three column layout */
.shop-layout {
    display: grid;
    grid-template-columns: 240px 1fr 320px;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px 60px;
    align-items: start;
}

.shop-intro-panel h2,
.shop-ingot-panel h2,
.shop-order-panel h2 {
    font-size: 1.15rem;
    color: var(--accent);
    margin-bottom: 16px;
}

.shop-intro-list {
    list-style: none;
}

.shop-intro-list li {
    font-size: 0.88rem;
    color: var(--text-muted);
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    gap: 10px;
}

.shop-intro-list li i {
    color: var(--accent);
    margin-top: 3px;
    flex-shrink: 0;
}

.ingot-scroll {
    max-height: min(560px, calc(100vh - var(--topbar-h) - 140px));
    overflow-y: auto;
    overflow-x: hidden;
    margin: 0 -4px;
    padding: 0 4px 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) rgba(255, 255, 255, 0.08);
}

.ingot-scroll::-webkit-scrollbar { width: 6px; }
.ingot-scroll::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.06); border-radius: 3px; }
.ingot-scroll::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

.ingot-mosaic {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
}

.ingot-tile {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.ingot-tile:hover {
    border-color: rgba(255, 215, 0, 0.4);
    background: rgba(255, 215, 0, 0.06);
}

.ingot-tile.is-selected {
    border-color: var(--accent);
    background: var(--accent-glow);
    box-shadow: 0 0 20px var(--accent-glow);
}

.ingot-tile img {
    width: 56px;
    height: 56px;
    margin: 0 auto 10px;
    object-fit: contain;
}

.ingot-tile-title {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text);
}

.ingot-tile-price {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent);
}

.ingot-loading,
.ingot-empty,
.ingot-error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.ingot-loading i {
    color: var(--accent);
    margin-right: 8px;
}

.selected-ingot-display {
    background: rgba(0, 0, 0, 0.25);
    border: 1px dashed rgba(255, 215, 0, 0.3);
    border-radius: 10px;
    padding: 14px;
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    text-align: center;
}

.shop-order-panel {
    position: sticky;
    top: calc(var(--topbar-h) + 16px);
}

.form-field {
    margin-bottom: 16px;
}

.form-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-muted);
}

.form-field .req { color: var(--fire); }

.form-field input[type="text"],
.form-field input[type="email"] {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.35);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.95rem;
}

.form-field input:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.form-field input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.payment-radios {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.payment-radio {
    display: block;
    padding: 0;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.payment-radio:has(input:checked) {
    border-color: var(--accent);
    background: var(--accent-glow);
}

.payment-radio input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.payment-radio-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
}

.payment-radio-inner img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
}

.payment-label {
    font-size: 0.9rem;
    color: var(--text);
    font-weight: 500;
}

.agree-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.agree-row input { margin-top: 4px; accent-color: var(--accent); }

.agree-row label {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.field-error {
    display: block;
    font-size: 0.78rem;
    color: #f87171;
    margin-top: 4px;
    min-height: 0;
}

.alert-box {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.alert-box.error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

.btn-submit {
    width: 100%;
    padding: 14px;
    margin-top: 8px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), var(--fire-gold));
    color: var(--ice-dark);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--accent-glow);
}

/* Portal pages — confirm / payfinish / error */
.portal-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at 30% 20%, rgba(0, 191, 255, 0.15) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 80%, rgba(255, 69, 0, 0.12) 0%, transparent 50%),
                var(--ice-dark);
}

.portal-overlay {
    width: 100%;
    max-width: 520px;
    padding: 24px;
}

.portal-card {
    background: var(--panel-bg);
    border: 2px solid var(--panel-border);
    border-radius: 20px;
    padding: 36px 32px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.portal-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.portal-icon.success {
    background: rgba(34, 197, 94, 0.2);
    border: 2px solid #22c55e;
    color: #22c55e;
}

.portal-icon.fail {
    background: rgba(239, 68, 68, 0.2);
    border: 2px solid #ef4444;
    color: #ef4444;
}

.portal-icon.pending {
    background: var(--accent-glow);
    border: 2px solid var(--accent);
    color: var(--accent);
}

.portal-card h1 {
    font-size: 1.6rem;
    margin-bottom: 8px;
    color: var(--accent);
}

.portal-card .portal-lead {
    font-size: 0.92rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.confirm-rows {
    text-align: left;
    margin-bottom: 24px;
}

.confirm-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.9rem;
}

.confirm-row .lbl {
    color: var(--text-muted);
    font-weight: 500;
}

.confirm-row .val {
    color: var(--text);
    font-weight: 600;
    text-align: right;
    max-width: 60%;
    word-break: break-word;
}

.confirm-row .val.highlight { color: var(--accent); }

.confirm-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.progress-ring-wrap {
    position: relative;
    width: 64px;
    height: 64px;
    margin: 16px auto;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 4;
}

.progress-ring-fill {
    fill: none;
    stroke: var(--accent);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 157;
    stroke-dashoffset: 157;
    transition: stroke-dashoffset 0.1s linear;
}

.progress-ring-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--accent);
}

.help-list {
    text-align: left;
    list-style: none;
    margin: 20px 0;
}

.help-list li {
    font-size: 0.88rem;
    color: var(--text-muted);
    padding: 8px 0 8px 24px;
    position: relative;
}

.help-list li::before {
    content: '\f058';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 0.8rem;
}

.portal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}

/* Responsive */
@media (max-width: 1024px) {
    .shop-layout {
        grid-template-columns: 1fr 1fr;
    }

    .shop-intro-panel {
        grid-column: 1 / -1;
    }

    .portal-grid,
    .feature-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .company-split {
        grid-template-columns: 1fr;
    }

    .bottom-cta {
        grid-template-columns: 1fr;
    }

    .game-gallery {
        grid-template-columns: 1fr 1fr;
    }

    .game-gallery .gallery-item:first-child {
        grid-column: span 2;
        grid-row: span 1;
        min-height: 200px;
    }
}

@media (max-width: 768px) {
    .rune-shell {
        padding-right: 0;
        padding-bottom: var(--tab-h);
    }

    .rune-topbar {
        right: 0;
    }

    .rune-rail { display: none; }
    .rune-tabbar { display: block; }

    .shop-layout {
        grid-template-columns: 1fr;
    }

    .shop-order-panel {
        position: static;
    }

    .timeline-rune::before { left: 20px; }

    .timeline-item,
    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        width: 100%;
        left: 0;
        text-align: left;
        padding: 0 0 32px 52px;
    }

    .timeline-item:nth-child(odd) .timeline-badge,
    .timeline-item:nth-child(even) .timeline-badge {
        left: 2px;
        right: auto;
    }

    .hero-cta img { height: 44px; }

    .game-gallery {
        grid-template-columns: 1fr;
    }

    .game-gallery .gallery-item:first-child {
        grid-column: span 1;
    }

    .scroll-btn { display: none; }

    .lightbox-prev { left: 8px; }
    .lightbox-next { right: 8px; }
    .lightbox-close { top: 8px; right: 8px; }
    .lightbox-counter { top: 8px; }
}
