/* Embed Player Styles - Ruffle.js Flash game player */

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

html, body {
    height: 100%;
    background: #000;
    color: #fff;
    font-family: system-ui, -apple-system, sans-serif;
}

#player-container {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

#ruffle-player-container {
    flex: 1;
    width: 100%;
    background: #000;
}

#preloader {
    position: absolute;
    inset: 0;
    z-index: 50;
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#preloader.is-hidden {
    display: none;
}

#preloader-error {
    position: absolute;
    inset: 0;
    z-index: 50;
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#preloader-error.is-error {
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 1rem;
}

.preloader-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.preloader-text {
    font-size: 0.875rem;
    color: #aaa;
    margin-bottom: 1rem;
}

.progress-wrap {
    width: 320px;
    height: 8px;
    background: #333;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: #4ade80;
    transition: width 0.1s;
}

/* Used when the response carries no Content-Length, so no percentage is known. */
.progress-bar.is-indeterminate {
    width: 30%;
    transition: none;
    animation: progress-slide 1.1s ease-in-out infinite;
}

@keyframes progress-slide {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(333%); }
}

.play-btn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    background: #4ade80;
    color: #000;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

.play-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.error-text {
    color: #ff6b6b;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-weight: 600;
    text-align: center;
    width: 100%;
    max-width: 320px;
}

.retry-btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.retry-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}