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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    max-width: 500px;
    width: 100%;
    text-align: center;
    transition: transform 0.3s ease;
}

.container:hover {
    transform: translateY(-5px);
}

h1 {
    color: #333;
    margin-bottom: 30px;
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.game-settings {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 25px;
    border: 2px solid #e9ecef;
}

.game-settings label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #495057;
}

.game-settings input {
    padding: 10px 15px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 15px;
    width: 100px;
    transition: border-color 0.3s ease;
}

.game-settings input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 5px;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.game-info {
    display: flex;
    justify-content: space-around;
    margin-bottom: 25px;
    background: #e8f4fd;
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.game-info p {
    font-weight: 600;
    color: #495057;
}

.game-info span {
    color: #667eea;
    font-weight: 700;
}

.board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 10px;
    margin: 25px auto;
    max-width: 300px;
    background: #fff;
    padding: 15px;
    border-radius: 15px;
    box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.1);
}

.cell {
    width: 80px;
    height: 80px;
    background: linear-gradient(145deg, #f0f0f0, #ffffff);
    border: 2px solid #e9ecef;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cell::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.2), transparent);
    transition: left 0.5s ease;
}

.cell:hover::before {
    left: 100%;
}

.cell:hover {
    background: linear-gradient(145deg, #e3f2fd, #f8f9fa);
    border-color: #667eea;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.cell.x {
    color: #e74c3c;
    background: linear-gradient(145deg, #ffeaea, #ffffff);
}

.cell.o {
    color: #3498db;
    background: linear-gradient(145deg, #e3f2fd, #ffffff);
}

.status {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 20px 0;
    color: #495057;
    min-height: 30px;
}

.status.winner {
    color: #28a745;
    animation: pulse 1s infinite;
}

.status.draw {
    color: #ffc107;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.ranking {
    margin-top: 30px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    border: 2px solid #e9ecef;
}

.ranking h2 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.ranking ul {
    list-style: none;
    text-align: left;
}

.ranking li {
    background: white;
    margin: 8px 0;
    padding: 12px 15px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.ranking li:hover {
    transform: translateX(5px);
}

.ranking li:first-child {
    border-left-color: #ffd700;
    background: linear-gradient(135deg, #fff9c4, #ffffff);
}

.ranking li:nth-child(2) {
    border-left-color: #c0c0c0;
}

.ranking li:nth-child(3) {
    border-left-color: #cd7f32;
}

/* Responsividade */
@media (max-width: 480px) {
    .container {
        padding: 20px;
        margin: 10px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .cell {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .board {
        max-width: 220px;
    }
    
    .game-info {
        flex-direction: column;
        gap: 10px;
    }
}

