/* ---------- RESET GLOBAL ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow-x: hidden; /* evita scroll horizontal */
    font-family: Arial, sans-serif;
}
/* Fondo general para TODA la web */
body {
    background: linear-gradient(135deg, #05070a 0%, #0b0f17 100%);
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
}

.error {
    width: calc(100% - 20px);
    padding: 10px;
    margin: 10px auto;
    border: none;
    border-radius: 5px;
    background-color: #f8d7da;  /* Rojo claro */
    color: #721c24;  /* Texto oscuro para contraste */
    display: block;
    font-size: 16px;
    text-align: center;
}

.container {
    width: 100%;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.logo {
    width: 160px;
    max-width: 40vw;
    height: auto;
    margin-bottom: 20px;
}

.box {
    width: 400px;
    max-width: 90%;
    background: #ffffff;
    padding: 25px;
    border-radius: 8px;

    /* Glow blanco suave */
    box-shadow: 0 0 35px rgba(255, 255, 255, 0.55);

    text-align: center;
}

.box input {
    width: 90%;
    padding: 10px;
    margin: 8px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.box button {
    width: 95%;
    padding: 10px;
    margin-top: 10px;
    border: none;
    background: #333;
    color: white;
    cursor: pointer;
    border-radius: 5px;
}

.box button:hover {
    background: #555;
}

.toggle {
    margin-top: 12px;
    font-size: 14px;
    cursor: pointer;
    color: #0066cc;
}
.toggle:hover {
    text-decoration: underline;
}

.hidden {
    display: none;
}

/* ---------- TOPBAR ---------- */
.topbar {
    width: 100%;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 10px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
}

.topbar .logo {
    margin-top: 20px;
    height: 60px;
    width: auto; /* Mantiene la proporción original */
}


.menu {
    display: flex;
    justify-content: center;
    flex: 1;
    gap: 25px;
}

.menu a {
    color: white;
    text-decoration: none;
    font-size: 1rem;
}

.menu a:hover {
    color: #bdbdbd;
}


/* ---------- CONTENIDO ---------- */
.content {
    padding: 20px;
    text-align: center;
    color: white;
    background: none; /* sin gradient aquí */
}


/* ---------- MOBILE ---------- */
@media (max-width: 600px) {

    .topbar {
        height: 60px;
        padding: 0 12px;
    }

    .menu {
        gap: 10px;
    }

    .menu a {
        font-size: 0.85rem;
        white-space: nowrap;
    }


    .box {
        padding: 18px;
        border-radius: 6px;
    }
}

/* Contenedor de la tarjeta */
.card {
    background-color: white;
    width: calc(20% - 40px); /* Ancho de las tarjetas, ajusta según el número de columnas */
    margin: 10px; /* Espaciado entre tarjetas */
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: hidden;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    display: inline-block;
}

@media (max-width: 768px) {
    .card  {
        width: calc(50% - 40px); /* Dos tarjetas por fila en pantallas más pequeñas */
    }
}

/* Efecto hover */
.card:hover {
    transform: scale(1.05); /* Aumenta ligeramente el tamaño al pasar el ratón */
}

/* Imagen de la tarjeta */
.card img {
    width: 100%;
    height: 150px;
    object-fit: cover; / Mantiene proporción y recorta si es necesario */
}

/* Contenido de la tarjeta */
.card .info {
    padding: 15px;
}

.card .info h3 {
    margin: 10px 0 5px;
    font-size: 18px;
    color: #333;
}

.card .info p {
    margin: 0;
    color: #777;
    font-size: 14px;
}

.card {
    text-decoration: none;
}


.form-container {
    width: 90%;
    max-width: 500px;
    margin: 40px auto;
    padding: 25px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(6px);
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(255,255,255,0.08);
}

.form-container h2 {
    text-align: center;
    color: white;
    margin-bottom: 20px;
}

label {
    display: block;
    color: #cfd8e3;
    font-size: 0.9rem;
    margin-top: 12px;
}

input,
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    margin-top: 5px;
    border: 1px solid #3a4a61;
    border-radius: 8px;
    background: rgba(0,0,0,0.4);
    color: white;
    font-size: 1rem;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #4ea3ff;
    box-shadow: 0 0 6px rgba(78,163,255,0.5);
}

button {
    width: 100%;
    margin-top: 20px;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: #4ea3ff;
    color: #000;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s ease-in-out;
}

button:hover {
    background: #75bfff;
}

/* CONTENEDOR GENERAL */
.deck-view {
    width: 95%;
    max-width: 970px;
    margin: 30px auto;
    padding: 20px;
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(6px);
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(255,255,255,0.05);
    color: white;
}

/* FILA SUPERIOR */
.deck-header {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap; /* para responsive */
}

/* IMAGEN PRINCIPAL DEL MAZO */
.deck-image {
    width: 140px;
    height: 140px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 0 10px rgba(0,0,0,0.6);
}

/* INFO */
.deck-info p {
    margin: 5px 0;
    color: #d0d8e4;
}

.deck-title {
    margin: 0 0 10px 0;
    color: white;
}

/* DECK LIST */
.deck-list {
    margin-top: 25px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

/* CADA CARTA */
.card-slot {
    width: 141px;
    position: relative;
}

.card-slot img {
    width: 100%;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 0 8px rgba(0,0,0,0.7);
}

/* CANTIDAD EN ESQUINA */
.card-qty {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(0,0,0,0.75);
    color: white;
    font-size: 0.9rem;
    padding: 3px 7px;
    border-radius: 6px;
    font-weight: bold;
}

.comments-section {
    width: 95%;                   /* igual que deck */
    max-width: 970px;            /* igual que deck */
    margin: 30px auto;            /* centrado */
    padding: 20px;

    background: rgba(255,255,255,0.04);
    border-radius: 12px;
    backdrop-filter: blur(6px);
    box-shadow: 0 0 15px rgba(255,255,255,0.05);
    color: white;
}

.comments-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: white;
}

/* LISTA DE COMENTARIOS */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 25px;
}

.comment {
    background: rgba(0,0,0,0.35);
    border-radius: 10px;
    padding: 15px;
    color: white;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.comment-user {
    font-weight: bold;
    color: #4ea3ff;
}

.comment-date {
    font-size: 0.85rem;
    color: #cfd8e3;
}

.comment-body {
    font-size: 0.95rem;
    line-height: 1.4;
    text-align: left;
}

/* FORMULARIO */
.comment-form label {
    display: block;
    color: #cfd8e3;
    margin-bottom: 6px;
}

.comment-form textarea {
    width: 100%;
    padding: 12px;
    resize: vertical;
    border: 1px solid #3a4a61;
    border-radius: 8px;
    background: rgba(0,0,0,0.4);
    color: white;
    margin-bottom: 12px;
}

.comment-form textarea:focus {
    outline: none;
    border-color: #4ea3ff;
    box-shadow: 0 0 6px rgba(78,163,255,0.5);
}

.comment-form button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: #4ea3ff;
    color: #000;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s ease-in-out;
}

.comment-form button:hover {
    background: #75bfff;
}

.deck-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}


