* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    overflow: hidden;
    min-width: 400px;
}

.select-box {
    padding: 40px;
    text-align: center;
}

.select-box.hide {
    display: none;
}

.select-box h2 {
    font-size: 32px;
    color: #333;
    margin-bottom: 30px;
    font-weight: bold;
}

.mode-selection {
    margin-bottom: 30px;
}

.mode-btn {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    margin: 10px;
    border-radius: 12px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.mode-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.4);
}

.player-selection {
    display: none;
}

.player-selection.show {
    display: block;
}

.player-selection h3 {
    color: #555;
    margin-bottom: 20px;
    font-size: 20px;
}

.options {
    display: flex;
    justify-content: center;
    gap: 25px;
}

.playerX, .playerO {
    background: white;
    border: 3px solid #ff6b35;
    padding: 25px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
    text-align: center;
}

.playerX:hover, .playerO:hover {
    background: #ff6b35;
    color: white;
    transform: scale(1.1);
}

.playerX .symbol, .playerO .symbol {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 10px;
}

.play-board {
    display: none;
    padding: 30px;
    background: #ff6b35;
}

.play-board.show {
    display: block;
}

.turn-indicator {
    background: white;
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.turn-buttons {
    display: flex;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.turn-btn {
    flex: 1;
    padding: 15px;
    background: transparent;
    border: none;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
    position: relative;
}

.turn-btn.active {
    color: white;
}

.turn-btn:not(.active) {
    color: #ff6b35;
}

.turn-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    border-radius: 12px;
    transition: transform 0.3s ease;
    z-index: 1;
}

.turn-slider.slide-right {
    transform: translateX(100%);
}

.details {
    text-align: center;
    margin-bottom: 20px;
}

.details span {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
}

.game-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-width: 300px;
    margin: 0 auto;
}

.box {
    background: white;
    border: none;
    height: 90px;
    width: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-size: 40px;
    font-weight: bold;
}

.box:hover:not(.filled) {
    background: #f0f0f0;
    transform: scale(1.05);
}

.box.filled {
    cursor: not-allowed;
}

.box.x {
    color: #ff6b35;
}

.box.o {
    color: #f7931e;
}

.result-box {
    display: none;
    padding: 40px;
    text-align: center;
    background: white;
}

.result-box.show {
    display: block;
}

.won-text {
    font-size: 28px;
    color: #333;
    margin-bottom: 30px;
    font-weight: bold;
}

.result-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.4);
}

.btn-secondary {
    background: #6c757d;
}

.btn-secondary:hover {
    background: #5a6268;
    box-shadow: 0 8px 20px rgba(108, 117, 125, 0.4);
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes symbolAppear {
    from { 
        opacity: 0; 
        transform: scale(0.5) rotate(-180deg); 
    }
    to { 
        opacity: 1; 
        transform: scale(1) rotate(0deg); 
    }
}

.container > * {
    animation: fadeIn 0.6s ease;
}

.symbol-animate {
    animation: symbolAppear 0.4s ease;
}

/* Responsive */
@media (max-width: 480px) {
    .container {
        min-width: 320px;
        margin: 20px;
    }
    
    .box {
        height: 70px;
        width: 70px;
        font-size: 32px;
    }
}