:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --body-bg: #f8f9fa;
    --card-bg: #ffffff;
    --text-color: #212529;
    --border-color: #dee2e6;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Quicksand', sans-serif;
    --font-size-base: 1rem;
    --font-size-sm: 0.875rem;
    --font-size-lg: 1.25rem;
    --font-size-xl: 1.5rem;
    --font-size-2xl: 2rem;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --line-height-tight: 1.2;
    --line-height-normal: 1.5;
    --letter-spacing-tight: -0.025em;
    --letter-spacing-normal: 0;
}

body {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    color: var(--text-color);
    background-color: var(--body-bg);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-secondary);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    letter-spacing: var(--letter-spacing-tight);
    margin-bottom: 1rem;
}

h1 {
    font-size: var(--font-size-2xl);
    text-transform: uppercase;
    letter-spacing: -0.05em;
}

h2 {
    font-size: var(--font-size-xl);
    color: var(--primary-color);
}

h3 {
    font-size: var(--font-size-lg);
    color: var(--secondary-color);
}

p {
    font-family: var(--font-secondary);
    font-weight: var(--font-weight-normal);
    margin-bottom: 1rem;
}

.card {
    width: 150px;
    height: 200px;
    border: none;
    border-radius: 15px;
    background: var(--card-bg);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    margin: 10px;
    position: relative;
    overflow: hidden;
    padding: 20px 10px;
}

