@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

* {
    margin: 0;  
    padding: 0;
    box-sizing: border-box; 
}

body {
    height: 100vh;
    background: linear-gradient(135deg, #0a0a1f, #1a1a2e, #16213e);
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}
      
.game-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1100px;
}

header {
    padding: 21px 41px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 255, 200, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.title {
    font-size: 2.8rem;
    font-weight: 700;
    background: linear-gradient(90deg, #00ffcc, #00d4ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stats {
    display: flex;
    gap: 40px;
}

.stat-label {
    font-size: 0.9rem;
    color: #94a3b8;
    text-transform: uppercase;
}

.stat-value {
    font-size: 1.9rem;
    font-weight: 600;
    color: #00ffcc;
}

.main-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 70px;
    padding: 40px 20px;
}

/* ==================== TARGET (Small Tiles) ==================== */
.target-panel {
    text-align: center;
}

.target-label {
    color: #64748b;
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: 500;
}

.target-grid {
    display: grid;
    grid-template-columns: repeat(3, 55px);
    gap: 8px;
    background: rgba(15, 23, 42, 0.95);
    padding: 15px;
    border-radius: 16px;
    border: 1px solid rgba(0, 255, 200, 0.2);
}

.mini-tile {
    width: 55px;
    height: 55px;
    border-radius: 10px;
    background: linear-gradient(145deg, #1e2937, #334155);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: #67e8f9;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5),
                inset 0 3px 8px rgba(255,255,255,0.1);
    border: 1px solid #334155;
}

.mini-empty {
    background: rgba(15, 23, 42, 0.6);
    border: 2px dashed #475569;
    box-shadow: none;
}

/* ==================== MAIN PUZZLE (Bigger Tiles) ==================== */
.puzzle-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.puzzle {
    display: grid;
    grid-template-columns: repeat(3, 118px);
    gap: 14px;
    background: rgba(15, 23, 42, 0.95);
    padding: 25px;
    border-radius: 24px;
    border: 2px solid rgba(0, 255, 200, 0.35);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
}

.tile {
    width: 118px;
    height: 118px;
    border-radius: 18px;
    background: linear-gradient(145deg, #1e2937, #334155);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.2rem;
    font-weight: 700;
    color: #00ffcc;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7),
                inset 0 6px 15px rgba(255,255,255,0.08);
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
}

.tile:hover {
    transform: scale(1.08);
    box-shadow: 0 18px 40px rgba(0, 255, 200, 0.4);
}

.tile.empty {
    background: rgba(15, 23, 42, 0.5);
    box-shadow: none;
    cursor: default;
}

.tile.empty:hover {
    transform: none;
}

/* Controls */
.controls {
    margin-top: 35px;
    display: flex;
    gap: 15px;
}

button {
    padding: 14px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-reset {
    background: #334155;
    color: #e2e8f0;
}

.btn-reset:hover {
    background: #475569;
}

.btn-new {
    background: linear-gradient(90deg, #00ffcc, #00d4b8);
    color: #0f172a;
}

.btn-new:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 255, 200, 0.5);
}

.win-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(15, 23, 42, 0.98);
    padding: 50px 70px;
    border-radius: 24px;
    border: 4px solid #00ffcc;
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    box-shadow: 0 0 100px rgba(0, 255, 200, 0.7);
    display: none;
    z-index: 100;
}
