/* Base styles for Moonfall game */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;

    /* Prevent text selection during gameplay */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;

    /* Allow pointer events by default */
    pointer-events: auto;
}

body {
    color: #fff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible;
    /* Changed from hidden to visible to prevent content cropping */
    position: relative;
    background-color: #000;
    /* Fallback color */
    font-size: 1.85vmin;
    /* Base font size for scaling */
}

/* Ultrawide background implementation */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image: url('../assets/images/background.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

#app {
    width: 100%;
    height: 100vh;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    position: relative;
    overflow: hidden;
}

h1 {
    text-align: center;
    color: #eedbf1;
    margin-bottom: 3.5vmin;
    font-size: 5.55vmin;
    text-shadow: 0 0 1.16vmin rgba(238, 219, 241, 0.5);
}

.logo-container {
    text-align: center;
    margin-bottom: 2.78vmin;
}

#game-logo {
    max-width: 46.3vmin;
    width: 100%;
    height: auto;
    border-radius: 0.93vmin;
}

h2 {
    color: #eedbf1;
    margin-bottom: 1.74vmin;
    font-size: 3.5vmin;
}

.panel {
    background-color: #16213e;
    border-radius: 0.93vmin;
    padding: 2.3vmin;
    margin-bottom: 2.3vmin;
    box-shadow: 0 0.46vmin 0.93vmin rgba(0, 0, 0, 0.2);
}

button {
    background-color: rgba(74, 63, 53, 0.7);
    color: #eedbf1;
    border: 1px solid rgba(238, 219, 241, 0.5);
    padding: 1.16vmin 1.74vmin;
    margin: 0.58vmin;
    border-radius: 0.46vmin;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(0.35vmin);
    /* Explicitly prevent button dragging */
    cursor: pointer !important;
    /* Ensure cursor shows clickable even if dragging is attempted */
    font-size: 1.85vmin;
}

button:hover:not([disabled]) {
    background-color: rgba(238, 219, 241, 0.3);
    color: #fff;
    box-shadow: 0 0 1.16vmin rgba(238, 219, 241, 0.5);
}

button:disabled {
    background-color: rgba(51, 51, 51, 0.5);
    cursor: not-allowed;
    opacity: 0.5;
    border-color: rgba(238, 219, 241, 0.2);
}

input[type="text"] {
    width: 100%;
    padding: 1.16vmin;
    margin-bottom: 1.16vmin;
    border-radius: 0.46vmin;
    border: 1px solid rgba(238, 219, 241, 0.5);
    background-color: rgba(116, 89, 128, 0.5);
    color: #fff;
    backdrop-filter: blur(0.35vmin);
    font-size: 1.85vmin;
}

/* Animation keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Action in progress indicator */
.action-in-progress {
    cursor: wait !important;
}

.action-in-progress .card.draggable {
    /* Keep interactions disabled, but do not ghost visuals */
    cursor: not-allowed !important;
    pointer-events: none;
}

/* Processing message is now handled by JS with i18n support via .game-notification */

/* Media queries for responsive design */
@media screen and (max-width: 768px) {
    #app {
        padding: 10px;
    }

    .panel {
        padding: 15px;
    }

    button {
        padding: 8px 12px;
    }
}

@media screen and (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }

    .panel {
        padding: 10px;
    }

    button {
        padding: 6px 10px;
        font-size: 0.9rem;
    }
}

/* Unsupported overlays */
#mobile-unsupported-overlay,
#browser-unsupported-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    backdrop-filter: blur(2px);
}

.mobile-unsupported-card,
.browser-unsupported-card {
    background: #1a1a1a;
    border: 1px solid rgba(224, 194, 133, 0.4);
    color: #eedbf1;
    padding: 24px 28px;
    max-width: 520px;
    width: 88%;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.mobile-unsupported-title,
.browser-unsupported-title {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: #e0c285;
}

.mobile-unsupported-body,
.browser-unsupported-body {
    font-size: 1rem;
    opacity: 0.9;
}