.container{max-width:1200px;padding:20px;min-height:100vh;display:flex;flex-direction:column;align-items:center}header{text-align:center;margin-bottom:30px;color:#fff}header h1{font-size:3rem;font-weight:700;margin-bottom:10px;text-shadow:2px 2px 4px rgba(0,0,0,.3);animation:fadeInDown .1s ease-out}header p{font-size:1.2rem;opacity:.9;animation:fadeInUp .1s ease-out .2s both}.game-controls{display:flex;flex-wrap:wrap;gap:20px;align-items:center;justify-content:center;margin-bottom:30px;padding:20px;background:rgba(255,255,255,.95);border-radius:15px;box-shadow:0 8px 32px rgba(0,0,0,.1);backdrop-filter:blur(10px);animation:fadeIn .1s ease-out .4s both}.board-size-selector,.difficulty-selector{display:flex;flex-direction:column;align-items:center;gap:8px}.board-size-selector label,.difficulty-selector label{font-weight:600;color:#555;font-size:.9rem}select{padding:8px 12px;border:2px solid #ddd;border-radius:8px;font-size:1rem;background:#fff;cursor:pointer;transition:all .3s ease}select:hover{border-color:#667eea}select:focus{outline:0;border-color:#667eea;box-shadow:0 0 0 3px rgba(102,126,234,.1)}.btn{padding:12px 24px;border:none;border-radius:8px;font-size:1rem;font-weight:600;cursor:pointer;transition:all .3s ease;text-transform:uppercase;letter-spacing:.5px}.game-info{display:flex;flex-wrap:wrap;gap:30px;justify-content:center;margin-bottom:30px;width:100%;max-width:800px}.score-board{display:flex;gap:20px;background:rgba(255,255,255,.95);padding:20px;border-radius:15px;box-shadow:0 8px 32px rgba(0,0,0,.1);backdrop-filter:blur(10px);animation:fadeInLeft .8s ease-out .6s both}.score-item{text-align:center;padding:10px 15px;border-radius:10px;background:linear-gradient(135deg,#f8f9fa 0,#e9ecef 100%);min-width:80px}.score-item .label{display:block;font-size:.8rem;font-weight:600;color:#666;margin-bottom:5px}.score-item span:last-child{font-size:1.5rem;font-weight:700;color:#333}.game-status{background:rgba(255,255,255,.95);padding:20px;border-radius:15px;box-shadow:0 8px 32px rgba(0,0,0,.1);backdrop-filter:blur(10px);text-align:center;min-width:200px;animation:fadeInRight .8s ease-out .6s both}#currentPlayer{font-size:1.2rem;font-weight:600;color:#333;margin-bottom:10px}#gameMessage{font-size:1.1rem;font-weight:600;padding:8px 16px;border-radius:8px;transition:all .3s ease}#gameMessage.win{background:#d4edda;color:#155724;border:1px solid #c3e6cb}#gameMessage.lose{background:#f8d7da;color:#721c24;border:1px solid #f5c6cb}#gameMessage.draw{background:#fff3cd;color:#856404;border:1px solid #ffeaa7}.game-board-container{display:flex;justify-content:center;margin-bottom:30px;animation:fadeInUp .1s ease-out .8s both}.game-board{display:grid;gap:3px;background:#333;padding:3px;border-radius:15px;box-shadow:0 12px 40px rgba(0,0,0,.2)}.game-board.size-3{width:300px;height:300px}.game-board.size-4{width:320px;height:320px}.game-board.size-5{width:350px;height:350px}.game-board.size-6{width:360px;height:360px}.cell{background:#fff;display:flex;align-items:center;justify-content:center;font-size:2rem;font-weight:700;cursor:pointer;border-radius:8px;transition:all .3s ease;position:relative;overflow:hidden}.cell:hover{background:#f8f9fa;transform:scale(.95)}.cell.filled{cursor:not-allowed;transform:scale(1)}.cell.filled:hover{background:#fff}.cell.x{color:#e74c3c;animation:popIn .3s ease-out}.cell.o{color:#3498db;animation:popIn .3s ease-out}.cell.winning-cell{background:linear-gradient(135deg,gold 0,#ffed4e 100%);animation:pulse 1s infinite}.cell::before{content:'';position:absolute;top:0;left:-100%;width:100%;height:100%;background:linear-gradient(90deg,transparent,rgba(255,255,255,.4),transparent);transition:left .5s}.cell:hover::before{left:100%}.game-rules{background:rgba(255,255,255,.95);padding:25px;border-radius:15px;box-shadow:0 8px 32px rgba(0,0,0,.1);backdrop-filter:blur(10px);max-width:600px;text-align:center;animation:fadeIn .1s ease-out 1s both}.game-rules h3{color:#333;margin-bottom:15px;font-size:1.3rem}.game-rules ul{list-style:none;margin-bottom:15px}.game-rules li{margin-bottom:8px;padding:8px 15px;background:#f8f9fa;border-radius:8px;border-left:4px solid #667eea}.game-rules li strong{color:#667eea}.game-rules p{color:#666;font-style:italic}@keyframes fadeIn{from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}@keyframes fadeInDown{from{opacity:0;transform:translateY(-30px)}to{opacity:1;transform:translateY(0)}}@keyframes fadeInUp{from{opacity:0;transform:translateY(30px)}to{opacity:1;transform:translateY(0)}}@keyframes fadeInLeft{from{opacity:0;transform:translateX(-30px)}to{opacity:1;transform:translateX(0)}}@keyframes fadeInRight{from{opacity:0;transform:translateX(30px)}to{opacity:1;transform:translateX(0)}}@keyframes popIn{0%{transform:scale(0);opacity:0}50%{transform:scale(1.2)}100%{transform:scale(1);opacity:1}}@keyframes pulse{0%,100%{transform:scale(1)}50%{transform:scale(1.05)}}@media (max-width:768px){.container{padding:15px}header h1{font-size:2.5rem}header p{font-size:1rem}.game-controls{flex-direction:column;gap:15px;padding:15px}.game-info{flex-direction:column;gap:20px}.score-board{flex-wrap:wrap;justify-content:center;gap:15px}.game-board.size-3{width:280px;height:280px}.game-board.size-4{width:300px;height:300px}.game-board.size-5{width:320px;height:320px}.game-board.size-6{width:340px;height:340px}.cell{font-size:1.5rem}.game-rules{padding:20px;margin:0 10px}}@media (max-width:480px){header h1{font-size:2rem}.game-board.size-3{width:250px;height:250px}.game-board.size-4{width:260px;height:260px}.game-board.size-5{width:280px;height:280px}.game-board.size-6{width:300px;height:300px}.cell{font-size:1.2rem}.btn{padding:10px 20px;font-size:.9rem}}.cell{aspect-ratio:1/1;display:flex;align-items:center;justify-content:center;font-size:2rem;font-weight:700;cursor:pointer;border-radius:8px;transition:all .3s ease;position:relative;overflow:hidden}.cell>*{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}