.rhg-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0px;
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
        sans-serif;
}

.rhg-game {
    background: #e7ebee;
    border-radius: 12px;
    padding: clamp(0.125rem, -0.8125rem + 3.75vw, 2rem);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    border: 1px solid #ccc;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto 1fr;
    grid-gap: 2rem;
}

/* NEU: Filter Container */
.rhg-filter-container {
    margin-bottom: 0px;
    padding: 16px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    grid-column: 1 / 2;
    grid-row: 1 / 2;
}

.rhg-select {
    width: 100%;
    padding: 12px;
    border: 2px solid #338899;
    border-radius: 6px;
    font-size: 16px;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.rhg-select:hover {
    border-color: #2a6f7d;
}

.rhg-select:focus {
    outline: none;
    border-color: #cc3333;
    box-shadow: 0 0 0 3px rgba(204, 51, 51, 0.1);
}

.rhg-view-container {
    position: relative;
    margin: 0 auto;
    width: 100%;
    max-width: 100%;
    min-height: 290px;
    background: white;
    border-radius: 8px;
    padding: 10px;
    border: 2px solid #dee2e6;
    grid-column: 2/-1;
    grid-row: 1/-1;
}

#rhg-canvas {
    display: block;
    margin: 0 auto;
    background: white;
    border-radius: 4px;
    touch-action: none;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.rhg-info {
    text-align: center;
    margin: 0;
    padding: 16px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    grid-column: 1/2;
}

.rhg-stats {
    font-size: 20px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 8px;
}

.rhg-board-id {
    color: #6c757d;
    font-size: 14px;
    font-style: italic;
}

.rhg-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 1fr;
    gap: 2rem;
    margin: 0;
    grid-column: 1/2;
    align-self: end;
}

.rhg-button {
    padding: 2.5rem 1.5rem;
    border: none;
    border-radius: 6px;
    background: #338899;
    color: white;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
    text-align: center;
}

.rhg-button:hover {
    background: #2a6f7d;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.rhg-button:active {
    transform: translateY(0);
}

.rhg-button:disabled {
    background: #adb5bd;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.rhg-button-primary {
    background: #cc3333;
}

.rhg-button-primary:hover {
    background: #a32929;
}

/* NEU: Share Button */
#rhg-share {
    background: #28a745;
}

#rhg-share:hover {
    background: #218838;
}

/* NEU: Loading Animation */
.rhg-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(51, 136, 153, 0.3);
    border-radius: 50%;
    border-top-color: #338899;
    animation: rhg-spin 1s ease-in-out infinite;
    margin-left: 10px;
}

@keyframes rhg-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 991px) {
    .rhg-view-container {
        grid-column: 1/2;
        grid-row: 2/3;
    }
    .rhg-game {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
}

@media (max-width: 768px) {
    .rhg-container {
        padding: 0;
    }
    .rhg-button {
        padding: 3rem 1.5rem;
        font-size: 15px;
        min-width: 100px;
    }

    .rhg-select {
        padding: 10px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .rhg-controls {
        flex-direction: column;
        align-items: center;
    }

    .rhg-button {
        width: 100%;
        max-width: 250px;
    }

    .rhg-filter-container {
        padding: 12px;
    }
}
