* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    background: #f4f6f8;
    color: #1f2937;
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;
}

/* =========================
   ENCABEZADO
   ========================= */

.site-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

.header-inner {
    width: 100%;
    max-width: 1100px;
    min-height: 72px;
    margin: 0 auto;
    padding: 14px 18px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-name {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #111827;
}

.brand-subtitle {
    margin-top: 2px;
    font-size: 0.82rem;
    color: #6b7280;
}

.history-button {
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #374151;

    min-height: 42px;
    padding: 0 15px;

    border-radius: 10px;

    font-size: 0.9rem;
    font-weight: 600;

    cursor: pointer;
}

/* =========================
   CONTENEDOR PRINCIPAL
   ========================= */

.main-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;

    padding: 18px 14px 40px;
}

/* =========================
   TARJETAS
   ========================= */

.card,
.text-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;

    box-shadow:
        0 2px 8px rgba(15, 23, 42, 0.04);

    margin-bottom: 16px;
}

.card {
    padding: 20px;
}

.card-title {
    font-size: 1.08rem;
    font-weight: 700;
    color: #111827;
}

.card-description {
    margin-top: 7px;
    margin-bottom: 20px;

    color: #6b7280;
    font-size: 0.92rem;
    line-height: 1.5;
}

/* =========================
   URL Y BOTÓN
   ========================= */

.input-label {
    display: block;

    margin-bottom: 7px;

    color: #374151;
    font-size: 0.86rem;
    font-weight: 600;
}

.youtube-input {
    width: 100%;
    min-height: 50px;

    padding: 0 14px;

    border: 1px solid #d1d5db;
    border-radius: 11px;

    background: #ffffff;
    color: #111827;

    font-size: 0.95rem;

    outline: none;
}

.youtube-input:focus {
    border-color: #2563eb;

    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.10);
}

.primary-button {
    width: 100%;
    min-height: 50px;

    margin-top: 12px;

    border: 0;
    border-radius: 11px;

    background: #2563eb;
    color: #ffffff;

    font-size: 0.96rem;
    font-weight: 700;

    cursor: pointer;
}

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

/* =========================
   PROCESAMIENTO
   ========================= */

.processing-card {
    border-left: 4px solid #2563eb;
}

.processing-list {
    margin-top: 18px;

    display: flex;
    flex-direction: column;
    gap: 13px;
}

.processing-item {
    display: flex;
    align-items: center;

    gap: 10px;

    color: #6b7280;
    font-size: 0.92rem;
}

.status-icon {
    width: 22px;
    flex: 0 0 22px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    font-weight: 700;
}

.processing-item.completed {
    color: #15803d;
}

.processing-item.active {
    color: #2563eb;
    font-weight: 600;
}

.processing-item.pending {
    color: #9ca3af;
}

/* =========================
   INFORMACIÓN DEL VIDEO
   ========================= */

.video-title {
    margin: 12px 0 18px;

    color: #111827;

    font-size: 1.35rem;
    line-height: 1.3;
}

.video-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 10px;
}

.meta-item {
    padding: 12px;

    background: #f8fafc;
    border-radius: 10px;
}

.meta-label {
    display: block;

    margin-bottom: 4px;

    color: #6b7280;
    font-size: 0.76rem;
}

.meta-value {
    color: #111827;
    font-size: 0.92rem;
    font-weight: 600;
}

/* =========================
   RESULTADOS
   ========================= */

.results-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.text-card {
    overflow: hidden;
}

.text-card-header {
    padding: 18px 20px;

    border-bottom: 1px solid #e5e7eb;
}

.text-card-title {
    color: #111827;
    font-size: 1rem;
    font-weight: 700;
}

.text-card-subtitle {
    margin-top: 3px;

    color: #6b7280;
    font-size: 0.8rem;
}

.transcript-text {
    padding: 20px;

    color: #374151;
    font-size: 0.95rem;
    line-height: 1.75;

    white-space: pre-line;
}

.secondary-button {
    margin: 0 20px 20px;

    min-height: 44px;
    padding: 0 15px;

    border: 1px solid #d1d5db;
    border-radius: 10px;

    background: #ffffff;
    color: #2563eb;

    font-size: 0.9rem;
    font-weight: 700;

    cursor: pointer;
}

/* =========================
   ESTADO INICIAL DEL MOCKUP
   ========================= */

.processing-card,
.video-info-card,
.results-section {
    display: none;
}

/* =========================
   TABLET / ESCRITORIO
   ========================= */

@media (min-width: 700px) {

    .header-inner {
        padding-left: 24px;
        padding-right: 24px;
    }

    .main-container {
        padding: 28px 24px 60px;
    }

    .card {
        padding: 24px;
    }

    .upload-card {
        max-width: 760px;
        margin-left: auto;
        margin-right: auto;
    }

    .video-title {
        font-size: 1.55rem;
    }

    .results-section {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }

    .text-card {
        margin-bottom: 0;
    }
}

/* =========================
   ESCRITORIO GRANDE
   ========================= */

@media (min-width: 1000px) {

    .main-container {
        padding-top: 36px;
    }

    .header-inner {
        min-height: 76px;
    }

    .brand-name {
        font-size: 1.25rem;
    }

    .upload-card {
        padding: 28px;
    }
}

.history-section { display: none; margin-top: 24px; }
.history-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.history-list { display: flex; flex-direction: column; gap: 14px; }
.history-item { padding: 18px; background: #ffffff; border: 1px solid #e5e7eb; border-radius: 14px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.history-item-title { margin-bottom: 8px; color: #111827; font-size: 17px; font-weight: 700; }
.history-item-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 14px; color: #6b7280; font-size: 14px; }
.history-item-status { color: #15803d; font-weight: 600; }
.history-view-button { min-height: 42px; padding: 10px 18px; border: 0; border-radius: 10px; background: #2563eb; color: #ffffff; font-size: 14px; font-weight: 600; cursor: pointer; }
.history-view-button:hover { background: #1d4ed8; }
@media (max-width: 600px) { .history-header { align-items: flex-start; } .history-item { padding: 16px; } .history-view-button { width: 100%; } }
