@tailwind base;
@tailwind components;
@tailwind utilities;

body {
    font-family: 'Poppins', sans-serif;
    background-color: #F7F8FC;
    color: #1A202C;
}

.icon-container {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* --- Icon Specific Styles --- */

/* Tic-Tac-Toe */
.icon-tictactoe .x-char { color: var(--game-color); font-size: 40px; font-weight: 700; line-height: 1; transform: rotate(-10deg); }
.icon-tictactoe .o-char { color: #A0AEC0; font-size: 38px; font-weight: 700; line-height: 1; position: absolute; top: 25px; left: 30px; transform: rotate(10deg); }

/* Snake */
.icon-snake .snake-body { width: 50px; height: 12px; background: var(--game-color); border-radius: 6px; position: relative; }
.icon-snake .snake-body::before { content: ''; position: absolute; width: 10px; height: 10px; background: #FED7D7; border-radius: 50%; right: -15px; top: 1px; }

/* Pac-Man */
.icon-pacman .pacman-body { width: 48px; height: 48px; background-color: var(--game-color); border-radius: 50%; position: relative; clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%, 0% 50%, 50% 50%); transform: rotate(-45deg); }
.icon-pacman .pacman-dot { position: absolute; width: 8px; height: 8px; background: #A0AEC0; border-radius: 50%; right: 0; top: 20px; }

/* Tetris */
.icon-tetris { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; width: 42px; transform: rotate(-15deg); }
.icon-tetris div { width: 14px; height: 14px; }
.icon-tetris .t-block { background-color: var(--game-color); }
.icon-tetris .l-block { background-color: #FBBF24; }

/* Solitaire */
.icon-solitaire .card { width: 30px; height: 42px; background: white; border-radius: 4px; border: 2px solid #E2E8F0; position: absolute; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); }
.icon-solitaire .card1 { transform: rotate(-15deg); }
.icon-solitaire .card2 { transform: rotate(0deg); top: 5px; border-color: #CBD5E0;}
.icon-solitaire .card3 { transform: rotate(15deg); top: 10px; border-color: var(--game-color); }

/* Minesweeper */
.icon-minesweeper { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; width: 48px; }
.icon-minesweeper .cell { width: 16px; height: 16px; background: #E2E8F0; border-radius: 2px; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; }
.icon-minesweeper .flag { background-color: var(--game-color); color: white; }

/* Asteroids */
.icon-asteroids .ship { width: 0; height: 0; border-left: 12px solid transparent; border-right: 12px solid transparent; border-bottom: 20px solid var(--game-color); transform: rotate(-45deg); position: absolute; }
.icon-asteroids .rock1 { width: 15px; height: 15px; background: #A0AEC0; clip-path: polygon(50% 0%, 100% 25%, 75% 100%, 25% 100%, 0% 25%); position: absolute; top: 5px; right: 5px; transform: rotate(20deg); }
.icon-asteroids .rock2 { width: 10px; height: 10px; background: #A0AEC0; clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); position: absolute; bottom: 10px; left: 10px; transform: rotate(-30deg); }

/* Word Search */
.icon-wordsearch .magnifier { width: 36px; height: 36px; border: 4px solid var(--game-color); border-radius: 50%; position: relative; }
.icon-wordsearch .magnifier::after { content: ''; width: 20px; height: 4px; background: var(--game-color); position: absolute; right: -12px; bottom: -2px; transform: rotate(45deg); }
.icon-wordsearch .letters { font-size: 10px; color: #A0AEC0; line-height: 1; }

/* Dominoes */
.icon-dominoes .domino { width: 22px; height: 44px; background: white; border: 2px solid #E2E8F0; border-radius: 4px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); }
.icon-dominoes .d1 { transform: rotate(-25deg); z-index: 10; }
.icon-dominoes .d2 { transform: rotate(15deg) translate(-10px, 10px); background: var(--game-color); border-color: var(--game-color); }

/* Logic Weaver */
.icon-logicweaver .node { border-radius: 50%; position: absolute; }
.icon-logicweaver .center-node { width: 24px; height: 24px; background-color: var(--game-color); top: 20px; left: 20px; }
.icon-logicweaver .sub-node { width: 12px; height: 12px; background-color: #A0AEC0; }
.icon-logicweaver .sn1 { top: 0; left: 25px; }
.icon-logicweaver .sn2 { top: 25px; left: 0; }
.icon-logicweaver .sn3 { top: 45px; left: 45px; }
.icon-logicweaver .line { height: 2px; background: #CBD5E0; position: absolute; transform-origin: left center; }
.icon-logicweaver .l1 { width: 20px; top: 24px; left: 16px; transform: rotate(-45deg); }
.icon-logicweaver .l2 { width: 20px; top: 35px; left: 16px; transform: rotate(45deg); }
.icon-logicweaver .l3 { width: 20px; top: 35px; left: 35px; transform: rotate(-45deg); }


/* Game View Styles */
.game-view-container .board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    width: 100%;
    max-width: 400px;
}
.game-view-container .cell {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: white;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.game-view-container .cell.x { color: #4285F4; }
.game-view-container .cell.o { color: #EA4335; }
.game-view-container .cell:not(.x):not(.o):hover { background-color: #f0f4ff; }