.card i.fa-user {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.card .player-name {
    font-family: var(--font-secondary);
    font-size: 1rem;
    font-weight: var(--font-weight-medium);
    color: var(--primary-color);
    text-align: center;
    margin: 0;
    padding: 5px 0;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card .move {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    flex-grow: 1;
}

.card .move i {
    font-size: 3rem;
    color: var(--primary-color);
    animation: moveAnimation 0.5s ease;
}

@keyframes moveAnimation {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.card .player-score {
    font-family: var(--font-primary);
    font-size: 1.2rem;
    font-weight: var(--font-weight-bold);
    color: var(--primary-color);
    margin: 5px 0;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.12);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--info-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover::before {
    opacity: 1;
}

.card i {
    font-size: 3rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.card:hover i {
    transform: scale(1.1);
}

.move {
	font-size: 100px;
	padding: 30px 20px 30px 20;
	text-align: center;
}

/* Estilos para los iconos del juego */
.move i {
    transition: all 0.3s ease;
}

/* Colores específicos para cada jugada */
.move i.fa-hand-rock {
    color: #e74c3c; /* Rojo para piedra */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.move i.fa-hand-paper {
    color: #3498db; /* Azul para papel */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.move i.fa-hand-scissors {
    color: #2ecc71; /* Verde para tijera */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

/* Efecto hover en los botones de jugada */
.btn i.fa-hand-rock {
    color: #e74c3c;
}

.btn i.fa-hand-paper {
    color: #3498db;
}

.btn i.fa-hand-scissors {
    color: #2ecc71;
}

/* Efecto de ganador */
.move i.winner {
    animation: winner-pulse 1s infinite;
    filter: brightness(1.2);
}

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

.game {
	width: 450px;
	height: 250px;
	margin: 5px auto 5px auto;
}

/* Estilos del formulario de ingreso */
.player-form {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    font-family: var(--font-secondary);
}

.player-form h4 {
    color: #333;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.player-form label {
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-lg);
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.player-form input {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
}

.player-form input[type="text"] {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.player-form input[type="text"]:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
    outline: none;
}

.player-form input[type="submit"] {
    width: 100%;
    padding: 0.8rem;
    background: #4a90e2;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.player-form input[type="submit"]:hover {
    background: #357abd;
    transform: translateY(-1px);
}

.player-form input[type="submit"]:active {
    transform: translateY(0);
}

/* Estilos para modo oscuro */
body.dark-mode .player-form {
    background: var(--dark-secondary);
    box-shadow: 0 4px 6px var(--dark-shadow);
}

body.dark-mode .player-form h4 {
    color: var(--dark-text);
}

body.dark-mode .player-form input[type="text"] {
    background: var(--dark-bg);
    border-color: var(--dark-border);
    color: var(--dark-text);
}

body.dark-mode .player-form input[type="text"]:focus {
    border-color: var(--dark-accent);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}

body.dark-mode .player-form input[type="submit"] {
    background: var(--dark-accent);
}

body.dark-mode .player-form input[type="submit"]:hover {
    background: #357abd;
}

/* Estilos para los botones del juego */
.game-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    width: 100%;
    margin-top: 20px;
}

.game-button {
    position: relative;
    padding: 1rem 2rem;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 150px;
    justify-content: center;
    font-family: var(--font-secondary);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-lg);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Estilos específicos para cada botón */
.game-button.rock {
    background: linear-gradient(145deg, #ff6b6b, #e74c3c);
    color: white;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.game-button.paper {
    background: linear-gradient(145deg, #5dade2, #3498db);
    color: white;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.game-button.scissors {
    background: linear-gradient(145deg, #2ecc71, #27ae60);
    color: white;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

/* Efectos hover */
.game-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.game-button:active {
    transform: translateY(1px);
}

/* Efecto de brillo al hacer hover */
.game-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: 0.5s;
}

.game-button:hover::before {
    left: 100%;
}

/* Estilos para el botón de reinicio */
.reset-button {
    background: linear-gradient(145deg, #95a5a6, #7f8c8d);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(127, 140, 141, 0.3);
    width: 100%;
    max-width: 300px;
    margin: 1rem auto;
    display: block;
    font-family: var(--font-secondary);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-base);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.reset-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.reset-button:active {
    transform: translateY(1px);
}

/* Estilos para modo oscuro */
body.dark-mode .game-button {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

body.dark-mode .game-button:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

body.dark-mode .reset-button {
    background: linear-gradient(145deg, #34495e, #2c3e50);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

/* Responsive */
@media (max-width: 575px) {
    .card {
        width: 130px;
        height: 180px;
        border: 1px;
        border-radius: 5px;
        padding: 8px;
        margin: 3px auto 3px auto;
    }

    .move {
        font-size: 80px;
        padding: 25px 15px 25px 15;
        text-align: center;
    }

    .game {
        width: 320px;
        height: 250px;
        margin: 5px auto 5px auto;
    }

    .game-buttons {
        flex-direction: column;
        align-items: center;
    }

    .game-button {
        width: 100%;
        max-width: 250px;
        margin: 0.5rem 0;
    }

    .reset-button {
        max-width: 250px;
    }

    .player-form {
        margin: 1rem;
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .game-title {
        font-size: var(--font-size-xl);
    }
    
    .game-button {
        font-size: var(--font-size-base);
    }
    
    .game-button i {
        font-size: var(--font-size-lg);
    }
    
    .game-result {
        font-size: var(--font-size-lg);
    }

    .card {
        width: 120px;
        height: 180px;
        margin: 8px;
        padding: 15px 8px;
    }

    .card i {
        font-size: 2.5rem;
    }

    .card .player-name {
        font-size: 0.9rem;
    }

    .card .player-score {
        font-size: 1rem;
    }

    .game-board {
        gap: 15px;
        padding: 15px;
    }

    .game-stats {
        padding: 15px;
        margin: 15px auto;
    }

    .cards-container {
        gap: 20px;
        flex-direction: column;
    }

    .game-buttons {
        flex-wrap: wrap;
        gap: 15px;
    }
}

.game-title {
    font-family: var(--font-secondary);
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-2xl);
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: -0.05em;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px var(--shadow-color);
}

.game-button i {
    font-size: var(--font-size-xl);
    margin-bottom: 0.5rem;
}

.game-result {
    font-family: var(--font-secondary);
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-xl);
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 1rem 0;
}

.game-stats {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 20px;
    margin: 20px auto;
    max-width: 800px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.game-stats h3 {
    color: var(--primary-color);
    font-size: 1.25rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(0, 123, 255, 0.1);
    text-align: center;
}

.game-stats p {
    margin: 10px 0;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-secondary);
}

.game-stats p:last-child {
    border-bottom: none;
    font-weight: var(--font-weight-semibold);
    color: var(--primary-color);
}

.game-stats p span {
    font-weight: var(--font-weight-medium);
    color: var(--secondary-color);
}

.game-board {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(5px);
    margin: 20px auto;
    max-width: 800px;
}

.cards-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    width: 100%;
    margin-bottom: 20px;
}

.card.winner {
    animation: winnerPulse 1s ease infinite;
    box-shadow: 0 0 20px rgba(40, 167, 69, 0.5);
    border: 2px solid var(--success-color);
}

.card.winner .move i {
    animation: winnerIcon 1s ease infinite;
    color: var(--success-color);
}

.card.loser {
    opacity: 0.7;
    filter: grayscale(0.5);
}

@keyframes winnerPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(40, 167, 69, 0.5);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 30px rgba(40, 167, 69, 0.7);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(40, 167, 69, 0.5);
    }
}

@keyframes winnerIcon {
    0% {
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(1.2) rotate(10deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}
