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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0f0f1a;
    color: #e0e0e0;
    line-height: 1.6;
    min-height: 100vh;
}

main {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
}

.breadcrumb {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 0.75rem;
}

.breadcrumb a {
    color: #4ecca3;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

h1 {
    text-align: center;
    color: #4ecca3;
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    position: relative;
}

/* HUD */
.game-hud {
    display: flex;
    gap: 2rem;
    align-items: center;
    background: #1a1a2e;
    border: 1px solid #2a2a4e;
    border-radius: 8px;
    padding: 0.5rem 1.5rem;
}

.hud-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
}

.hud-label {
    font-size: 0.7rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hud-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #4ecca3;
    min-width: 3ch;
    text-align: center;
}

/* Canvas wrapper */
.canvas-wrapper {
    position: relative;
    display: inline-block;
    border: 2px solid #2a2a4e;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.5);
}

#game-canvas {
    display: block;
    max-width: 100%;
    touch-action: none;
}

/* Shooter preview */
.shooter-preview {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.preview-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.preview-label {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

#current-bubble-canvas,
#next-bubble-canvas {
    border-radius: 50%;
    border: 1px solid #2a2a4e;
    background: #1a1a2e;
}

/* Overlay */
.overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(15, 15, 26, 0.97);
    padding: 2rem;
    border-radius: 8px;
    border: 2px solid #4ecca3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    z-index: 10;
    min-width: 220px;
    text-align: center;
}

.overlay.hidden {
    display: none;
}

.over-title {
    font-size: 1.75rem;
    color: #4ecca3;
    font-weight: 700;
}

.over-score {
    font-size: 1rem;
    color: #e0e0e0;
}

.overlay button {
    padding: 0.75rem 2rem;
    font-size: 1rem;
    background: #4ecca3;
    color: #0f0f1a;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.overlay button:hover {
    background: #3db892;
}

.overlay .share-btn {
    background: #2a9d8f;
}

.overlay .share-btn:hover {
    background: #248c7f;
}

/* Buttons */
.new-game-btn {
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
    background: #1a1a2e;
    color: #4ecca3;
    border: 2px solid #4ecca3;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.new-game-btn:hover {
    background: #4ecca3;
    color: #0f0f1a;
}

.instructions {
    font-size: 0.9rem;
    color: #888;
    text-align: center;
}

/* Content / SEO article */
.content {
    padding-top: 1rem;
    border-top: 1px solid #2a2a4e;
}

.last-updated {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 0.5rem;
}

.content h2 {
    color: #4ecca3;
    font-size: 1.25rem;
    margin: 1.5rem 0 0.75rem;
}

.content h2:first-of-type {
    margin-top: 1rem;
}

.content p {
    margin-bottom: 0.75rem;
}

.content ul {
    margin: 0.5rem 0 1rem 1.5rem;
}

.content li {
    margin-bottom: 0.5rem;
}

.faq {
    margin: 0.5rem 0 1rem;
}

.faq dt {
    font-weight: 600;
    color: #4ecca3;
    margin-top: 0.75rem;
}

.faq dd {
    margin-left: 1rem;
    color: #ccc;
}

.related-games {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #1a1a2e;
    border-radius: 8px;
    border: 1px solid #2a2a4e;
}

.related-games h3 {
    color: #4ecca3;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.game-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.game-links a {
    color: #4ecca3;
    text-decoration: none;
    padding: 0.35rem 0.75rem;
    border: 1px solid #2a2a4e;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.game-links a:hover {
    background: #2a2a4e;
}

/* Responsive */
@media (min-width: 600px) {
    main {
        padding: 2rem;
    }

    h1 {
        font-size: 2rem;
    }
}

@media (max-width: 440px) {
    #game-canvas {
        width: 320px;
        height: 400px;
    }
}

@media (orientation: landscape) and (max-height: 500px) {
    main { padding-top: 0.5rem; }
    h1 { font-size: 1.5rem; margin-bottom: 0.5rem; }
}
