@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap' );

:root {
    --bg-color: #f4f7fa;
    --surface-color: #ffffff;
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --success-color: #16a34a;
    --error-color: #dc2626;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    --font-family: 'Inter', sans-serif;
}

* { box-sizing: border-box; }

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-primary);
    margin: 0;
    padding: 4px 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

.main-container {
    width: 100%;
    max-width: 70%;
    margin: 20px auto;
}

.app-header {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
}
.header-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}
.app-header .fa-film-simple {
    font-size: 32px;
    color: var(--primary-color);
}
.app-header h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin: 0;
}
.app-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin: 10px 0 0 0;
}
.header-help-btn {
    position: absolute;
    top: 0;
    right: 0;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s;
}
.header-help-btn:hover {
    color: var(--primary-color);
}


.input-container {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}
.input-wrapper {
    flex-grow: 1;
    position: relative;
}
.input-wrapper .fa-link {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}
#url-input {
    width: 100%;
    padding: 8px 8px 8px 40px;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
#url-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

#process-btn {
    padding: 0 25px;
    font-size: 1rem;
    font-weight: 600;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
    position: relative;
    overflow: hidden;
}
#process-btn:hover:not(:disabled) {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}
#process-btn:disabled {
    background-color: #93c5fd;
    cursor: not-allowed;
}
.btn-text, .btn-spinner {
    display: inline-block;
    transition: opacity 0.2s, transform 0.2s;
}
.btn-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
}
#process-btn.loading .btn-text {
    opacity: 0;
    transform: translateY(10px);
}
#process-btn.loading .btn-spinner {
    opacity: 1;
}

.results-area {
    display: none;
    grid-template-columns: 1fr;
    gap: 30px;
}
@media (min-width: 768px) {
    .results-area.is-dual {
        grid-template-columns: 1fr 1fr;
    }
}

.result-column {
    opacity: 0;
}

.card {
    background-color: var(--surface-color);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    height: 100%;
}
.card-header {
    padding: 10px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.card-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}
.card-body {
    padding: 20px;
}

#thumb-image {
    width: 100%;
    display: block;
    border-radius: 8px;
    margin-bottom: 15px;
    background-color: var(--bg-color);
    min-height: 200px;
}

.output-bar {
    display: flex;
    gap: 5px;
}
.output-bar input {
    flex-grow: 1;
    padding: 8px 12px;
    font-family: monospace;
    font-size: 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--bg-color);
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.output-bar button {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    background-color: var(--surface-color);
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}
.output-bar button:hover {
    background-color: var(--bg-color);
}

.player-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background-color: #000;
    border-radius: 8px;
    margin-bottom: 15px;
}
.player-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.action-btn {
    padding: 8px 12px;
    font-size: 0.875rem;
    font-weight: 500;
    background-color: var(--surface-color);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}
.action-btn:hover {
    background-color: var(--bg-color);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 24, 39, 0.6);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
}
.modal-content {
    background: var(--surface-color);
    border-radius: 12px;
    width: 100%;
    max-width: 80%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    transform: scale(0.95);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-bottom: 1px solid var(--border-color);
}
.modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}
.modal-close {
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    background: none;
    color: var(--text-secondary);
    transition: color 0.2s;
}
.modal-close:hover { color: var(--text-primary); }
.modal-body { padding: 16px; }
.modal-body p {
    margin-top: 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

.url-list {
    list-style: none;
    padding: 0;
    margin: 20px 0 0 0;
    font-family: monospace;
    font-size: 0.9rem;
}
.url-list li {
    background-color: var(--bg-color);
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 8px;
    color: var(--text-primary);
    word-break: break-all;
}

.code-section { margin-bottom: 20px; }
.code-section:last-child { margin-bottom: 0; }
.code-section h3 { margin: 0 0 5px 0; font-size: 1rem; font-weight: 600; }
.code-section p { margin: 0 0 10px 0; font-size: 0.9rem; color: var(--text-secondary); }

.code-block {
    background: #1f2937;
    color: #d1d5db;
    padding: 8px;
    border-radius: 8px;
    position: relative;
}
.code-block pre { margin: 0; white-space: pre-wrap; word-wrap: break-word; font-size: 0.875rem; }
.copy-code-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #374151;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}
.copy-code-btn:hover { background: #4b5563; }

/* Alert Styles */
#alert-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    color: #fff;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 300px;
    transform: translateX(120%);
}
.alert.success { background-color: var(--success-color); }
.alert.error { background-color: var(--error-color); }

/* --- INÍCIO DA ATUALIZAÇÃO --- */
/* Estilos para a Grade de Metadados */
.info-grid {
    margin-top: 20px;
    display: grid;
    gap: 12px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-item label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.info-item .output-bar {
    margin: 0; /* Reseta a margem da barra de output dentro do item */
}

.info-item .output-bar input {
    font-family: var(--font-family); /* Usa a fonte padrão em vez de monoespaçada */
    font-size: 0.9rem;
}
/* --- FIM DA ATUALIZAÇÃO --- */
