/* CloudScale Crash Recovery, Custom 404 page styles v1.5.0 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
    background: linear-gradient(160deg, #cce9fb 0%, #a8d8f0 100%);
    color: #1a3a5c;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    padding: 28px 24px 36px;
    overflow-x: hidden;
    position: relative;
}
body::before {
    content: '';
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 640px; height: 640px;
    background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, transparent 70%);
    pointer-events: none;
}
.cs404-wrap {
    position: relative;
    text-align: center;
    max-width: 760px;
    width: 100%;
    animation: cs404-in 0.55s cubic-bezier(0.22,1,0.36,1);
}
@keyframes cs404-in {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.cs404-heading-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    width: 100%;
    max-width: 760px;
    margin: 0 0 10px;
}
.cs404-heading {
    font-size: clamp(28px, 6vw, 52px);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #f57c00 0%, #ffa726 55%, #ff9800 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    text-align: center;
}
.cs404-desc {
    font-size: 19px;
    font-weight: 700;
    color: #0d2a4a;
    line-height: 1.5;
    margin-bottom: 20px;
}
.cs404-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 32px;
    background: linear-gradient(135deg, #f57c00, #e65100);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 24px rgba(245,124,0,0.32);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cs404-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 28px rgba(245,124,0,0.44); }
.cs404-btn:focus { outline: 2px solid #f57c00; outline-offset: 3px; }
.cs404-btn svg { width: 16px; height: 16px; fill: currentColor; flex-shrink: 0; }
/* Brand block */
.cs404-brand {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}
.cs404-logo a { display: inline-block; }
.cs404-logo img { max-height: 48px; width: auto; display: block; }
.cs404-site-name {
    font-size: 15px;
    font-weight: 700;
    color: #0d2a4a;
    letter-spacing: 0.04em;
}
.cs404-tagline {
    font-size: 13px;
    color: #3a6080;
    letter-spacing: 0.01em;
}
/* Game, sits above the main card */
.cs404-game-wrap {
    margin-bottom: 24px;
    text-align: center;
    animation: cs404-in 0.7s cubic-bezier(0.22,1,0.36,1) both;
    animation-delay: 0.15s;
}
.cs404-game-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #3a6080;
    margin-bottom: 10px;
}
#cs404-game {
    display: block;
    margin: 0 auto;
    border-radius: 10px;
    background: rgba(255,255,255,0.45);
    border: 2px solid rgba(42,96,144,0.25);
    cursor: pointer;
    max-width: 100%;
}
.cs404-dots { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.cs404-dot { position: absolute; border-radius: 50%; background: rgba(255,255,255,0.6); }
.cs404-home-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 18px;
    background: linear-gradient(135deg,#0080ff,#0050cc);
    border: 2px solid transparent;
    border-radius: 20px;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0,128,255,0.35);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.cs404-home-btn:hover {
    box-shadow: 0 4px 16px rgba(0,128,255,0.55);
    transform: translateY(-1px);
}
/* Game tabs */
.cs404-tabs {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.cs404-tab {
    padding: 6px 18px;
    border: 2px solid rgba(42,96,144,0.3);
    border-radius: 20px;
    background: rgba(255,255,255,0.4);
    color: #0d2a4a;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.cs404-tab:hover { background: rgba(255,255,255,0.7); border-color: rgba(42,96,144,0.5); }
.cs404-tab.active {
    background: linear-gradient(135deg,#f57c00,#e65100);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 2px 12px rgba(245,124,0,0.3);
}
/* Miner on-screen controls (touch) */
.cs404-miner-ctrl {
    display: none;
    justify-content: center;
    gap: 16px;
    margin-top: 10px;
}
.cs404-miner-btn {
    padding: 10px 28px;
    background: rgba(255,255,255,0.4);
    border: 2px solid rgba(42,96,144,0.3);
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    color: #0d2a4a;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}
.cs404-miner-btn:active { background: rgba(255,255,255,0.7); }
/* Leaderboard panel */
#cs404-lb-panel {
    margin: 14px auto 0;
    width: 100%;
    max-width: 620px;
    background: rgba(13,42,74,0.07);
    border: 1.5px solid rgba(42,96,144,0.2);
    border-radius: 10px;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}
.cs404-lb-header {
    background: rgba(13,42,74,0.1);
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 700;
    color: #0d2a4a;
    border-bottom: 1px solid rgba(42,96,144,0.15);
}
.cs404-lb-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 14px;
    font-size: 12px;
    border-bottom: 1px solid rgba(42,96,144,0.07);
}
.cs404-lb-row:last-child { border-bottom: none; }
.cs404-lb-row-gold { background: rgba(251,191,36,0.09); }
.cs404-lb-rank { min-width: 26px; font-size: 13px; }
.cs404-lb-name {
    flex: 1;
    font-weight: 600;
    color: #1a3a5c;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cs404-lb-score {
    font-weight: 700;
    color: #f57c00;
    font-variant-numeric: tabular-nums;
    font-family: monospace;
    letter-spacing: 0.04em;
}
.cs404-lb-empty {
    padding: 11px 14px;
    color: #3a6080;
    font-size: 12px;
    font-style: italic;
}
/* CloudScale plugin badge */
.cs404-plugin-badge {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    margin-top: 22px;
    padding: 10px 20px 10px 16px;
    background: rgba(255,255,255,0.5);
    border: 1.5px solid rgba(245,124,0,0.28);
    border-radius: 14px;
    text-decoration: none;
    color: #0d2a4a;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}
.cs404-plugin-badge:hover {
    background: rgba(255,255,255,0.85);
    border-color: #f57c00;
    box-shadow: 0 4px 18px rgba(245,124,0,0.22);
    transform: translateY(-2px);
}
.cs404-plugin-badge-icon {
    font-size: 24px;
    line-height: 1;
    flex-shrink: 0;
}
.cs404-plugin-badge-label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #3a6080;
    line-height: 1.2;
}
.cs404-plugin-badge-name {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #f57c00;
    line-height: 1.25;
    white-space: nowrap;
}
