body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, var(--background-1), var(--background-2), var(--background-3));
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 25px;
    background: var(--header);
    border-bottom: 1px solid var(--accent);
    backdrop-filter: blur(10px);
}

.header h1 {
    margin: 0;
    font-size: 20px;
}

.header a {
    color: var(--accent);
    font-weight: bold;
    text-decoration: none;
}

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

.game-wrapper {
    width: 95%;
    max-width: 1200px;
    margin: 30px auto;
}

.game-container {
    position: relative;
    overflow: hidden;
    background: #000;
    border-radius: 12px;
    box-shadow: 0 10px 30px var(--shadow);
}

.game-container iframe {
    display: block;
    width: 100%;
    height: 70vh;
    border: 0;
    background: #000;
}

.game-container.css-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 999999;
    width: 100vw;
    height: 100vh;
    max-width: none;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
}

.game-container.css-fullscreen iframe {
    width: 100%;
    height: 100%;
}

.local-game-fullscreen {
    position: fixed !important;
    z-index: 999999 !important;
    inset: 0 !important;
    box-sizing: border-box !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    overflow: auto;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.local-game-fullscreen iframe,
.local-game-fullscreen canvas {
    max-width: 100%;
    max-height: 100%;
}

.game-notification-container {
    position: fixed;
    top: 16px;
    left: 50%;
    z-index: 10000001;
    display: flex;
    width: min(420px, calc(100vw - 24px));
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
    transform: translateX(-50%);
}

.game-notification {
    display: flex;
    min-height: 58px;
    align-items: center;
    gap: 12px;
    padding: 11px 13px;
    border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
    border-radius: 12px;
    background: color-mix(in srgb, var(--background-2) 96%, transparent);
    color: var(--text);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(14px);
    opacity: 0;
    pointer-events: auto;
    transform: translateY(-14px);
    transition: opacity 180ms ease, transform 180ms ease;
}

.game-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.game-notification-content {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    gap: 4px;
}

.game-notification-content strong {
    color: var(--title);
    font-size: 14px;
}

.game-notification-content span {
    overflow: hidden;
    color: var(--text);
    font-size: 12px;
    opacity: 0.75;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.game-notification-coin {
    border-color: rgba(91, 190, 126, 0.65);
}

.game-notification-close {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font-size: 20px;
}

.game-notification-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.game-signup-reminder-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000002;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.68);
}

.game-signup-reminder {
    width: min(440px, 100%);
    padding: 24px;
    border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
    border-radius: 12px;
    background: var(--background-2);
    color: var(--text);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.48);
}

.game-signup-reminder h2 {
    margin: 0 0 10px;
    color: var(--title);
    font-size: 21px;
}

.game-signup-reminder p {
    margin: 0;
    line-height: 1.5;
}

.game-signup-reminder-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    margin-top: 22px;
}

.game-signup-reminder-actions button {
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 7px;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

.game-signup-reminder-dismiss {
    border-color: color-mix(in srgb, var(--text) 24%, transparent) !important;
    background: transparent;
    color: var(--text);
}

.game-signup-reminder-confirm {
    background: var(--accent);
    color: var(--background-1);
}

.local-game-fullscreen iframe {
    width: 100%;
    height: 100%;
}

.loading {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: #000;
    font-size: 18px;
}

.fullscreen-exit {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 9999999;
    display: none;
    padding: 8px 12px;
    color: #fff;
    background: rgba(0, 0, 0, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    cursor: pointer;
    pointer-events: auto;
}

.game-container.css-fullscreen .fullscreen-exit {
    display: block;
}

.local-game-fullscreen .fullscreen-exit {
    position: absolute;
    z-index: 10000000;
    display: block;
    pointer-events: auto;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 15px;
}

.controls button {
    padding: 10px 18px;
    color: #001018;
    background: var(--accent);
    border: 0;
    border-radius: 8px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
}

.controls button:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 15px var(--glow);
}

@media (max-width: 800px) {
    .header h1 {
        font-size: 16px;
    }

    .game-container iframe {
        height: 60vh;
    }
}