/* Base styles */
body, html {
    font-family: 'Inter', sans-serif;
    overscroll-behavior: none;
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none; /* IE 10+ */
    user-select: none; /* Standard syntax */
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight */
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

/* Prevent flashing on tap */
button, div, h1 {
    -webkit-tap-highlight-color: rgba(0,0,0,0);
}

/* Custom gradient text */
.gradient-text {
    background: linear-gradient(to right, #67e8f9, #0ea5e9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Game-over score pulse */
@keyframes pulse-score {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: .9;
        transform: scale(1.05);
    }
}
.pulse-score {
    animation: pulse-score 2.5s ease-in-out infinite;
}

/* Custom styles for select dropdowns */
.custom-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%2367e8f9" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.5em 1.5em;
}

/* Style for the options in the dropdown */
select option {
    background: #1f2937; /* Dark background */
    color: white;
}

/* --- REWRITTEN MODAL STYLES (NO @apply) --- */
#word-modal {
    position: fixed;
    top: 0; right: 0; bottom: 0; left: 0;
    z-index: 50;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    display: none; /* Hidden by default */
}
#word-modal.is-open {
    display: flex; /* Show when open */
}
#modal-backdrop {
    position: fixed;
    top: 0; right: 0; bottom: 0; left: 0;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    transition: opacity 300ms ease-in-out;
    opacity: 0; /* Hidden by default */
}
#word-modal.is-open #modal-backdrop {
    opacity: 1; /* Fade in */
}
#modal-content {
    background-color: #1f2937; /* bg-gray-800 */
    color: white;
    border-radius: 1rem; /* rounded-2xl */
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); /* shadow-2xl */
    z-index: 10;
    width: 100%;
    max-width: 28rem; /* max-w-md */
    transition: all 300ms ease-in-out;
    opacity: 0;
    transform: scale(0.95);
}
#word-modal.is-open #modal-content {
    opacity: 1;
    transform: scale(1.0);
}
#modal-list {
    padding: 1.5rem; /* p-6 */
    max-height: 70vh;
    overflow-y: auto;
}
.results-list-item {
    font-size: 1.125rem; /* text-lg */
    font-weight: 500; /* font-medium */
    padding: 0.5rem; /* p-2 */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* border-b border-white/10 */
}

.hidden {
    display: none;
}