/* Root variables for light and dark themes */
:root {
    --background-color: #f0f0f0;
    --container-background: #ffffff;
    --text-color: #333333;
    --secondary-text-color: #555555;
    --label-color: #555555;
    --input-background: #ffffff;
    --input-border: #ccc;
    --button-background: #4CAF50;
    --button-hover-background: #45a049;
    --random-button-background: #9c27b0;
    --random-button-hover-background: #7b1fa2;
    --delete-button-background: #b02727;
    --delete-button-hover-background: #a21f1f;
    --pokemon-background: #ffffff;
    --pokemon-border: #ddd;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --shadow-color-light: rgba(0, 0, 0, 0.05);
    --span-color: #666666;
    --destructive-action: #f44336;
    --secondary-background-color: #ccc;
}

/* Dark theme variables */
@media (prefers-color-scheme: dark) {
    :root {
        --background-color: #121212;
        --container-background: #1e1e1e;
        --text-color: #e0e0e0;
        --secondary-text-color: #bbbbbb;
        --label-color: #cccccc;
        --input-border: #555555;
        --input-background: #2c2c2c;
        --secondary-background-color: #2c2c2c;
        --button-background: #388e3c;
        --button-hover-background: #2e7d32;
        --random-button-background: #8e24aa;
        --random-button-hover-background: #6a1b9a;
        --delete-button-background: #aa2424;
        --delete-button-hover-background: #9a1b1b;
        --pokemon-background: #2c2c2c;
        --pokemon-border: #555555;
        --shadow-color: rgba(255, 255, 255, 0.1);
        --shadow-color-light: rgba(255, 255, 255, 0.05);
        --span-color: #aaaaaa;
        --destructive-action: #f44336;
    }
}

/* General body styles */
body {
    font-family: 'Lexend', sans-serif;
    background: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Container styles */
.container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    border-radius: 8px;
    padding: 20px;
}

/* Form styles */
form {
    background: var(--container-background);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 0 15px var(--shadow-color);
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    box-sizing: border-box;
}

/* Player section styles */
.player {
    flex: 1;
    min-width: 300px;
    background: var(--pokemon-background);
    border-radius: 8px;
    padding: 15px;
    border: 1px solid var(--pokemon-border);
    box-sizing: border-box;
}

/* Specific colors for each player */
.player1 {
    background: #5EC5F0;
}

.player2 {
    background: #E3575F;
}

/* Adjust colors for dark mode */
@media (prefers-color-scheme: dark) {
    .player1 {
        background: #00AEEF;
    }
    .player2 {
        background: #E20613;
    }
}

/* Heading styles */
h1, h3 {
    text-align: center;
    color: var(--text-color);
    margin-bottom: 20px;
    width: 100%;
}

h4 {
    margin-bottom: 10px;
    color: var(--secondary-text-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Añadir esta clase a tu archivo styles.css */
.button-stack {
    display: flex;
    flex-direction: column;
    gap: 10px; /* Espacio entre los botones */
}

/* Random button styles */
.random-button {
    font-size: 12px;
    padding: 4px 8px;
    background: var(--random-button-background);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.random-button:hover {
    background: var(--random-button-hover-background);
}

/* Delete button styles */
.delete-button {
    font-size: 12px;
    padding: 4px 8px;
    background: var(--delete-button-background);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.delete-button:hover {
    background: var(--delete-button-hover-background);
}

/* Pokémon section styles */
.pokemon {
    background: var(--pokemon-background);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid var(--pokemon-border);
    box-shadow: 0 0 10px var(--shadow-color-light);
}

/* Label styles */
label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: var(--label-color);
}

/* Input and select styles */
input[type="text"], select, input[type="range"] {
    width: calc(100% - 20px);
    padding: 8px;
    margin-top: 5px;
    border-radius: 4px;
    border: 1px solid var(--input-border);
    background: var(--input-background);
    color: var(--text-color);
    box-sizing: border-box;
}

/* Specific styles for color input */
input[type="color"] {
    width: calc(100% - 26px);
    height: 30px;
    padding: 0;
    border: none;
    cursor: pointer;
    vertical-align: middle;
    border-radius: 4px;
    background: none;
}

/* Range input styles */
input[type="range"] {
    width: calc(100% - 30px);
}

/* Span styles */
span {
    font-weight: normal;
    color: var(--span-color);
}

/* Button container styles */
.button-container {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* Button styles */
button {
    background: var(--button-background);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

button:hover {
    background: var(--button-hover-background);
}

button.random-all {
    background: var(--random-button-background);
}

button.random-all:hover {
    background: var(--random-button-hover-background);
}

button.clear-button {
    background-color: var(--destructive-action);
    color: white;
}

/* Responsive styles */
@media (max-width: 768px) {
    .player {
        min-width: 100%;
    }
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    position: relative;
    background-color: var(--container-background);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 15px var(--shadow-color);
    text-align: center;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 18px;
    font-weight: bold;
    color: var(--text-color);
    cursor: pointer;
}

.close-modal:hover {
    color: var(--text-color);
    background-color: var(--destructive-action);
}

/* Camera container styles */
#camera-container {
    position: relative;
    width: 100%;
    max-width: 300px;
    height: 200px;
    margin: 20px auto;
    background: black;
    overflow: hidden;
    border-radius: 8px;
}

#camera-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Image styles */
#qrcode {
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Toast styles */
.toast-info {
    border-left-color: green;
}

.toast-error {
    border-left-color: red;
}

.toastify .toast-close {
    order: -1;
    margin-right: 10px;
}