/**
 * RAGTIME WRAPPER v5.0.0 — Game Shell (inside iframe)
 * No header/footer — those live on the parent WordPress page.
 * Game fills 100% of the iframe viewport.
 */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
    width: 100%; height: 100%;
    overflow: hidden;
    background: #000;
    color: #f0f0f2;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
}

.ragtime-wrapper {
    width: 100%; height: 100%;
    display: flex; flex-direction: column;
}

.ragtime-main {
    flex: 1 1 auto;
    position: relative;
    width: 100%; min-height: 0;
    overflow: hidden;
}

.ragtime-screen {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    z-index: 10;
}

.ragtime-loading {
    background: #000;
    flex-direction: column;
    gap: 16px;
}
.ragtime-loading-content {
    display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.ragtime-spinner {
    width: 32px; height: 32px;
    border: 3px solid #1a1a22;
    border-top-color: #8b5cf6;
    border-radius: 50%;
    animation: ragtime-spin 0.8s linear infinite;
}
@keyframes ragtime-spin { to { transform: rotate(360deg); } }
.ragtime-loading p { color: #707080; font-size: 0.85em; }

.ragtime-error { background: #000; }
.ragtime-error-card {
    background: #0a0a0c;
    border: 1px solid #1a1a22;
    border-radius: 6px;
    padding: 28px 24px;
    max-width: 400px; width: 90%;
    text-align: center;
}
.ragtime-error-icon {
    width: 40px; height: 40px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: rgba(239,68,68,0.12);
    color: #ef4444;
    font-size: 1.3em; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.ragtime-error-card h2 { font-size: 1em; font-weight: 600; margin-bottom: 8px; }
.ragtime-error-card p { color: #707080; font-size: 0.82em; margin-bottom: 16px; word-break: break-word; }

.ragtime-btn {
    font-family: inherit; font-size: 0.82em; font-weight: 500;
    padding: 8px 18px; border: 1px solid #1a1a22; border-radius: 6px;
    background: transparent; color: #f0f0f2; cursor: pointer;
}
.ragtime-btn-primary { background: #8b5cf6; border-color: #8b5cf6; color: #fff; }

.ragtime-game-container {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    overflow: auto; background: transparent;
}

/* Force every game's root element to fill the full container regardless
   of its own CSS. Covenant v5.0 rule: games should fill the play field at
   all device resolutions. Games can still control internal layout, but
   their outermost element must be the full size of the iframe. */
.ragtime-game-container > * {
    width: 100% !important;
    height: 100% !important;
    flex: 1 1 auto !important;
    align-self: stretch !important;
}
