* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #0d1117;
    color: #c9d1d9;
    padding: 20px;
    min-height: 100vh;
}
header { margin-bottom: 25px; text-align: center; }
header h1 a { color: #58a6ff; text-decoration: none; font-size: 2rem; }
header p { color: #8b949e; font-size: 0.95rem; margin-top: 5px; }

.app-layout {
    display: flex;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    align-items: flex-start;
}
.sidebar {
    width: 280px;
    flex-shrink: 0;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 15px;
}
.sidebar h3 {
    font-size: 1rem;
    color: #f0f6fc;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.history-list { list-style: none; max-height: 500px; overflow-y: auto; }
.history-item {
    padding: 8px 10px;
    border-bottom: 1px solid #21262d;
    border-radius: 4px;
    margin-bottom: 4px;
}
.history-item a {
    color: #58a6ff;
    text-decoration: none;
    font-size: 0.85rem;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.history-item .time { font-size: 0.7rem; color: #8b949e; display: block; margin-top: 2px; }
.empty-history { color: #8b949e; font-size: 0.85rem; font-style: italic; }

.main-content { flex-grow: 1; width: 100%; }
.card {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}
.card h2 { color: #f0f6fc; font-size: 1.25rem; margin-bottom: 15px; text-align: left; }

/* Zona de Drag & Drop */
.upload-dropzone {
    border: 2px dashed #30363d;
    border-radius: 8px;
    padding: 40px 20px;
    background: #0d1117;
    cursor: pointer;
    transition: border-color 0.2s;
    margin-bottom: 15px;
}
.upload-dropzone:hover { border-align: center; border-color: #58a6ff; }
.upload-dropzone p { color: #8b949e; font-size: 0.95rem; }

.btn {
    display: inline-block;
    padding: 10px 16px;
    background: #238636;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}
.btn:hover { background: #2ea043; }
.btn-secondary { background: #21262d; color: #c9d1d9; border: 1px solid #30363d; }
.btn-secondary:hover { background: #30363d; }
.btn-danger { background: transparent; color: #f85149; border: none; font-size: 0.75rem; cursor: pointer; }

.image-preview-container img {
    max-width: 100%;
    max-height: 500px;
    border-radius: 6px;
    border: 1px solid #30363d;
    margin-bottom: 15px;
}

.links-box {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
    flex-wrap: wrap;
}
.links-box input {
    background: #0d1117;
    border: 1px solid #30363d;
    color: #c9d1d9;
    padding: 8px;
    border-radius: 4px;
    width: 60%;
    font-size: 0.85rem;
}

.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #238636;
    color: #fff;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: bold;
    display: none;
    z-index: 1000;
}
.toast.show { display: block; }

@media (max-width: 768px) {
    .app-layout { flex-direction: column-reverse; }
    .sidebar { width: 100%; }
}

/* Zona de Drag & Drop interativa */
.upload-dropzone {
    border: 2px dashed #30363d;
    border-radius: 8px;
    padding: 50px 20px;
    background: #0d1117;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 15px;
    text-align: center;
}

.upload-dropzone.dragover {
    border-color: #58a6ff;
    background: #1f6feb15;
    transform: scale(1.01);
}

.upload-dropzone p {
    color: #8b949e;
    font-size: 0.95rem;
    pointer-events: none; /* Garante que o evento dispara na div inteira */
}