.version-select {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    width: 200px;
}

/* Botones acción */
.btn-action {
    padding: 6px 12px;
    border-radius: 6px;
    background: rgba(255,255,255,0.15);
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    border: 1px solid rgba(255,255,255,0.3);
    transition: 0.2s;
}

.btn-action:hover {
    background: rgba(255,255,255,0.25);
    border-color: white;
}

/* Responsive: acciones en columna para pantallas pequeñas */
@media (max-width: 600px) {
    .deck-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .deck-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}


/* Modal general */
.modal {
    display: none; /* Oculto por defecto */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.8); /* Fondo oscuro */
    justify-content: center;
    align-items: center;
}

/* Imagen dentro del modal */
.modal-content {
    max-width: 80%;
    max-height: 80%;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.7);
    display: block;
    margin: auto;
    cursor: pointer; /* Para indicar que se puede cerrar pulsando */
}

/* Botón cerrar */
.close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}
.close:hover {
    color: #bbb;
}

/* Opcional: hacer que las miniaturas cambien de cursor */
.card-img {
    cursor: pointer;
}


.title-box-decks img{
    height: 32px;
    width: 32px;
}

.title-box-decks h3 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
}


.round-card {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    width: calc(20% - 40px); /* Ancho de las tarjetas, ajusta según el número de columnas */
    margin: 50px; /* Espaciado entre tarjetas */
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: hidden;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    display: inline-block;
}

/* Header más compacto */
.round-header {
    font-weight: bold;
    font-size: 1rem;          /* 🔹 Reducido */
    margin-bottom: 20px;       /* 🔹 Reducido */
    margin-top: 20px;
}

.round-number {
    color: #ffd966;
}

.round-result {
    color: #a7ffa1;
}

/* Cuerpo sin mucho espaciado */
.round-body {
    display: flex;
    flex-direction: column;
    gap: 4px;                 /* 🔹 Reducido */
    margin-bottom: 20px;       /* 🔹 Reducido */
    margin-top: 20px;
    margin-left: 20px;
    margin-right: 20px;
}

.round-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.label {
    font-weight: 600;
    font-size: 0.85rem;       /* 🔹 Reducido */
}

.value {
    font-size: 0.85rem;       /* 🔹 Reducido */
    text-align: right;
}

/* Iconos más pequeños */
.ink-icons img {
    width: 20px;              /* 🔹 Reducido de 26px */
    height: 20px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.25);
}

/* Notas muy compactas */
.round-notes p {
    margin: 2px 0 0;
    font-size: 0.8rem;        /* 🔹 Reducido */
    opacity: 0.85;
}

/* Compacto en móviles también */
@media (max-width: 380px) {
    .round-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .value {
        text-align: left;
    }
}

@media (max-width: 600px) {
    .round-card {
        width: 90%;
        margin: 15px auto;  /* Centrado y más pequeño */
        display: block;     /* Evita problemas con inline-block */
    }
}