:root {
    --primary-blue: #3b82f6;
    --tile-shadow: #1d4ed8;
    --highlight: #ef4444;
    --bg-color: #f3f4f6;
    --text-color: #1f2937;
    --disabled: #9ca3af;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 10px;
}

header {
    text-align: center;
    margin-bottom: 10px;
}

.stats-bar {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 400px;
    margin-bottom: 15px;
    font-weight: bold;
    font-size: 1.1rem;
}

.timer-box { color: var(--highlight); }
.score-box { color: var(--primary-blue); }

.game-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1;
    margin-bottom: 20px;
    user-select: none;
}

.tile {
    background: linear-gradient(145deg, #60a5fa, #2563eb);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 0 var(--tile-shadow);
    transition: transform 0.1s, background 0.3s;
    position: relative;
}

.tile:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 var(--tile-shadow);
}

.tile.selected {
    background: linear-gradient(145deg, #f87171, #dc2626);
    box-shadow: 0 4px 0 #991b1b;
}

.tile.hint-start {
    border: 4px solid var(--highlight);
}

.tile.disabled {
    background: #d1d5db;
    box-shadow: 0 4px 0 #9ca3af;
    color: #6b7280;
    cursor: default;
    transform: scale(0.95);
}

.clue-container {
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 380px;
    text-align: center;
    margin-bottom: 20px;
    min-height: 60px;
}

.clue-text { font-style: italic; font-size: 1.1rem; }
.word-placeholder { letter-spacing: 5px; font-weight: bold; margin-bottom: 5px; display: block; min-height: 24px;}

.controls {
    display: flex;
    gap: 10px;
}

button {
    padding: 12px 24px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-next { background-color: var(--primary-blue); color: white; display: none; }
.btn-end { background-color: #ef4444; color: white; }
.btn-start { background-color: #10b981; color: white; }

button:disabled { opacity: 0.5; cursor: not-allowed; }

@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}
.shake { animation: shake 0.3s; }
/* ... resto de tu CSS anterior ... */

/* Estilo para el numerito del orden */
.tile-number {
    position: absolute;
    top: 2px;
    right: 5px;       /* Esquina superior derecha */
    font-size: 1.3rem;
    color: #ffd700;   /* Amarillo oro */
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5); /* Sombra para que se lea mejor */
    pointer-events: none; /* Para que no interfiera con los clics */
}