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

body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: #f4f6f8;
    min-height: 100vh;
    color: #1f2937;
}

.container {
    width: 95%;
    max-width: 1100px;
    margin: 30px auto;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
}

/* ====================================================
   ÁREA PRINCIPAL
   ==================================================== */

.interpreter-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 30px;
    align-items: stretch;
}

/* ====================================================
   CÁMARA
   ==================================================== */

.camera-section {
    display: flex;
    flex-direction: column;
}

.camera-container {
    width: 100%;
    background-color: #000;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#video {
    display: block;
    width: 100%;
    height: auto;
    transform: scaleX(-1);
}

#canvas {
    display: none;
}

.status {
    margin-top: 15px;
    text-align: center;
    font-size: 14px;
    color: #4b5563;
}

/* ====================================================
   TRADUCCIÓN
   ==================================================== */

.result-container {
    background-color: white;
    border-radius: 10px;
    padding: 25px;
    min-height: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.result-title {
    font-weight: bold;
    margin-bottom: 15px;
    font-size: 17px;
}

#translation {
    font-size: 28px;
    font-weight: bold;
    min-height: 80px;
    line-height: 1.4;
    word-break: break-word;
}

.result-footer {
    margin-top: 30px;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.indicator {
    font-size: 14px;
}

.hands-detected {
    color: green;
}

.hands-not-detected {
    color: #777;
}

.error {
    color: red;
}

/* ====================================================
   BOTÓN LIMPIAR
   ==================================================== */

#clearButton {
    border: none;
    border-radius: 7px;
    background-color: #1f2937;
    color: white;
    padding: 9px 16px;
    cursor: pointer;
    font-size: 14px;
}

#clearButton:hover {
    background-color: #374151;
}

/* ====================================================
   LEYENDAS INFORMATIVAS
   ==================================================== */

.information-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 30px;
    margin-top: 18px;
    align-items: start;
}

.capture-help,
.categories-section {
    font-size: 16px;
    line-height: 1.45;
}

.capture-help {
    padding: 0 4px;
}

.capture-help strong {
    color: #1d4ed8;
}

.categories-section p {
    margin-bottom: 12px;
}

.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    min-width: 145px;
    padding: 8px 14px;
    color: #fff;
    font-size: 17px;
    font-weight: bold;
    letter-spacing: 0.2px;
    border-radius: 25px;
    justify-content: center; /* Centra horizontalmente */
    background-color: #008cff;
}

/* ====================================================
   RESPONSIVE
   ==================================================== */

@media (max-width: 800px) {

    .interpreter-container,
    .information-container {
        grid-template-columns: 1fr;
    }

    .information-container {
        gap: 20px;
    }

    .category-badge {
        min-width: 120px;
    }
}