body {
    margin: 0;
    padding: 0;
    color: #333333; /* Dark text for white background */
    background-color: #FFFFFF; /* White background */
    font-family: 'Segoe UI', Arial, Helvetica, sans-serif;
    overflow: hidden; /* Prevent scrollbars */
    width: 100%;
    height: 100%;
}

/* For iframe embedding - ensure app fills entire viewport */
.iframe-embed body, 
.iframe-embed html, 
.iframe-embed #root {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background-color: transparent !important;
}

#app {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* Game container styling */
#game-container {
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
    overflow: hidden; /* Prevent any overflowing elements */
}

/* Make game container fill iframe completely when in iframe embed mode */
.iframe-embed #game-container {
    width: 100% !important;
    height: 100% !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
}

/* Canvas styling - ensuring the Phaser canvas is visible and properly sized */
canvas {
    display: block;
    margin: 0 auto;
    outline: none !important; /* Remove any outline that might appear */
    border: none !important; /* Remove any border that might appear */
    border-radius: 0 !important; /* Remove any border radius */
    box-shadow: none !important; /* Remove any box shadow */
}

/* Special canvas styling for iframe embedding */
.iframe-embed canvas {
    display: block !important;
    margin: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
}

/* Remove ANY borders/styling from Phaser game elements - very aggressive approach */
#game-container canvas,
#game-container div,
#game-container *,
.Phaser,
#app > canvas,
canvas,
svg {
    border-radius: 0 !important; /* Force remove any border radius */
    box-shadow: none !important; /* Remove any box shadow */
    outline: none !important; /* Remove any outline */
    border: none !important; /* Remove any border */
}

/* Force specific fix for the mysterious rounded rectangle */
.phaser-debug {
    display: none !important;
}

#game-container > div > div {
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

/* App Title */
.app-title {
    position: absolute;
    top: 25px;
    left: 30px;
    z-index: 100;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7); /* Darker shadow for better readability */
    transition: opacity 0.3s ease;
}

.app-title h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.95);
}

.app-title p {
    margin: 5px 0 0;
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
}

/* Main Controls */
.main-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 110;
}

.primary-button {
    width: 36px;
    height: 36px;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
}

.tools-button {
    width: 36px;
    height: 36px;
    background-color: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    opacity: 0.7;
    transition: opacity 0.3s ease, transform 0.2s ease;
}

.tools-button:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.spritePosition {
    margin: 10px 0 0 10px;
    font-size: 0.8em;
}

/* Debug Panel */
.debug-panel {
    top: 70px !important;
    right: 20px !important;
    border: 1px solid rgba(255, 200, 0, 0.2) !important;
    z-index: 110 !important;
}

/* Compact Control Panel */
.control-panel {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.35);
    border-radius: 8px;
    padding: 4px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    z-index: 110;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    max-width: 95%;
    flex-wrap: wrap;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

.control-panel:hover {
    background-color: rgba(0, 0, 0, 0.6);
}

/* Button group */
.button-group {
    display: flex;
    gap: 3px;
}

/* Icon button styling */
.icon-button {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.3);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
    position: relative;
}

.icon-button:hover {
    border: 1px solid #0ec3c9;
    color: #0ec3c9;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.icon-button:active {
    background-color: #0ec3c9;
    color: #000;
    transform: translateY(0);
}

.icon-button:disabled {
    cursor: not-allowed;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.2);
    transform: none;
    box-shadow: none;
}

/* Slash overlay for toggled off icons */
.icon-slash {
    position: absolute;
    width: 2px;
    height: 22px;
    background-color: rgba(255, 100, 100, 0.8);
    transform: rotate(45deg);
    top: 3px;
    left: 13px;
}

/* Old button styling - keeping for compatibility */
.button {
    font-size: 0.8rem;
    padding: 6px 10px;
    background-color: rgba(0, 0, 0, 0.5);
    color: rgba(255, 255, 255, 0.87);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 90px;
    text-align: center;
    margin: 0;

    &:hover {
        border: 1px solid #0ec3c9;
        color: #0ec3c9;
    }

    &:active {
        background-color: #0ec3c9;
        color: #000;
    }

    /* Disabled styles */
    &:disabled {
        cursor: not-allowed;
        border: 1px solid rgba(255, 255, 255, 0.2);
        color: rgba(255, 255, 255, 0.2);
    }
}

/* Stats panel */
.stats {
    margin-left: 6px;
    font-size: 0.65rem;
    display: flex;
    flex-direction: column;
    color: rgba(255, 255, 255, 0.6);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: 6px;
}

.stats > div {
    margin-bottom: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rings-info {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
}

.ring-stat {
    font-size: 0.6rem;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.5);
}

/* Modal panels */
.user-data-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(3px);
}

/* Make dropdowns and detailed data panels more compact */
.data-explorer, .user-data-loader {
    background-color: rgba(15, 15, 15, 0.95);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    padding: 15px;
    max-height: 80vh;
    overflow-y: auto;
    width: 70%;
    max-width: 900px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
}